summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2018-12-25 15:01:00 +0800
committerIru Cai <mytbk920423@gmail.com>2019-11-17 15:10:44 +0800
commitaf0889f801d3a8528c6e0c58496adaaa10c28c76 (patch)
treee6c938a9ae586b7f0911d2a1350e5babbc723385
parentfca49d0e9c0f7e8bd2c87af602ff1242716b3126 (diff)
downloadcoreboot-af0889f801d3a8528c6e0c58496adaaa10c28c76.tar.xz
frag_fffa47f0
-rw-r--r--src/northbridge/intel/haswell/do_raminit_frag.c11
-rw-r--r--src/northbridge/intel/haswell/mrc.asm20
2 files changed, 17 insertions, 14 deletions
diff --git a/src/northbridge/intel/haswell/do_raminit_frag.c b/src/northbridge/intel/haswell/do_raminit_frag.c
index 767936876b..7d9ebc0c33 100644
--- a/src/northbridge/intel/haswell/do_raminit_frag.c
+++ b/src/northbridge/intel/haswell/do_raminit_frag.c
@@ -689,3 +689,14 @@ loc_fffa4564:
}
return typ;
}
+
+uint32_t __attribute((regparm(3)))
+fcn_fffa0516(uint32_t mchbar, uint32_t a0, uint32_t a1, uint32_t a2);
+
+void frag_fffa47f0(uint32_t mchbar);
+void frag_fffa47f0(uint32_t mchbar)
+{
+ uint32_t tmp = fcn_fffa0516(mchbar, 0xc008018, 0x22, 0);
+ tmp = (tmp & 0xffffe1ff) | 0x0c00;
+ fcn_fffa0516(mchbar, 0xc008018, 0x23, tmp);
+}
diff --git a/src/northbridge/intel/haswell/mrc.asm b/src/northbridge/intel/haswell/mrc.asm
index ac2d79dd2a..7bc2d00dcc 100644
--- a/src/northbridge/intel/haswell/mrc.asm
+++ b/src/northbridge/intel/haswell/mrc.asm
@@ -164,6 +164,8 @@ global ref_fffcc910
extern frag_fffa3fd4
extern frag_fffa3a17
extern frag_fffa4507
+extern frag_fffa47f0
+global fcn_fffa0516
;; mrc_wdt
@@ -2685,21 +2687,11 @@ or eax, 0x600000
mov dword [ebx + 0x82c], eax
loc_fffa47f0:
-sub esp, 0xc
-mov ecx, 0x22
-push 0
-mov edx, 0xc008018
-mov eax, dword [ebp - 0x648]
-call fcn_fffa0516 ; call 0xfffa0516
-and ah, 0xe1
-mov ecx, 0x23
-or ah, 0xc
-mov edx, 0xc008018
-mov dword [esp], eax
-mov eax, dword [ebp - 0x648]
-call fcn_fffa0516 ; call 0xfffa0516
+push dword [ebp - 0x648]
+call frag_fffa47f0
+add esp, 4
+
mov esi, 0xc008018
-add esp, 0x10
mov byte [ebp - 0x65a], 0x23
mov byte [ebp - 0x659], 0x22
jmp short loc_fffa4853 ; jmp 0xfffa4853