diff options
author | Iru Cai <mytbk920423@gmail.com> | 2019-01-01 11:15:39 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2019-11-17 15:10:46 +0800 |
commit | 3e1bed74aa0b79128b3e226a0093467d5b45121e (patch) | |
tree | f12b5f8db00d0a07425a3787889f869b4a5bf77c /src | |
parent | 592d4c23edd510ec304788fefa715958840abcc7 (diff) | |
download | coreboot-3e1bed74aa0b79128b3e226a0093467d5b45121e.tar.xz |
frag_usb_fffaecbe
Diffstat (limited to 'src')
-rw-r--r-- | src/northbridge/intel/haswell/mrc_frags.c | 13 | ||||
-rw-r--r-- | src/northbridge/intel/haswell/pei_usb.asm | 46 |
2 files changed, 15 insertions, 44 deletions
diff --git a/src/northbridge/intel/haswell/mrc_frags.c b/src/northbridge/intel/haswell/mrc_frags.c index 6e4e4ae572..57acdce1fa 100644 --- a/src/northbridge/intel/haswell/mrc_frags.c +++ b/src/northbridge/intel/haswell/mrc_frags.c @@ -7,6 +7,7 @@ #include "mrc_pei.h" #include "mrc_sku.h" #include <cpu/intel/haswell/haswell.h> +#include "mrc_pch.h" void frag_fffa0ff3(void); void frag_fffa0ff3(void) @@ -388,3 +389,15 @@ void xhci_setup_ss_route(void) tmp = pci_read_config32(PCI_DEV(0, 0x14, 0), 0xd4) & 0x7fff; pci_update_config32(PCI_DEV(0, 0x14, 0), 0xd0, 0xffff8000, tmp); /* USB2 Port Routing */ } + +void frag_usb_fffaecbe(void); +void frag_usb_fffaecbe(void) +{ + pch_iobp_update(0xe5007f04, 0, 0x4481); + for (int i = 0; i < nb_usb2_ports(); i++) + pch_iobp_update(0xe500410f + (i << 8), 0xfffffffe, 0); + + pch_iobp_update(0xe5007f14, ~0, 0x180000); + if (mrc_sku_type() == 2) + pch_iobp_update(0xe5007f02, 0xff3fffff, 0); +} diff --git a/src/northbridge/intel/haswell/pei_usb.asm b/src/northbridge/intel/haswell/pei_usb.asm index 80c4913012..efe2156995 100644 --- a/src/northbridge/intel/haswell/pei_usb.asm +++ b/src/northbridge/intel/haswell/pei_usb.asm @@ -10,6 +10,7 @@ extern ref_fffcb998 extern ref_fffcb99c extern ref_fffcc988 extern xhci_setup_ss_route +extern frag_usb_fffaecbe mrc_init_usb: push ebp @@ -225,50 +226,7 @@ cmp cl, byte [eax + ref_fffcb998] ; cmp cl, byte [eax - 0x34668] jb loc_fffaeb37 ; jb 0xfffaeb37 loc_fffaecbe: -sub esp, 0xc -xor ecx, ecx -push 0x4481 -mov edx, 0xe5007f04 -mov eax, dword [ebp - 0x44] -call mrc_pch_iobp_update -xor esi, esi -add esp, 0x10 -jmp short loc_fffaed00 ; jmp 0xfffaed00 - -loc_fffaecdc: -mov edx, esi -sub esp, 0xc -movzx eax, dl -mov ecx, 0xfffffffe -shl eax, 8 -inc esi -push 0 -lea edx, [eax - 0x1affbef1] -mov eax, dword [ebp - 0x44] -call mrc_pch_iobp_update -add esp, 0x10 - -loc_fffaed00: -call nb_usb2_ports -mov ecx, esi -cmp cl, al -jb short loc_fffaecdc ; jb 0xfffaecdc -sub esp, 0xc -or ecx, 0xffffffff -push 0x180000 -mov edx, 0xe5007f14 -mov eax, dword [ebp - 0x44] -call mrc_pch_iobp_update -add esp, 0x10 -cmp dword [ebp - 0x60], 2 -jne short loc_fffaed46 ; jne 0xfffaed46 -sub esp, 0xc -mov ecx, 0xff3fffff -push 0 -mov edx, 0xe5007f02 -mov eax, dword [ebp - 0x44] -call mrc_pch_iobp_update -add esp, 0x10 +call frag_usb_fffaecbe loc_fffaed46: mov eax, dword [ebp - 0x30] |