mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-26 12:05:36 +01:00
dont check SB twice, advance index in cycle
Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
parent
1f01128be7
commit
85906d7816
@ -1374,11 +1374,12 @@ UINT32 CorrectOuterMethod (UINT8 *dsdt, UINT32 len, UINT32 adr, INT32 shift)
|
|||||||
//return final length of dsdt
|
//return final length of dsdt
|
||||||
UINT32 CorrectOuters (UINT8 *dsdt, UINT32 len, UINT32 adr, INT32 shift)
|
UINT32 CorrectOuters (UINT8 *dsdt, UINT32 len, UINT32 adr, INT32 shift)
|
||||||
{
|
{
|
||||||
INT32 i, j, k;
|
INT32 i, k;
|
||||||
|
// INT32 j;
|
||||||
UINT32 size = 0;
|
UINT32 size = 0;
|
||||||
INT32 offset = 0;
|
INT32 offset = 0;
|
||||||
UINT32 SBSIZE = 0, SBADR = 0;
|
// UINT32 SBSIZE = 0, SBADR = 0;
|
||||||
BOOLEAN SBFound = FALSE;
|
// BOOLEAN SBFound = FALSE;
|
||||||
|
|
||||||
if (shift == 0) {
|
if (shift == 0) {
|
||||||
return len;
|
return len;
|
||||||
@ -1406,7 +1407,7 @@ UINT32 CorrectOuters (UINT8 *dsdt, UINT32 len, UINT32 adr, INT32 shift)
|
|||||||
} //else not a device
|
} //else not a device
|
||||||
// check scope _SB_
|
// check scope _SB_
|
||||||
// a problem 45 43 4F 4E 08 10 84 10 05 5F 53 42 5F
|
// a problem 45 43 4F 4E 08 10 84 10 05 5F 53 42 5F
|
||||||
SBSIZE = 0;
|
/* SBSIZE = 0;
|
||||||
if (dsdt[i] == '_' && dsdt[i+1] == 'S' && dsdt[i+2] == 'B' && dsdt[i+3] == '_') {
|
if (dsdt[i] == '_' && dsdt[i+1] == 'S' && dsdt[i+2] == 'B' && dsdt[i+3] == '_') {
|
||||||
for (j=0; j<10; j++) {
|
for (j=0; j<10; j++) {
|
||||||
if (dsdt[i-j] != 0x10) {
|
if (dsdt[i-j] != 0x10) {
|
||||||
@ -1433,9 +1434,13 @@ UINT32 CorrectOuters (UINT8 *dsdt, UINT32 len, UINT32 adr, INT32 shift)
|
|||||||
} //else not a scope
|
} //else not a scope
|
||||||
if (SBFound) {
|
if (SBFound) {
|
||||||
break;
|
break;
|
||||||
}
|
} */
|
||||||
|
if (k == 0) {
|
||||||
|
i--;
|
||||||
|
} else {
|
||||||
i = k - 3; //if found then search again from found
|
i = k - 3; //if found then search again from found
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user