From 2275cff4886350d377e07eb3fc00b138f3b71d6d Mon Sep 17 00:00:00 2001 From: Iru Cai Date: Wed, 2 Jan 2019 16:24:03 +0800 Subject: frag_usb_fffaf555 --- src/northbridge/intel/haswell/mrc_frags.c | 12 ++++++++++++ src/northbridge/intel/haswell/pei_usb.asm | 26 +++++--------------------- 2 files changed, 17 insertions(+), 21 deletions(-) (limited to 'src/northbridge') diff --git a/src/northbridge/intel/haswell/mrc_frags.c b/src/northbridge/intel/haswell/mrc_frags.c index 40a3af53c2..bc2c34122b 100644 --- a/src/northbridge/intel/haswell/mrc_frags.c +++ b/src/northbridge/intel/haswell/mrc_frags.c @@ -800,6 +800,18 @@ void set_usb_overcurrent(PEI_USB *upd) } } +void frag_usb_fffaf555(PEI_USB *upd, int count); +void frag_usb_fffaf555(PEI_USB *upd, int count) +{ + u32 v = 0; + for (int i = 0; i < count; i++) { + if (upd->xhci_resume_info[0x11 + i] == 1) { + v |= (1 << i); + } + } + pci_update_config32(PCI_DEV(0, 0x14, 0), 0xd8, 0xffffffc0, v); +} + void frag_usb_fffaf75b(PEI_USB *upd); void frag_usb_fffaf75b(PEI_USB *upd) { diff --git a/src/northbridge/intel/haswell/pei_usb.asm b/src/northbridge/intel/haswell/pei_usb.asm index 2dcf7242fe..f7e2e1f4a6 100644 --- a/src/northbridge/intel/haswell/pei_usb.asm +++ b/src/northbridge/intel/haswell/pei_usb.asm @@ -20,6 +20,7 @@ extern frag_usb_loop1 extern frag_usb_loop2 extern frag_usb_loop3 extern frag_usb_loop4 +extern frag_usb_fffaf555 mrc_init_usb: push ebp @@ -502,28 +503,11 @@ push ebx call frag_usb_loop1 add esp, 12 -xor eax, eax -xor ecx, ecx -jmp short loc_fffaf555 ; jmp 0xfffaf555 - -loc_fffaf541: -mov edx, dword [ebp - 0x30] -cmp byte [edx + ecx + 0x66], 1 -jne short loc_fffaf554 ; jne 0xfffaf554 -mov edx, 1 -shl edx, cl -or eax, edx - -loc_fffaf554: -inc ecx +push dword [ebp - 0x34] +push dword [ebp - 0x30] +call frag_usb_fffaf555 +add esp, 8 -loc_fffaf555: -cmp ecx, dword [ebp - 0x34] -jne short loc_fffaf541 ; jne 0xfffaf541 -mov edx, dword [edi + 0xa00d8] -and edx, 0xffffffc0 -or edx, eax -mov dword [edi + 0xa00d8], edx mov ecx, dword [ebp - 0x34] lea ecx, [esi + ecx*4] mov dword [ebp - 0x2c], ecx -- cgit v1.2.3