diff options
author | Iru Cai <mytbk920423@gmail.com> | 2018-12-24 17:13:40 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2019-11-17 15:10:44 +0800 |
commit | 845aa6d730a767a188aa0f95fbdb4b93cc134d9c (patch) | |
tree | 4d0f831f5beb5596271bbdbe697065aa5738e13f | |
parent | b90299639e1e7c730b765ac24daf8296031b6d79 (diff) | |
download | coreboot-845aa6d730a767a188aa0f95fbdb4b93cc134d9c.tar.xz |
frag_fffa3fd4
-rw-r--r-- | src/northbridge/intel/haswell/do_raminit_frag.c | 15 | ||||
-rw-r--r-- | src/northbridge/intel/haswell/mrc.asm | 28 |
2 files changed, 19 insertions, 24 deletions
diff --git a/src/northbridge/intel/haswell/do_raminit_frag.c b/src/northbridge/intel/haswell/do_raminit_frag.c index 8cf59d2811..24bbd0d964 100644 --- a/src/northbridge/intel/haswell/do_raminit_frag.c +++ b/src/northbridge/intel/haswell/do_raminit_frag.c @@ -358,3 +358,18 @@ void frag_fffa54e7(int bootmode, struct pei_data *pd) } mrc_printk("System Agent: Done.\n"); } + +void frag_fffa3fd4(pei_raminit_ppi *ram_ppi); +void frag_fffa3fd4(pei_raminit_ppi *ram_ppi) +{ + int model = haswell_family_model(); + int stepping = haswell_stepping(); + + if (model == HASWELL_FAMILY_MOBILE && stepping == 1) { + write32((void*)(ram_ppi->ram_data->mchbar + 0x5434), 0x1060100); + } else { + uint32_t dmibar = ram_ppi->ram_data->dmibar; + write32((void*)(dmibar + 0x71c), ram_ppi->v); + write32((void*)(dmibar + 0x720), 0x1060100); + } +} diff --git a/src/northbridge/intel/haswell/mrc.asm b/src/northbridge/intel/haswell/mrc.asm index 8a370f5678..f3f209c999 100644 --- a/src/northbridge/intel/haswell/mrc.asm +++ b/src/northbridge/intel/haswell/mrc.asm @@ -160,6 +160,7 @@ extern frag_fffa3f8c global ref_fffcc8bc extern frag_fffa54e7 global ref_fffcc910 +extern frag_fffa3fd4 ;; mrc_wdt @@ -2910,31 +2911,10 @@ mov dword [ebp - 0x620], eax push eax call frag_fffa3f8c mov dword [ebp - 0x5e8], eax -add esp, 8 -loc_fffa3fd4: -mov ebx, dword [ebp - 0x628] -call haswell_family_model -mov esi, eax -call haswell_stepping -dec eax -sete dl -cmp esi, HASWELL_FAMILY_MOBILE -sete al -test dl, al -mov eax, dword [ebx + 1] -je short loc_fffa4009 ; je 0xfffa4009 -mov eax, dword [eax + 4] -mov dword [eax + 0x5434], 0x1060100 -jmp short loc_fffa4025 ; jmp 0xfffa4025 - -loc_fffa4009: -movzx edx, byte [ebx] -mov eax, dword [eax + 8] -mov dword [eax + 0x71c], edx -mov eax, dword [ebx + 1] -mov eax, dword [eax + 8] -mov dword [eax + 0x720], 0x1060100 +push ebx +call frag_fffa3fd4 +add esp, 12 loc_fffa4025: cmp dword [ebp - 0x648], HASWELL_FAMILY_GT3E |