diff options
author | Iru Cai <mytbk920423@gmail.com> | 2019-01-02 18:16:48 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2019-11-17 15:10:46 +0800 |
commit | cb60f8600402aced9667ea6ca6200cf964743e90 (patch) | |
tree | f810820e1da9147e8fe4605b1325031c1d21b215 /src | |
parent | 377052793c2ceb21247b608e38f5d6cfbb2970cc (diff) | |
download | coreboot-cb60f8600402aced9667ea6ca6200cf964743e90.tar.xz |
frag_usb_fffaf4b1
Diffstat (limited to 'src')
-rw-r--r-- | src/northbridge/intel/haswell/mrc_frags.c | 12 | ||||
-rw-r--r-- | src/northbridge/intel/haswell/pei_usb.asm | 25 |
2 files changed, 17 insertions, 20 deletions
diff --git a/src/northbridge/intel/haswell/mrc_frags.c b/src/northbridge/intel/haswell/mrc_frags.c index 4e7dd2728f..7f07e7cacd 100644 --- a/src/northbridge/intel/haswell/mrc_frags.c +++ b/src/northbridge/intel/haswell/mrc_frags.c @@ -803,6 +803,18 @@ void set_usb_overcurrent(PEI_USB *upd) } } +void frag_usb_fffaf4b1(PEI_USB *upd, int count); +void frag_usb_fffaf4b1(PEI_USB *upd, int count) +{ + u32 v = 0; + for (int i = 0; i < count; i++) { + if (upd->xhci_resume_info[3 + i] == 1) { + v |= (1 << i); + } + } + pci_update_config32(PCI_DEV(0, 0x14, 0), 0xd0, 0xffff8000, v); +} + void frag_usb_fffaf555(PEI_USB *upd, int count); void frag_usb_fffaf555(PEI_USB *upd, int count) { diff --git a/src/northbridge/intel/haswell/pei_usb.asm b/src/northbridge/intel/haswell/pei_usb.asm index c25952bf09..6d7297b77f 100644 --- a/src/northbridge/intel/haswell/pei_usb.asm +++ b/src/northbridge/intel/haswell/pei_usb.asm @@ -19,6 +19,7 @@ extern frag_usb_loop1 extern frag_usb_loop2 extern frag_usb_loop3 extern frag_usb_loop4 +extern frag_usb_fffaf4b1 extern frag_usb_fffaf555 mrc_init_usb: @@ -390,26 +391,10 @@ push ebx call frag_usb_loop4 add esp, 12 -loc_fffaf4b1: -xor eax, eax -xor ecx, ecx - -loc_fffaf4b5: -mov edx, dword [ebp - 0x30] -cmp byte [edx + ecx + 0x58], 1 -jne short loc_fffaf4c8 ; jne 0xfffaf4c8 -mov edx, 1 -shl edx, cl -or eax, edx - -loc_fffaf4c8: -inc ecx -cmp ecx, dword [ebp - 0x38] -jb short loc_fffaf4b5 ; jb 0xfffaf4b5 -mov edx, dword [edi + 0xa00d0] -and edx, 0xffff8000 -or edx, eax -mov dword [edi + 0xa00d0], edx +push dword [ebp - 0x38] +push dword [ebp - 0x30] +call frag_usb_fffaf4b1 +add esp, 8 push dword [ebp - 0x54] push dword [ebp - 0x38] |