multiboot2: Fix bug where old ACPI tag would not get passed if RSDP rev == 0

This commit is contained in:
mintsuki 2022-08-12 23:33:28 +02:00
parent 656d853a3a
commit 93f8d011ff
2 changed files with 15 additions and 1 deletions

View File

@ -43,7 +43,7 @@ void *acpi_get_rsdp_v1(void) {
// revision, return it.
struct rsdp *rsdp = acpi_get_rsdp();
if (rsdp != NULL && rsdp->rev == 1)
if (rsdp != NULL && rsdp->rev < 2)
return rsdp;
return NULL;

View File

@ -45,6 +45,20 @@ void multiboot2_main(uint32_t magic, struct multiboot_info* mb_info_addr) {
break;
}
case MULTIBOOT_TAG_TYPE_ACPI_OLD: {
struct multiboot_tag_old_acpi *old_acpi = (struct multiboot_tag_old_acpi *)tag;
e9_printf("\t acpi_old:");
e9_printf("\t\t rsdp=%s", old_acpi->rsdp);
break;
}
case MULTIBOOT_TAG_TYPE_ACPI_NEW: {
struct multiboot_tag_new_acpi *new_acpi = (struct multiboot_tag_new_acpi *)tag;
e9_printf("\t acpi_new:");
e9_printf("\t\t rsdp=%s", new_acpi->rsdp);
break;
}
case MULTIBOOT_TAG_TYPE_MODULE: {
struct multiboot_tag_module *module = (struct multiboot_tag_module *)tag;
e9_printf("\t module:");