Added PCI device detection and a start script.

This commit is contained in:
2024-01-22 01:49:02 +01:00
parent 847bf8c84b
commit fa6dab4f88
13 changed files with 581 additions and 65 deletions

View File

@@ -7,6 +7,7 @@
#include "os/draw.hpp"
#include "os/serial.hpp"
#include "os/tty.hpp"
#include "drivers/pci.hpp"
#include "drivers/pic.hpp"
#include "drivers/ps2.hpp"
#include "./x86_64.hpp"
@@ -245,18 +246,6 @@ void kernel_main()
// __enterUsermode(SEGIDX_USER_CODE, SEGIDX_USER_DATA, &tss.rsp0, &main);
main(); // for now run it in kernel mode, user mode doesn't work yet
while (true)
{
ps2::KeyEvent event;
while (!ps2::readKey(event));
std::printf(
"Key event: scancode=%s(0x%X), down=%s, repeat=%s\n",
ps2::keyName(event.scancode),
static_cast<unsigned>(event.scancode),
event.down ? "true" : "false",
event.repeat ? "true" : "false"
);
}
}