summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2018-12-25 21:28:25 +0800
committerIru Cai <mytbk920423@gmail.com>2019-11-17 15:10:45 +0800
commit33044df45cdc31f3f711dbae0605e07f76e860e4 (patch)
tree486f0c11d9aee1aa5d4ff34086d85121929ccfb3
parent9091a00f801b13893db3a24fa179ae81a80ff8a0 (diff)
downloadcoreboot-33044df45cdc31f3f711dbae0605e07f76e860e4.tar.xz
frag_fffc1d5a
-rw-r--r--src/northbridge/intel/haswell/mrc_frag_init_memory.c16
-rw-r--r--src/northbridge/intel/haswell/mrc_init_memory.asm27
2 files changed, 21 insertions, 22 deletions
diff --git a/src/northbridge/intel/haswell/mrc_frag_init_memory.c b/src/northbridge/intel/haswell/mrc_frag_init_memory.c
index 8acfba9027..c253961748 100644
--- a/src/northbridge/intel/haswell/mrc_frag_init_memory.c
+++ b/src/northbridge/intel/haswell/mrc_frag_init_memory.c
@@ -144,3 +144,19 @@ void * frag_fffc1f53(uint32_t *wb)
*wb = tmp;
return hob;
}
+
+int frag_fffc1d5a(void *ppi, int t, void* dst);
+int frag_fffc1d5a(void *ppi, int t, void* dst)
+{
+ void * esi = *(void**)(ppi + 0x15);
+ if (esi == NULL)
+ return 0;
+ if (t == 4)
+ return 0;
+
+ if (crc32(esi + 4, 0xfd0) != *(uint32_t*)esi)
+ return 0;
+
+ memcpy(dst, esi, 0xfd4);
+ return 1;
+}
diff --git a/src/northbridge/intel/haswell/mrc_init_memory.asm b/src/northbridge/intel/haswell/mrc_init_memory.asm
index 797bbcfb9f..723ac59ea3 100644
--- a/src/northbridge/intel/haswell/mrc_init_memory.asm
+++ b/src/northbridge/intel/haswell/mrc_init_memory.asm
@@ -77,8 +77,8 @@ extern frag_fffc1c07
extern set_cpuid
extern test_memory
extern frag_fffc1f53
-extern crc32
global initialize_txt
+extern frag_fffc1d5a
initialize_txt:
push ebx
@@ -170,31 +170,14 @@ mov dword [ebp - 0x50c4], eax
loc_fffc1d5a:
lea eax, [ebp - 0x5094]
-xor ebx, ebx
call fcn_fffa9196 ; call 0xfffa9196
-mov eax, dword [ebp - 0x50a4]
-mov esi, dword [eax + 0x15]
-test esi, esi
-je short loc_fffc1dac ; je 0xfffc1dac
-cmp dword [ebp - 0x509c], 4
-je short loc_fffc1dac ; je 0xfffc1dac
-lea eax, [esi + 4]
-mov edx, 0xfd0
-call crc32
-cmp eax, dword [esi]
-jne short loc_fffc1dac ; jne 0xfffc1dac
-mov edx, dword [ebp - 0x50bc]
-push ebx
-mov bl, 1
-mov eax, dword [edx]
lea edx, [ebp - 0x5036]
-push 0xfd4
-push esi
push edx
-call dword [eax + 0x50] ; CopyMem
-add esp, 0x10
+push dword [ebp - 0x509c]
+push dword [ebp - 0x50a4] ; memory init ppi
+call frag_fffc1d5a
+add esp, 12
-loc_fffc1dac:
cmp dword [ebp - 0x509c], 0x11
jne short loc_fffc1dc2 ; jne 0xfffc1dc2
test bl, bl