diff options
author | Iru Cai <mytbk920423@gmail.com> | 2019-01-02 16:46:05 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2019-11-17 15:10:46 +0800 |
commit | 377052793c2ceb21247b608e38f5d6cfbb2970cc (patch) | |
tree | 90925d64c1d569dc76b14902e71b68a526af789b /src | |
parent | 21f329b7a892d38326d4980d31b4ab16a86d4d53 (diff) | |
download | coreboot-377052793c2ceb21247b608e38f5d6cfbb2970cc.tar.xz |
add a one_more_loop argument for frag_usb_loop2
Diffstat (limited to 'src')
-rw-r--r-- | src/northbridge/intel/haswell/mrc_frags.c | 9 | ||||
-rw-r--r-- | src/northbridge/intel/haswell/pei_usb.asm | 28 |
2 files changed, 10 insertions, 27 deletions
diff --git a/src/northbridge/intel/haswell/mrc_frags.c b/src/northbridge/intel/haswell/mrc_frags.c index bc2c34122b..4e7dd2728f 100644 --- a/src/northbridge/intel/haswell/mrc_frags.c +++ b/src/northbridge/intel/haswell/mrc_frags.c @@ -715,10 +715,13 @@ void frag_usb_loop4(void *ebx, u32* esi, int count) } } -void frag_usb_loop2(void *ebx, u32 *esi, int count); -void frag_usb_loop2(void *ebx, u32 *esi, int count) +void frag_usb_loop2(void *ebx, u32 *esi, int count, int one_more_loop); +void frag_usb_loop2(void *ebx, u32 *esi, int count, int one_more_loop) { - for (int i = 0; i < count; i++) { + if (one_more_loop != 0) + one_more_loop = 1; + + for (int i = 0; i < count + one_more_loop; i++) { void *addr = ebx + esi[i]; u32 tmp = read32(addr); tmp &= 0xff01fffd; diff --git a/src/northbridge/intel/haswell/pei_usb.asm b/src/northbridge/intel/haswell/pei_usb.asm index b6f4489f2a..c25952bf09 100644 --- a/src/northbridge/intel/haswell/pei_usb.asm +++ b/src/northbridge/intel/haswell/pei_usb.asm @@ -317,24 +317,13 @@ mov eax, dword [edi + 0xa00d0] and eax, 0xffff8000 mov dword [edi + 0xa00d0], eax +push dword [ebp - 0x54] push dword [ebp - 0x38] push dword [ebp - 0x3c] push ebx call frag_usb_loop2 add esp, 12 -cmp dword [ebp - 0x54], 0 -je short loc_fffaf347 ; je 0xfffaf347 -mov eax, dword [ebp - 0x3c] -mov ecx, dword [ebp - 0x38] -mov edx, ebx -add edx, dword [eax + ecx*4] -mov eax, dword [edx] -and eax, 0xff01fffd -or eax, 0xfe0000 -mov dword [edx], eax - -loc_fffaf347: push dword [ebp - 0x34] push esi push ebx @@ -351,7 +340,7 @@ push ebx call frag_usb_loop4 add esp, 12 -loc_fffaf3af: +push 0 push dword [ebp - 0x34] push esi push ebx @@ -422,23 +411,13 @@ and edx, 0xffff8000 or edx, eax mov dword [edi + 0xa00d0], edx +push dword [ebp - 0x54] push dword [ebp - 0x38] push dword [ebp - 0x3c] push ebx call frag_usb_loop2 add esp, 12 -cmp dword [ebp - 0x54], 0 -je short loc_fffaf51e ; je 0xfffaf51e -mov ecx, dword [ebp - 0x3c] -mov edx, ebx -add edx, dword [ecx + eax*4] -mov eax, dword [edx] -and eax, 0xff01fffd -or eax, 0xfe0000 -mov dword [edx], eax - -loc_fffaf51e: push dword [ebp - 0x34] push esi push ebx @@ -456,6 +435,7 @@ push ebx call frag_usb_loop4 add esp, 12 +push 0 push dword [ebp - 0x34] push esi push ebx |