summaryrefslogtreecommitdiff
path: root/src/commonlib/fsp1_1_relocate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/commonlib/fsp1_1_relocate.c')
-rw-r--r--src/commonlib/fsp1_1_relocate.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/commonlib/fsp1_1_relocate.c b/src/commonlib/fsp1_1_relocate.c
index 7165d862c7..501c08d3c9 100644
--- a/src/commonlib/fsp1_1_relocate.c
+++ b/src/commonlib/fsp1_1_relocate.c
@@ -16,6 +16,20 @@
#include <console/console.h>
#include <commonlib/endian.h>
#include <commonlib/fsp1_1.h>
+/*
+ * Intel's code does not have a handle on changing global packing state.
+ * Therefore, one needs to protect against packing policies that are set
+ * globally for a compliation unit just by including a header file.
+ */
+#pragma pack(push)
+
+/* Default bind FSP 1.1 API to edk2 UEFI 2.4 types. */
+#include <vendorcode/intel/edk2/uefi_2.4/uefi_types.h>
+#include <vendorcode/intel/fsp/fsp1_1/IntelFspPkg/Include/FspInfoHeader.h>
+
+/* Restore original packing policy. */
+#pragma pack(pop)
+
#include <commonlib/helpers.h>
#include <stdlib.h>
#include <stdint.h>