summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2019-11-17 16:25:36 +0800
committerIru Cai <mytbk920423@gmail.com>2019-11-17 16:28:05 +0800
commit1069211fdc5caab44adfc54b07e8e33508d4d51f (patch)
treef2e58af152475043710140c6df6b24d49047ccbc
parent296979fbc1c8b473227560b12b6e421113655338 (diff)
downloadcoreboot-1069211fdc5caab44adfc54b07e8e33508d4d51f.tar.xz
fcn_fffa948c
-rw-r--r--src/northbridge/intel/haswell/mrc.asm43
-rw-r--r--src/northbridge/intel/haswell/mrc_misc.c20
-rw-r--r--src/northbridge/intel/haswell/mrc_misc.h1
3 files changed, 22 insertions, 42 deletions
diff --git a/src/northbridge/intel/haswell/mrc.asm b/src/northbridge/intel/haswell/mrc.asm
index 9407cc9e6e..4a6cffcd6c 100644
--- a/src/northbridge/intel/haswell/mrc.asm
+++ b/src/northbridge/intel/haswell/mrc.asm
@@ -224,6 +224,7 @@ extern frag_fffa58f7
extern wait_5030
extern wait_5084
global fcn_fffab1b6
+global ref_fffcb80c
;;
mrc_entry:
@@ -6279,48 +6280,6 @@ pop edi
pop ebp
ret
-fcn_fffa948c: ; not directly referenced
-push ebp
-xor edx, edx
-mov ebp, esp
-push edi
-push esi
-push ebx
-push ecx
-mov eax, dword [ebp + 8]
-add eax, 0x14
-
-loc_fffa949b: ; not directly referenced
-lea ecx, [edx*4 + ref_fffcb80c] ; lea ecx, [edx*4 - 0x347f4]
-mov dword [ebp - 0x10], ecx
-movzx ecx, word [edx*4 + ref_fffcb80c] ; movzx ecx, word [edx*4 - 0x347f4]
-sub ecx, eax
-jmp short loc_fffa94c1 ; jmp 0xfffa94c1
-
-loc_fffa94b1: ; not directly referenced
-mov edi, dword [ebp + 8]
-mov esi, dword [eax]
-add eax, 4
-add ebx, dword [edi + 0x103f]
-mov dword [ebx], esi
-
-loc_fffa94c1: ; not directly referenced
-mov edi, dword [ebp - 0x10]
-lea ebx, [eax + ecx]
-movzx esi, word [edi + 2]
-cmp ebx, esi
-jbe short loc_fffa94b1 ; jbe 0xfffa94b1
-inc edx
-cmp edx, 0x5d
-jne short loc_fffa949b ; jne 0xfffa949b
-pop edx
-xor eax, eax
-pop ebx
-pop esi
-pop edi
-pop ebp
-ret
-
fcn_fffa94dd: ; not directly referenced
push ebp
xor eax, eax
diff --git a/src/northbridge/intel/haswell/mrc_misc.c b/src/northbridge/intel/haswell/mrc_misc.c
index f2ae37ec4a..0adf671d38 100644
--- a/src/northbridge/intel/haswell/mrc_misc.c
+++ b/src/northbridge/intel/haswell/mrc_misc.c
@@ -1661,3 +1661,23 @@ int fcn_fffa7e78(void *ramdata)
fcn_fffab1b6(ramdata);
return 0;
}
+
+extern uint16_t ref_fffcb80c[];
+
+int fcn_fffa948c(void *ramdata)
+{
+ PRINT_FUNC;
+
+ void *ptr = ramdata + 0x14;
+ for (int i = 0; i < 0x5d; i++) {
+ uint32_t start = ref_fffcb80c[i * 2];
+ uint32_t end = ref_fffcb80c[i * 2 + 1];
+
+ while (start <= end) {
+ MCHBAR32(start) = *(uint32_t*)(ptr);
+ ptr += 4;
+ start += 4;
+ }
+ }
+ return 0;
+}
diff --git a/src/northbridge/intel/haswell/mrc_misc.h b/src/northbridge/intel/haswell/mrc_misc.h
index 20a7c1a482..8cac26916b 100644
--- a/src/northbridge/intel/haswell/mrc_misc.h
+++ b/src/northbridge/intel/haswell/mrc_misc.h
@@ -59,3 +59,4 @@ int fcn_fffc7720(void *ramdata);
int MRCABI wait_5030(void *ramdata);
int MRCABI wait_5084(void *ramdata);
int fcn_fffa7e78(void *ramdata);
+int fcn_fffa948c(void *ramdata);