mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-23 11:35:19 +01:00
check more Scope false search
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
parent
83205886bf
commit
f3c01aa9be
@ -30,10 +30,12 @@ set DEVSTAGE=
|
|||||||
set IASL_PREFIX=c:\ASL\
|
set IASL_PREFIX=c:\ASL\
|
||||||
|
|
||||||
set DEFAULT_CYGWIN_HOME=c:\cygwin
|
set DEFAULT_CYGWIN_HOME=c:\cygwin
|
||||||
set DEFAULT_PYTHONHOME=
|
rem set DEFAULT_PYTHONHOME=
|
||||||
rem d:\Program File\Python37"
|
rem d:\Program File\Python37"
|
||||||
set DEFAULT_PYTHON_FREEZER_PATH=%PYTHON_HOME%\Scripts
|
rem set DEFAULT_PYTHON_FREEZER_PATH=%PYTHON_HOME%\Scripts
|
||||||
set PYTHON3_ENABLE=FALSE
|
set "PYTHONHOME=d:\Program File\Python37"
|
||||||
|
set "PYTHON_FREEZER_PATH=%PYTHONHOME%\Scripts"
|
||||||
|
set PYTHON3_ENABLE=TRUE
|
||||||
set DEFAULT_NASM_PREFIX=
|
set DEFAULT_NASM_PREFIX=
|
||||||
rem C:\Program Files (x86)\NASM"
|
rem C:\Program Files (x86)\NASM"
|
||||||
rem # %DEFAULT_CYGWIN_HOME%\bin
|
rem # %DEFAULT_CYGWIN_HOME%\bin
|
||||||
|
@ -1375,11 +1375,11 @@ UINT32 CorrectOuterMethod (UINT8 *dsdt, UINT32 len, UINT32 adr, INT32 shift)
|
|||||||
UINT32 CorrectOuters (UINT8 *dsdt, UINT32 len, UINT32 adr, INT32 shift)
|
UINT32 CorrectOuters (UINT8 *dsdt, UINT32 len, UINT32 adr, INT32 shift)
|
||||||
{
|
{
|
||||||
INT32 i, k;
|
INT32 i, k;
|
||||||
// INT32 j;
|
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;
|
||||||
@ -1393,7 +1393,25 @@ UINT32 CorrectOuters (UINT8 *dsdt, UINT32 len, UINT32 adr, INT32 shift)
|
|||||||
k = i + 2;
|
k = i + 2;
|
||||||
} else if ((dsdt[i] == 0x10) && !CmpNum(dsdt, i, TRUE)) { //device scope like Scope (_PCI)
|
} else if ((dsdt[i] == 0x10) && !CmpNum(dsdt, i, TRUE)) { //device scope like Scope (_PCI)
|
||||||
//additional check for Field
|
//additional check for Field
|
||||||
if (!((dsdt[i - 2] == 0x5B) && (dsdt[i - 1] == 0x81))) {
|
// a problem with fields 52 4D 53 33 10 41 4D 45 4D
|
||||||
|
// 1. Search outer filed
|
||||||
|
// 2. check the size of the field
|
||||||
|
// 3. compare if we are in the filed
|
||||||
|
j = i - 1;
|
||||||
|
SBFound = TRUE;
|
||||||
|
while (j > 0x20) {
|
||||||
|
if (((dsdt[j - 1] == 0x5B) && (dsdt[j] == 0x81)) ||
|
||||||
|
((dsdt[j - 1] == 0x5B) && (dsdt[j] == 0x86))) { //we found a Field() or IndexField before the 0x10 will check what is it
|
||||||
|
size = get_size(dsdt, j + 1); // if it is not a size then size = 0
|
||||||
|
if (j + size >= i) {
|
||||||
|
// it is inside a Field, skip it
|
||||||
|
SBFound = FALSE;
|
||||||
|
}
|
||||||
|
break; // other field so we stop search
|
||||||
|
}
|
||||||
|
j--;
|
||||||
|
}
|
||||||
|
if (SBFound) {
|
||||||
k = i + 1;
|
k = i + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user