diff options
author | Luca Dariz <luca@orpolo.org> | 2023-05-21 22:49:18 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-05-21 22:54:53 +0200 |
commit | 54a4ca27230ae85bf75804d5d581ebf68e620cee (patch) | |
tree | a03eef368175363d1e546ca8252fdb282d0b4a32 /i386/i386at/acpi_parse_apic.c | |
parent | d9c47d8e829fbb6f15fdb3796776d78be1b082fc (diff) | |
download | gnumach-54a4ca27230ae85bf75804d5d581ebf68e620cee.tar.gz gnumach-54a4ca27230ae85bf75804d5d581ebf68e620cee.tar.bz2 gnumach-54a4ca27230ae85bf75804d5d581ebf68e620cee.zip |
x86_64: fix APIC initialization
* i386/i386at/acpi_parse_apic.c: use vm_offset_t instead of uint32_t
for vm addresses
* x86_64/Makefrag.am: support --enable-apic
Message-Id: <20230521204918.492957-1-luca@orpolo.org>
Diffstat (limited to 'i386/i386at/acpi_parse_apic.c')
-rw-r--r-- | i386/i386at/acpi_parse_apic.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/i386/i386at/acpi_parse_apic.c b/i386/i386at/acpi_parse_apic.c index 2680d0aa..27e3410d 100644 --- a/i386/i386at/acpi_parse_apic.c +++ b/i386/i386at/acpi_parse_apic.c @@ -370,20 +370,20 @@ static int acpi_apic_parse_table(struct acpi_apic *apic) { struct acpi_apic_dhdr *apic_entry = NULL; - uint32_t end = 0; + vm_offset_t end = 0; uint8_t numcpus = 1; /* Get the address of first APIC entry */ apic_entry = (struct acpi_apic_dhdr*) apic->entry; /* Get the end address of APIC table */ - end = (uint32_t) apic + apic->header.length; + end = (vm_offset_t) apic + apic->header.length; /* Initialize number of cpus */ numcpus = apic_get_numcpus(); /* Search in APIC entry. */ - while ((uint32_t)apic_entry < end) { + while ((vm_offset_t)apic_entry < end) { struct acpi_apic_lapic *lapic_entry; struct acpi_apic_ioapic *ioapic_entry; struct acpi_apic_irq_override *irq_override_entry; @@ -421,7 +421,7 @@ acpi_apic_parse_table(struct acpi_apic *apic) } /* Get next APIC entry. */ - apic_entry = (struct acpi_apic_dhdr*)((uint32_t) apic_entry + apic_entry = (struct acpi_apic_dhdr*)((vm_offset_t) apic_entry + apic_entry->length); /* Update number of cpus. */ |