summaryrefslogtreecommitdiff
path: root/soc/intel/quark/QuarkFsp.patch
blob: fee548f515422a4f619a07057a070fd7a29ab0ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
diff --git a/BuildFsp2_0.sh b/BuildFsp2_0.sh
index 8910928..ca96446 100755
--- a/BuildFsp2_0.sh
+++ b/BuildFsp2_0.sh
@@ -22,7 +22,7 @@ PLATFORM_NAME=QuarkFsp2_0
 BIN_SUB_DIR=Fsp2_0
 FSP_PKG_CONF_NAME=QuarkFspPkgConfig
 FSP_PKG_EXT_CONF_NAME=QuarkFspPkgExtConfig
-TOOL_CHAIN=GCC48
+TOOL_CHAIN=COREBOOT
 Edksetup=edksetup.sh
 FSP_T_UPD_GUID=34686CA3-34F9-4901-B82A-BA630F0714C6
 FSP_M_UPD_GUID=39A250DB-E465-4DD1-A2AC-E2BD3C0E2385
diff --git a/BuildFsp2_0Pei.sh b/BuildFsp2_0Pei.sh
index 3f447e1..f266572 100755
--- a/BuildFsp2_0Pei.sh
+++ b/BuildFsp2_0Pei.sh
@@ -22,7 +22,7 @@ PLATFORM_NAME=QuarkFsp2_0Pei
 BIN_SUB_DIR=Fsp2_0Pei
 FSP_PKG_CONF_NAME=QuarkFspPkgConfig
 FSP_PKG_EXT_CONF_NAME=QuarkFspPkgExtConfig
-TOOL_CHAIN=GCC48
+TOOL_CHAIN=COREBOOT
 Edksetup=edksetup.sh
 FSP_T_UPD_GUID=34686CA3-34F9-4901-B82A-BA630F0714C6
 FSP_M_UPD_GUID=39A250DB-E465-4DD1-A2AC-E2BD3C0E2385
diff --git a/Library/Fsp2_0Lib/Peim.c b/Library/Fsp2_0Lib/Peim.c
index 14d0f99..c9a531a 100644
--- a/Library/Fsp2_0Lib/Peim.c
+++ b/Library/Fsp2_0Lib/Peim.c
@@ -13,6 +13,7 @@
 **/
 
 #include <PiPei.h>
+#include <Library/BaseMemoryLib.h>
 #include <Library/DebugLib.h>
 #include <Library/FspCommonLib.h>
 #include <Library/FspLib.h>
@@ -53,3 +54,17 @@ VOID FspInstallPeiMemory(EFI_PHYSICAL_ADDRESS FspReservedArea,
   Status = PeiServicesInstallPeiMemory (FspReservedArea, ReservedBytes);
   ASSERT_EFI_ERROR (Status);
 }
+
+#if !((defined(MDE_CPU_ARM) || defined(MDE_CPU_AARCH64)) && defined(__GNUC__))
+/** The memset function copies the value of c (converted to an unsigned char)
+    into each of the first n characters of the object pointed to by s.
+
+    @return   The memset function returns the value of s.
+**/
+void *
+memset(void *s, int c, size_t n)
+{
+  return SetMem( s, (UINTN)n, (UINT8)c);
+}
+#endif
+