Use vm_paddr_t rather than uintptr_t when passing the physical address of
APICs to lapic_init() and ioapic_create().
This commit is contained in:
parent
5e41bd2cd2
commit
aa7a005ee0
@ -336,7 +336,7 @@ madt_setup_local(void)
|
||||
{
|
||||
|
||||
madt = pmap_mapbios(madt_physaddr, madt_length);
|
||||
lapic_init((uintptr_t)madt->LocalApicAddress);
|
||||
lapic_init(madt->LocalApicAddress);
|
||||
printf("ACPI APIC Table: <%.*s %.*s>\n",
|
||||
(int)sizeof(madt->OemId), madt->OemId,
|
||||
(int)sizeof(madt->OemTableId), madt->OemTableId);
|
||||
@ -482,9 +482,8 @@ madt_parse_apics(APIC_HEADER *entry, void *arg __unused)
|
||||
if (ioapics[apic->IoApicId].io_apic != NULL)
|
||||
panic("%s: Double APIC ID %d", __func__,
|
||||
apic->IoApicId);
|
||||
ioapics[apic->IoApicId].io_apic = ioapic_create(
|
||||
(uintptr_t)apic->Address, apic->IoApicId,
|
||||
apic->Interrupt);
|
||||
ioapics[apic->IoApicId].io_apic = ioapic_create(apic->Address,
|
||||
apic->IoApicId, apic->Interrupt);
|
||||
ioapics[apic->IoApicId].io_vector = apic->Interrupt;
|
||||
break;
|
||||
default:
|
||||
|
@ -432,7 +432,7 @@ ioapic_resume(struct pic *pic)
|
||||
* Create a plain I/O APIC object.
|
||||
*/
|
||||
void *
|
||||
ioapic_create(uintptr_t addr, int32_t apic_id, int intbase)
|
||||
ioapic_create(vm_paddr_t addr, int32_t apic_id, int intbase)
|
||||
{
|
||||
struct ioapic *io;
|
||||
struct ioapic_intsrc *intpin;
|
||||
|
@ -205,7 +205,7 @@ lvt_mode(struct lapic *la, u_int pin, uint32_t value)
|
||||
* Map the local APIC and setup necessary interrupt vectors.
|
||||
*/
|
||||
void
|
||||
lapic_init(uintptr_t addr)
|
||||
lapic_init(vm_paddr_t addr)
|
||||
{
|
||||
|
||||
/* Map the local APIC and setup the spurious interrupt handler. */
|
||||
|
@ -323,7 +323,7 @@ mptable_setup_local(void)
|
||||
lapic_init(DEFAULT_APIC_BASE);
|
||||
printf("Default Configuration %d", mpfps->config_type);
|
||||
} else {
|
||||
lapic_init((uintptr_t)mpct->apic_address);
|
||||
lapic_init(mpct->apic_address);
|
||||
printf("%.*s %.*s", (int)sizeof(mpct->oem_id), mpct->oem_id,
|
||||
(int)sizeof(mpct->product_id), mpct->product_id);
|
||||
}
|
||||
@ -514,8 +514,8 @@ mptable_parse_apics_and_busses_handler(u_char *entry, void *arg __unused)
|
||||
if (ioapics[apic->apic_id] != NULL)
|
||||
panic("%s: Double APIC ID %d", __func__,
|
||||
apic->apic_id);
|
||||
ioapics[apic->apic_id] = ioapic_create(
|
||||
(uintptr_t)apic->apic_address, apic->apic_id, -1);
|
||||
ioapics[apic->apic_id] = ioapic_create(apic->apic_address,
|
||||
apic->apic_id, -1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -180,7 +180,7 @@ void apic_enable_vector(u_int vector);
|
||||
void apic_free_vector(u_int vector, u_int irq);
|
||||
u_int apic_idt_to_irq(u_int vector);
|
||||
void apic_register_enumerator(struct apic_enumerator *enumerator);
|
||||
void *ioapic_create(uintptr_t addr, int32_t id, int intbase);
|
||||
void *ioapic_create(vm_paddr_t addr, int32_t apic_id, int intbase);
|
||||
int ioapic_disable_pin(void *cookie, u_int pin);
|
||||
int ioapic_get_vector(void *cookie, u_int pin);
|
||||
void ioapic_register(void *cookie);
|
||||
@ -197,7 +197,7 @@ void lapic_disable(void);
|
||||
void lapic_dump(const char *str);
|
||||
void lapic_eoi(void);
|
||||
int lapic_id(void);
|
||||
void lapic_init(uintptr_t addr);
|
||||
void lapic_init(vm_paddr_t addr);
|
||||
int lapic_intr_pending(u_int vector);
|
||||
void lapic_ipi_raw(register_t icrlo, u_int dest);
|
||||
void lapic_ipi_vectored(u_int vector, int dest);
|
||||
|
@ -336,7 +336,7 @@ madt_setup_local(void)
|
||||
{
|
||||
|
||||
madt = pmap_mapbios(madt_physaddr, madt_length);
|
||||
lapic_init((uintptr_t)madt->LocalApicAddress);
|
||||
lapic_init(madt->LocalApicAddress);
|
||||
printf("ACPI APIC Table: <%.*s %.*s>\n",
|
||||
(int)sizeof(madt->OemId), madt->OemId,
|
||||
(int)sizeof(madt->OemTableId), madt->OemTableId);
|
||||
@ -481,9 +481,8 @@ madt_parse_apics(APIC_HEADER *entry, void *arg __unused)
|
||||
if (ioapics[apic->IoApicId].io_apic != NULL)
|
||||
panic("%s: Double APIC ID %d", __func__,
|
||||
apic->IoApicId);
|
||||
ioapics[apic->IoApicId].io_apic = ioapic_create(
|
||||
(uintptr_t)apic->Address, apic->IoApicId,
|
||||
apic->Interrupt);
|
||||
ioapics[apic->IoApicId].io_apic = ioapic_create(apic->Address,
|
||||
apic->IoApicId, apic->Interrupt);
|
||||
ioapics[apic->IoApicId].io_vector = apic->Interrupt;
|
||||
break;
|
||||
default:
|
||||
|
@ -432,7 +432,7 @@ ioapic_resume(struct pic *pic)
|
||||
* Create a plain I/O APIC object.
|
||||
*/
|
||||
void *
|
||||
ioapic_create(uintptr_t addr, int32_t apic_id, int intbase)
|
||||
ioapic_create(vm_paddr_t addr, int32_t apic_id, int intbase)
|
||||
{
|
||||
struct ioapic *io;
|
||||
struct ioapic_intsrc *intpin;
|
||||
|
@ -205,7 +205,7 @@ lvt_mode(struct lapic *la, u_int pin, uint32_t value)
|
||||
* Map the local APIC and setup necessary interrupt vectors.
|
||||
*/
|
||||
void
|
||||
lapic_init(uintptr_t addr)
|
||||
lapic_init(vm_paddr_t addr)
|
||||
{
|
||||
|
||||
/* Map the local APIC and setup the spurious interrupt handler. */
|
||||
|
@ -2937,7 +2937,7 @@ apic_register_enumerator(struct apic_enumerator *enumerator)
|
||||
}
|
||||
|
||||
void *
|
||||
ioapic_create(uintptr_t addr, int32_t id, int intbase)
|
||||
ioapic_create(vm_paddr_t addr, int32_t apic_id, int intbase)
|
||||
{
|
||||
return (NULL);
|
||||
}
|
||||
@ -2995,7 +2995,7 @@ lapic_create(u_int apic_id, int boot_cpu)
|
||||
}
|
||||
|
||||
void
|
||||
lapic_init(uintptr_t addr)
|
||||
lapic_init(vm_paddr_t addr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -328,7 +328,7 @@ mptable_setup_local(void)
|
||||
lapic_init(DEFAULT_APIC_BASE);
|
||||
printf("Default Configuration %d", mpfps->config_type);
|
||||
} else {
|
||||
lapic_init((uintptr_t)mpct->apic_address);
|
||||
lapic_init(mpct->apic_address);
|
||||
printf("%.*s %.*s", (int)sizeof(mpct->oem_id), mpct->oem_id,
|
||||
(int)sizeof(mpct->product_id), mpct->product_id);
|
||||
}
|
||||
@ -519,8 +519,8 @@ mptable_parse_apics_and_busses_handler(u_char *entry, void *arg __unused)
|
||||
if (ioapics[apic->apic_id] != NULL)
|
||||
panic("%s: Double APIC ID %d", __func__,
|
||||
apic->apic_id);
|
||||
ioapics[apic->apic_id] = ioapic_create(
|
||||
(uintptr_t)apic->apic_address, apic->apic_id, -1);
|
||||
ioapics[apic->apic_id] = ioapic_create(apic->apic_address,
|
||||
apic->apic_id, -1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -179,7 +179,7 @@ void apic_enable_vector(u_int vector);
|
||||
void apic_free_vector(u_int vector, u_int irq);
|
||||
u_int apic_idt_to_irq(u_int vector);
|
||||
void apic_register_enumerator(struct apic_enumerator *enumerator);
|
||||
void *ioapic_create(uintptr_t addr, int32_t id, int intbase);
|
||||
void *ioapic_create(vm_paddr_t addr, int32_t apic_id, int intbase);
|
||||
int ioapic_disable_pin(void *cookie, u_int pin);
|
||||
int ioapic_get_vector(void *cookie, u_int pin);
|
||||
void ioapic_register(void *cookie);
|
||||
@ -196,7 +196,7 @@ void lapic_disable(void);
|
||||
void lapic_dump(const char *str);
|
||||
void lapic_eoi(void);
|
||||
int lapic_id(void);
|
||||
void lapic_init(uintptr_t addr);
|
||||
void lapic_init(vm_paddr_t addr);
|
||||
int lapic_intr_pending(u_int vector);
|
||||
void lapic_ipi_raw(register_t icrlo, u_int dest);
|
||||
void lapic_ipi_vectored(u_int vector, int dest);
|
||||
|
Loading…
x
Reference in New Issue
Block a user