summaryrefslogtreecommitdiff
path: root/kernel/mboot/rsdp.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/mboot/rsdp.c')
-rw-r--r--kernel/mboot/rsdp.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/kernel/mboot/rsdp.c b/kernel/mboot/rsdp.c
index 48afff3..f20d986 100644
--- a/kernel/mboot/rsdp.c
+++ b/kernel/mboot/rsdp.c
@@ -3,21 +3,36 @@
#include "mboot.h"
+#define MULTIBOOT_TAG_TYPE_ACPI_OLD 14
+#define MULTIBOOT_TAG_TYPE_ACPI_NEW 15
+
+struct multiboot_tag_old_acpi {
+ uint32_t type;
+ uint32_t size;
+ uint8_t rsdp[];
+};
+
+struct multiboot_tag_new_acpi {
+ uint32_t type;
+ uint32_t size;
+ uint8_t rsdp[];
+};
+
void *mboot_get_rsdp(void)
{
void *tag;
// acpi 2.0
- tag = locate_mboot_table(MBOOT_NEW_RSDP);
+ tag = locate_mboot_table(MULTIBOOT_TAG_TYPE_ACPI_NEW);
if (tag != NULL) {
- struct mboot_tag_new_rsdp *rsdp = (struct mboot_tag_new_rsdp *)tag;
+ struct multiboot_tag_new_acpi *rsdp = (struct multiboot_tag_new_acpi *)tag;
return rsdp->rsdp;
}
// acpi 1.0
- tag = locate_mboot_table(MBOOT_OLD_RSDP);
+ tag = locate_mboot_table(MULTIBOOT_TAG_TYPE_ACPI_OLD);
if (tag != NULL) {
- struct mboot_tag_old_rsdp *rsdp = (struct mboot_tag_old_rsdp *)tag;
+ struct multiboot_tag_old_acpi *rsdp = (struct multiboot_tag_old_acpi *)tag;
return rsdp->rsdp;
}