Rename Hurl to hurl for consistency
This commit is contained in:
parent
edbe33bcfa
commit
41531cf4d2
@ -58,7 +58,7 @@ struct acpi
|
|||||||
public static void initialize(ulong acpi_xsdt_phys)
|
public static void initialize(ulong acpi_xsdt_phys)
|
||||||
{
|
{
|
||||||
/* Map the XSDT header. */
|
/* Map the XSDT header. */
|
||||||
Hurl.map_range(acpi_xsdt_phys, Xsdt.sizeof, 0u);
|
hurl.map_range(acpi_xsdt_phys, Xsdt.sizeof, 0u);
|
||||||
const(Xsdt) * xsdt = cast(const(Xsdt) *)acpi_xsdt_phys;
|
const(Xsdt) * xsdt = cast(const(Xsdt) *)acpi_xsdt_phys;
|
||||||
if (xsdt.header.signature != XSDT_SIGNATURE)
|
if (xsdt.header.signature != XSDT_SIGNATURE)
|
||||||
{
|
{
|
||||||
@ -66,12 +66,12 @@ struct acpi
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* Map the entire XSDT. */
|
/* Map the entire XSDT. */
|
||||||
Hurl.map_range(acpi_xsdt_phys, xsdt.header.length, 0u);
|
hurl.map_range(acpi_xsdt_phys, xsdt.header.length, 0u);
|
||||||
size_t n_entries = (xsdt.header.length - xsdt.header.sizeof) / xsdt.tables[0].sizeof;
|
size_t n_entries = (xsdt.header.length - xsdt.header.sizeof) / xsdt.tables[0].sizeof;
|
||||||
for (size_t i = 0u; i < n_entries; i++)
|
for (size_t i = 0u; i < n_entries; i++)
|
||||||
{
|
{
|
||||||
ulong address = xsdt.tables[i];
|
ulong address = xsdt.tables[i];
|
||||||
Hurl.map_range(address, 4u, 0u);
|
hurl.map_range(address, 4u, 0u);
|
||||||
uint signature = *cast(const(uint) *)address;
|
uint signature = *cast(const(uint) *)address;
|
||||||
if (signature == APIC_SIGNATURE)
|
if (signature == APIC_SIGNATURE)
|
||||||
{
|
{
|
||||||
@ -83,7 +83,7 @@ struct acpi
|
|||||||
private static parse_apic_table(ulong address)
|
private static parse_apic_table(ulong address)
|
||||||
{
|
{
|
||||||
const(MadtHeader) * madt_header = cast(const(MadtHeader) *)address;
|
const(MadtHeader) * madt_header = cast(const(MadtHeader) *)address;
|
||||||
Hurl.map_range(address, madt_header.length, 0u);
|
hurl.map_range(address, madt_header.length, 0u);
|
||||||
apic_address = madt_header.local_apic_address;
|
apic_address = madt_header.local_apic_address;
|
||||||
klog.writefln("Found 32-bit APIC address: 0x%x", apic_address);
|
klog.writefln("Found 32-bit APIC address: 0x%x", apic_address);
|
||||||
const(void) * madt_end = cast(const(void) *)(address + madt_header.length);
|
const(void) * madt_end = cast(const(void) *)(address + madt_header.length);
|
||||||
|
@ -61,7 +61,7 @@ struct apic
|
|||||||
{
|
{
|
||||||
ApicRegisters * apic_registers =
|
ApicRegisters * apic_registers =
|
||||||
cast(ApicRegisters *)acpi.apic_address;
|
cast(ApicRegisters *)acpi.apic_address;
|
||||||
Hurl.map(cast(ulong)apic_registers, cast(ulong)apic_registers,
|
hurl.map(cast(ulong)apic_registers, cast(ulong)apic_registers,
|
||||||
MAP_WRITABLE | MAP_WRITE_THROUGH | MAP_DISABLE_CACHE | MAP_NO_EXECUTE);
|
MAP_WRITABLE | MAP_WRITE_THROUGH | MAP_DISABLE_CACHE | MAP_NO_EXECUTE);
|
||||||
klog.writefln("LAPIC ID: 0x%08x", apic_registers.lapic_id.read());
|
klog.writefln("LAPIC ID: 0x%08x", apic_registers.lapic_id.read());
|
||||||
klog.writefln("LAPIC version: 0x%08x", apic_registers.lapic_version.read());
|
klog.writefln("LAPIC version: 0x%08x", apic_registers.lapic_version.read());
|
||||||
|
@ -41,7 +41,7 @@ void hulk_start()
|
|||||||
cli();
|
cli();
|
||||||
gdt.initialize();
|
gdt.initialize();
|
||||||
idt.initialize();
|
idt.initialize();
|
||||||
Hurl.initialize();
|
hurl.initialize();
|
||||||
fb.initialize(cast(uint *)HULK_VIRTUAL_FRAMEBUFFER_ADDRESS, hulk_header.bootinfo.fb.width, hulk_header.bootinfo.fb.height, hulk_header.bootinfo.fb.stride);
|
fb.initialize(cast(uint *)HULK_VIRTUAL_FRAMEBUFFER_ADDRESS, hulk_header.bootinfo.fb.width, hulk_header.bootinfo.fb.height, hulk_header.bootinfo.fb.stride);
|
||||||
console.initialize();
|
console.initialize();
|
||||||
console.clear();
|
console.clear();
|
||||||
|
@ -30,7 +30,7 @@ enum ulong MAP_GLOBAL = 0x40u;
|
|||||||
enum ulong MAP_NO_EXECUTE = 0x8000_0000_0000_0000u;
|
enum ulong MAP_NO_EXECUTE = 0x8000_0000_0000_0000u;
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
struct Hurl
|
struct hurl
|
||||||
{
|
{
|
||||||
private struct PageTableEntry
|
private struct PageTableEntry
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user