diff options
author | Iru Cai <mytbk920423@gmail.com> | 2018-12-28 20:32:30 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2019-11-17 15:10:45 +0800 |
commit | ee1b57daf3516862be4aa06a032068c77b138cbd (patch) | |
tree | 287a9443ab2fcf6705e3ffc79b12ca89b492f0a7 /src | |
parent | 269acc24b69ed33f4748b11736167aada50e68ef (diff) | |
download | coreboot-ee1b57daf3516862be4aa06a032068c77b138cbd.tar.xz |
fcn_fffbd29a
Diffstat (limited to 'src')
-rw-r--r-- | src/northbridge/intel/haswell/mrc.asm | 54 | ||||
-rw-r--r-- | src/northbridge/intel/haswell/mrc_misc.c | 28 |
2 files changed, 31 insertions, 51 deletions
diff --git a/src/northbridge/intel/haswell/mrc.asm b/src/northbridge/intel/haswell/mrc.asm index 5d07d97a2a..79a260ba4f 100644 --- a/src/northbridge/intel/haswell/mrc.asm +++ b/src/northbridge/intel/haswell/mrc.asm @@ -185,6 +185,9 @@ extern frag_fffa1e83 extern frag_fffa9029 extern frag_fffba1df +;; misc +extern fcn_fffbd29a + ;; mrc_entry: @@ -32109,50 +32112,6 @@ pop ebx pop ebp ret -fcn_fffbd29a: ; not directly referenced -push ebp -mov ebp, esp -mov edx, dword [ebp + 0xc] -mov eax, dword [ebp + 0x10] -mov dl, byte [edx + 5] -shr dl, 3 -and edx, 7 -cmp dl, 4 -ja short loc_fffbd2fc ; ja 0xfffbd2fc -movzx edx, dl -jmp dword [edx*4 + ref_fffcbe3c] ; ujmp: jmp dword [edx*4 - 0x341c4] - -loc_fffbd2bb: ; not directly referenced -mov dword [eax + 0xd5], 0x1000 -jmp short loc_fffbd2d1 ; jmp 0xfffbd2d1 - -loc_fffbd2c7: ; not directly referenced -mov dword [eax + 0xd5], 0x2000 - -loc_fffbd2d1: ; not directly referenced -mov eax, 1 -jmp short loc_fffbd308 ; jmp 0xfffbd308 - -loc_fffbd2d8: ; not directly referenced -mov dword [eax + 0xd5], 0x4000 -jmp short loc_fffbd2d1 ; jmp 0xfffbd2d1 - -loc_fffbd2e4: ; not directly referenced -mov dword [eax + 0xd5], 0x8000 -jmp short loc_fffbd2d1 ; jmp 0xfffbd2d1 - -loc_fffbd2f0: ; not directly referenced -mov dword [eax + 0xd5], 0x10000 -jmp short loc_fffbd2d1 ; jmp 0xfffbd2d1 - -loc_fffbd2fc: ; not directly referenced -mov dword [eax + 0xd5], 0 -xor eax, eax - -loc_fffbd308: ; not directly referenced -pop ebp -ret - fcn_fffbd30a: ; not directly referenced push ebp mov ebp, esp @@ -49054,13 +49013,6 @@ dd 0x00000400 dd 0x00000800 dd 0x00001000 -ref_fffcbe3c: -dd loc_fffbd2bb -dd loc_fffbd2c7 -dd loc_fffbd2d8 -dd loc_fffbd2e4 -dd loc_fffbd2f0 - ref_fffcbe50: dd 0x04030201 dd 0x06000500 diff --git a/src/northbridge/intel/haswell/mrc_misc.c b/src/northbridge/intel/haswell/mrc_misc.c index 313fdf309e..4233c871ad 100644 --- a/src/northbridge/intel/haswell/mrc_misc.c +++ b/src/northbridge/intel/haswell/mrc_misc.c @@ -60,3 +60,31 @@ uint8_t __attribute((regparm(1))) pci_setup_bridge(uint8_t bus) } return (r == 0)?bus:r; } + +int fcn_fffbd29a(u32 a0, void * a1, void * a2); +int fcn_fffbd29a(u32 a0, void * a1, void * a2) +{ + u32 b1 = (*(u8*)(a1 + 5) >> 3) & 7; + u32 *wb = (u32*)(a2 + 0xd5); + + switch (b1) { + case 0: + *wb = 0x1000; + return 1; + case 1: + *wb = 0x2000; + return 1; + case 2: + *wb = 0x4000; + return 1; + case 3: + *wb = 0x8000; + return 1; + case 4: + *wb = 0x10000; + return 1; + default: + *wb = 0; + return 0; + } +} |