From bedfbf546b5f2706524c10121e7525bea52aa313 Mon Sep 17 00:00:00 2001 From: Shao Miller Date: Tue, 9 Mar 2010 17:13:26 -0500 Subject: memdisk: mBFT includes the MDI Instead of padding the mBFT so its size is correct, we actually put the MDI struct in there, since the last commit provided it. Signed-off-by: Shao Miller --- memdisk/mstructs.h | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/memdisk/mstructs.h b/memdisk/mstructs.h index 9e828185..b5f37225 100644 --- a/memdisk/mstructs.h +++ b/memdisk/mstructs.h @@ -27,6 +27,9 @@ typedef union { uint32_t uint32; } real_addr_t; +/* Forward declaration */ +struct mBFT; + MEMDISK_PACKED_PREFIX struct safe_hook { uint8_t jump[3]; /* Max. three bytes for jump */ @@ -50,18 +53,6 @@ struct memdisk_header { struct safe_hook safe_hook; }; -/* Requirement for struct acpi_description_header */ -#include "../memdisk/acpi.h" - -MEMDISK_PACKED_PREFIX -struct mBFT { - struct acpi_description_header acpi; - struct safe_hook *safe_hook; /* "Safe hook" physical address */ - /* An mBFT is 70 bytes in total */ - uint8_t _pad[70 - (sizeof(struct acpi_description_header) + - sizeof(uint32_t))]; -} MEMDISK_PACKED_POSTFIX; - MEMDISK_PACKED_PREFIX /* EDD disk parameter table */ struct edd_dpt { @@ -109,6 +100,16 @@ struct mdi { uint16_t dpt_ptr; } MEMDISK_PACKED_POSTFIX; +/* Requirement for struct acpi_description_header */ +#include "../memdisk/acpi.h" + +MEMDISK_PACKED_PREFIX +struct mBFT { + struct acpi_description_header acpi; + struct safe_hook *safe_hook; /* "Safe hook" physical address */ + struct mdi mdi; +} MEMDISK_PACKED_POSTFIX; + MEMDISK_PACKED_PREFIX struct patch_area { struct mdi mdi; -- cgit v1.2.1