Compare commits

..

2 Commits

Author SHA1 Message Date
e1f38bd5ea Initialize RTC after APIC 2023-10-21 20:47:15 -04:00
bcf1bd3bde HELLO: Zero HULK BSS region after mapping it 2023-10-21 20:46:27 -04:00
2 changed files with 3 additions and 1 deletions

View File

@ -419,6 +419,8 @@ private bool map_hulk(PageTable * pt_base)
{ {
return false; return false;
} }
/* Zero BSS region. */
memset64(cast(void *)bootinfo().bss_phys, 0u, hulk_bss_size() / 8);
/* Map HULK stack. */ /* Map HULK stack. */
virt = hulk_virt_stack_top() - hulk_stack_size(); virt = hulk_virt_stack_top() - hulk_stack_size();
if (!map4kregion(virt, bootinfo().stack_phys, hulk_stack_size(), pt_base)) if (!map4kregion(virt, bootinfo().stack_phys, hulk_stack_size(), pt_base))

View File

@ -66,7 +66,6 @@ void hulk_start()
hulk_header.bootinfo.fb.height, hulk_header.bootinfo.fb.height,
hulk_header.bootinfo.fb.stride); hulk_header.bootinfo.fb.stride);
Console.initialize(); Console.initialize();
Rtc.initialize();
Console.clear(); Console.clear();
Klog.initialize(); Klog.initialize();
@ -76,6 +75,7 @@ void hulk_start()
Pic.initialize(); Pic.initialize();
Acpi.initialize(hulk_header.bootinfo.acpi_xsdt_phys); Acpi.initialize(hulk_header.bootinfo.acpi_xsdt_phys);
Apic.initialize(); Apic.initialize();
Rtc.initialize();
/* Read the current system time. */ /* Read the current system time. */
Rtc.time t = Rtc.read_rtc_time(); Rtc.time t = Rtc.read_rtc_time();
Klog.writefln("System time is 20%02u-%02u-%02u %02u:%02u:%02u", Klog.writefln("System time is 20%02u-%02u-%02u %02u:%02u:%02u",