summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2018-12-23 23:33:12 +0800
committerIru Cai <mytbk920423@gmail.com>2019-11-17 15:10:44 +0800
commit93e69d4121ca824d718675847c84e9a937e77a60 (patch)
tree74949162712bbe4c714955e2e25e4653ff81f19b /src
parentf910b63f74c59b2b0f967c5d9716e54413941891 (diff)
downloadcoreboot-93e69d4121ca824d718675847c84e9a937e77a60.tar.xz
frag_fffa3f8c
Diffstat (limited to 'src')
-rw-r--r--src/northbridge/intel/haswell/do_raminit_frag.c14
-rw-r--r--src/northbridge/intel/haswell/mrc.asm28
2 files changed, 15 insertions, 27 deletions
diff --git a/src/northbridge/intel/haswell/do_raminit_frag.c b/src/northbridge/intel/haswell/do_raminit_frag.c
index 1cf38e4037..4ce1221782 100644
--- a/src/northbridge/intel/haswell/do_raminit_frag.c
+++ b/src/northbridge/intel/haswell/do_raminit_frag.c
@@ -309,16 +309,22 @@ void* frag_fffa3eec(void *raminit_ppi)
*(uint8_t*)((void*)hob + 0x49) = 0;
}
return hob;
-#if 0
+}
+
+void* frag_fffa3f8c(void *hob);
+void* frag_fffa3f8c(void *hob)
+{
+ const EFI_PEI_SERVICES **pps = *gpPei;
void *ppi;
+
(*pps)->LocatePpi(pps, &ref_fffcc8bc, 0, NULL, &ppi);
- *(uint8_t*)((void*)hob + 0x20) = 2;
+ *(uint8_t*)(hob + 0x20) = 2;
void *p2 = *((void**)(ppi + 1));
- if (*(uint8_t*)p2 != 0x10) {
+ if ((*(uint8_t*)p2 & 0x10) != 0) {
void *p3 = *((void**)(ppi + 9));
void *p4 = *((void**)p3);
*(uint8_t*)((void*)hob + 0x21) = *(uint8_t*)(p4 + 0x301);
}
-#endif
+ return ppi;
}
diff --git a/src/northbridge/intel/haswell/mrc.asm b/src/northbridge/intel/haswell/mrc.asm
index 45c66d2cd2..964e693c57 100644
--- a/src/northbridge/intel/haswell/mrc.asm
+++ b/src/northbridge/intel/haswell/mrc.asm
@@ -156,6 +156,7 @@ extern load_usb
extern fill_pei_ram_data
extern mrc_set_bars
extern frag_fffa3eec
+extern frag_fffa3f8c
global ref_fffcc8bc
;; mrc_wdt
@@ -2903,30 +2904,11 @@ mov ebx, dword [ebp - 0x628]
push ebx
call frag_fffa3eec
mov dword [ebp - 0x620], eax
-pop ebx
-loc_fffa3f8c:
-mov ecx, dword [ebp - 0x640]
-sub esp, 0xc
-lea edx, [ebp - 0x5e8]
-mov eax, dword [ecx]
-push edx
-push 0
-push 0
-push ref_fffcc8bc ; push 0xfffcc8bc
-push ecx
-call dword [eax + 0x20] ; ucall
-mov eax, dword [ebp - 0x620]
-add esp, 0x20
-mov byte [eax + 0x20], 2
-mov edx, dword [ebp - 0x5e8]
-mov ecx, dword [edx + 1]
-test byte [ecx], 0x10
-je short loc_fffa3fd4 ; je 0xfffa3fd4
-mov edx, dword [edx + 9]
-mov edx, dword [edx]
-mov dl, byte [edx + 0x301]
-mov byte [eax + 0x21], dl
+push eax
+call frag_fffa3f8c
+mov dword [ebp - 0x5e8], eax
+add esp, 8
loc_fffa3fd4:
mov ebx, dword [ebp - 0x628]