Move system time display to Rtc.initialize()
This commit is contained in:
parent
3c8587acf5
commit
cc1753a75d
@ -82,10 +82,6 @@ void hulk_start()
|
|||||||
Acpi.initialize(hulk_header.bootinfo.acpi_xsdt_phys);
|
Acpi.initialize(hulk_header.bootinfo.acpi_xsdt_phys);
|
||||||
Apic.initialize();
|
Apic.initialize();
|
||||||
Rtc.initialize();
|
Rtc.initialize();
|
||||||
/* Read the current system time. */
|
|
||||||
Rtc.time t = Rtc.read_rtc_time();
|
|
||||||
Klog.writefln("System time is 20%02u-%02u-%02u %02u:%02u:%02u",
|
|
||||||
t.year, t.month, t.day, t.hour, t.minute, t.second);
|
|
||||||
Pit.initialize();
|
Pit.initialize();
|
||||||
Pci.initialize();
|
Pci.initialize();
|
||||||
Usb.initialize();
|
Usb.initialize();
|
||||||
@ -93,11 +89,10 @@ void hulk_start()
|
|||||||
|
|
||||||
resume_interrupts();
|
resume_interrupts();
|
||||||
|
|
||||||
|
/* Run kernel tests. */
|
||||||
Test.run();
|
Test.run();
|
||||||
Klog.writefln("\a5HULK Initialization Complete!");
|
Klog.writefln("\a5HULK Initialization Complete!");
|
||||||
|
|
||||||
/* Run kernel tests. */
|
|
||||||
|
|
||||||
/* Idle loop. */
|
/* Idle loop. */
|
||||||
Time.msleep(1);
|
Time.msleep(1);
|
||||||
for (;;)
|
for (;;)
|
||||||
|
@ -56,6 +56,10 @@ struct Rtc
|
|||||||
|
|
||||||
/* Send EOI to enable more RTC interrupts and re-enable NMIs. */
|
/* Send EOI to enable more RTC interrupts and re-enable NMIs. */
|
||||||
eoi();
|
eoi();
|
||||||
|
|
||||||
|
time t = Rtc.read_rtc_time();
|
||||||
|
Klog.writefln("System time is 20%02u-%02u-%02u %02u:%02u:%02u",
|
||||||
|
t.year, t.month, t.day, t.hour, t.minute, t.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ubyte read_register(ubyte register, bool disable_nmi = false)
|
private static ubyte read_register(ubyte register, bool disable_nmi = false)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user