diff --git a/include/minix/type.h b/include/minix/type.h index 97f59dfe7..c88d8de2e 100644 --- a/include/minix/type.h +++ b/include/minix/type.h @@ -127,6 +127,8 @@ struct machine { int padding; /* used to be protected */ int vdu_ega; int vdu_vga; + int apic_enabled; /* does the kernel use APIC or not? */ + phys_bytes acpi_rsdp; /* where is the acpi RSDP */ }; struct io_range diff --git a/kernel/arch/i386/acpi.c b/kernel/arch/i386/acpi.c index 5e58d764f..a3342214c 100644 --- a/kernel/arch/i386/acpi.c +++ b/kernel/arch/i386/acpi.c @@ -247,15 +247,19 @@ PRIVATE int get_acpi_rsdp(void) if (ebda) { ebda <<= 4; if(platform_tbl_ptr(ebda, ebda + 0x400, 16, &acpi_rsdp, - sizeof(acpi_rsdp), acpi_rsdp_test)) + sizeof(acpi_rsdp), &machine.acpi_rsdp, + acpi_rsdp_test)) return 1; } /* try BIOS read only mem space */ if(platform_tbl_ptr(0xE0000, 0x100000, 16, &acpi_rsdp, - sizeof(acpi_rsdp), acpi_rsdp_test)) + sizeof(acpi_rsdp), &machine.acpi_rsdp, + acpi_rsdp_test)) return 1; - + + machine.acpi_rsdp = 0; /* RSDP cannot be found at this address therefore + it is a valid negative value */ return 0; } diff --git a/kernel/arch/i386/memory.c b/kernel/arch/i386/memory.c index 51a6d121d..d1d08082c 100644 --- a/kernel/arch/i386/memory.c +++ b/kernel/arch/i386/memory.c @@ -1089,14 +1089,18 @@ PUBLIC int platform_tbl_ptr(phys_bytes start, unsigned increment, void * buff, unsigned size, + phys_bytes * phys_addr, int ((* cmp_f)(void *))) { phys_bytes addr; for (addr = start; addr < end; addr += increment) { phys_copy (addr, vir2phys(buff), size); - if (cmp_f(buff)) + if (cmp_f(buff)) { + if (phys_addr) + *phys_addr = addr; return 1; + } } return 0; } diff --git a/kernel/arch/i386/proto.h b/kernel/arch/i386/proto.h index 7fb05f1b3..aa92394cb 100644 --- a/kernel/arch/i386/proto.h +++ b/kernel/arch/i386/proto.h @@ -167,6 +167,7 @@ _PROTOTYPE(int platform_tbl_ptr, (phys_bytes start, unsigned increment, void * buff, unsigned size, + phys_bytes * phys_addr, int ((* cmp_f)(void *)))); /* breakpoints.c */