/* ----------------------------------------------------------------------- *
*
* Copyright 2001-2009 H. Peter Anvin - All Rights Reserved
- * Copyright 2009 Intel Corporation; author: H. Peter Anvin
- * Portions copyright 2009 Shao Miller [El Torito code, mBFT, safe hook]
+ * Copyright 2009-2010 Intel Corporation; author: H. Peter Anvin
+ * Portions copyright 2009-2010 Shao Miller
+ * [El Torito code, mBFT, "safe hook"]
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* Re-fill the "safe hook" mBFT field with the physical address */
safe_hook->mBFT += (uint32_t)hptr;
- /* Complete the mBFT */
- {
- struct mBFT *mBFT = (struct mBFT *)safe_hook->mBFT;
-
- mBFT->acpi.signature[0] = 'm'; /* "mBFT" */
- mBFT->acpi.signature[1] = 'B';
- mBFT->acpi.signature[2] = 'F';
- mBFT->acpi.signature[3] = 'T';
- mBFT->safe_hook = (uint32_t)safe_hook;
- mBFT->acpi.checksum = -checksum_buf(mBFT, mBFT->acpi.length);
- }
-
/* Update various BIOS magic data areas (gotta love this shit) */
if (geometry->driveno & 0x80) {
}
}
+ /* Complete the mBFT */
+ {
+ struct mBFT *mBFT = (struct mBFT *)safe_hook->mBFT;
+
+ mBFT->acpi.signature[0] = 'm'; /* "mBFT" */
+ mBFT->acpi.signature[1] = 'B';
+ mBFT->acpi.signature[2] = 'F';
+ mBFT->acpi.signature[3] = 'T';
+ mBFT->safe_hook = (uint32_t)safe_hook;
+ mBFT->acpi.checksum = -checksum_buf(mBFT, mBFT->acpi.length);
+ }
+
/* Install the interrupt handlers */
printf("old: int13 = %08x int15 = %08x int1e = %08x\n",
rdz_32(BIOS_INT13), rdz_32(BIOS_INT15), rdz_32(BIOS_INT1E));