Added PCI device detection and a start script.
This commit is contained in:
@@ -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"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user