GO FAST WHEEEEEEEEEEEEEEEE (pit tick 1 time per millisecond, so 1ms accuracy instead of 2ms like before)
This commit is contained in:
parent
40e8aa9ff6
commit
692221dd9e
@ -61,7 +61,7 @@ extern "C" void _start()
|
|||||||
|
|
||||||
kinfoln("Prepared PIC");
|
kinfoln("Prepared PIC");
|
||||||
|
|
||||||
PIT::initialize(500); // 500 times per second
|
PIT::initialize(1000); // 1000 times per second
|
||||||
|
|
||||||
kinfoln("Prepared PIT");
|
kinfoln("Prepared PIT");
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ extern "C" void _start()
|
|||||||
int64_t yvel = 10;
|
int64_t yvel = 10;
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
sleep(5);
|
sleep(2);
|
||||||
uint32_t color = (uint32_t)Mersenne::get();
|
uint32_t color = (uint32_t)Mersenne::get();
|
||||||
uint32_t* colptr = &color;
|
uint32_t* colptr = &color;
|
||||||
x += xvel;
|
x += xvel;
|
||||||
@ -108,7 +108,7 @@ extern "C" void _start()
|
|||||||
Scheduler::add_kernel_task([]() {
|
Scheduler::add_kernel_task([]() {
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
sleep(200);
|
sleep(100);
|
||||||
uint32_t color = (uint32_t)Mersenne::get();
|
uint32_t color = (uint32_t)Mersenne::get();
|
||||||
uint32_t* colptr = &color;
|
uint32_t* colptr = &color;
|
||||||
framebuffer0.paint_rect(Mersenne::get() % (framebuffer0.width() - 256),
|
framebuffer0.paint_rect(Mersenne::get() % (framebuffer0.width() - 256),
|
||||||
@ -132,10 +132,6 @@ extern "C" void _start()
|
|||||||
|
|
||||||
kinfoln("Prepared scheduler tasks");
|
kinfoln("Prepared scheduler tasks");
|
||||||
|
|
||||||
ACPI::SDTHeader* rootSDT = ACPI::get_rsdt_or_xsdt();
|
|
||||||
bool isXSDT = ACPI::is_xsdt();
|
|
||||||
if (!ACPI::validate_rsdt_or_xsdt(rootSDT)) kerrorln("Invalid %s", isXSDT ? "XSDT" : "RSDT");
|
|
||||||
|
|
||||||
framebuffer0.clear(Color::Cyan);
|
framebuffer0.clear(Color::Cyan);
|
||||||
|
|
||||||
Interrupts::enable();
|
Interrupts::enable();
|
||||||
@ -146,10 +142,5 @@ extern "C" void _start()
|
|||||||
kinfoln("Found PCI device %x:%x, %s", dev.id().vendor, dev.id().device, pci_type_name(dev.type()));
|
kinfoln("Found PCI device %x:%x, %s", dev.id().vendor, dev.id().device, pci_type_name(dev.type()));
|
||||||
});
|
});
|
||||||
|
|
||||||
kdbgln("System memory: %ld KB", Memory::get_system() / 1024);
|
|
||||||
kdbgln(" Free memory : %ld KB", PMM::get_free() / 1024);
|
|
||||||
kdbgln(" Used memory : %ld KB", PMM::get_used() / 1024);
|
|
||||||
kdbgln(" Reserved memory : %ld KB", PMM::get_reserved() / 1024);
|
|
||||||
|
|
||||||
Scheduler::exit();
|
Scheduler::exit();
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user