Skip to content

Commit

Permalink
exclude one more case of DSDT fix false
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
  • Loading branch information
SergeySlice committed Dec 27, 2019
1 parent 553c3c3 commit ba2c47c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rEFIt_UEFI/Platform/FixBiosDsdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,7 @@ UINT32 CorrectOuters (UINT8 *dsdt, UINT32 len, UINT32 adr, INT32 shift)
k = 0;
if ((dsdt[i] == 0x5B) && (dsdt[i+1] == 0x82) && !CmpNum(dsdt, i, TRUE)) { //device candidate
k = i + 2;
} else if ((dsdt[i] == 0x10) && !CmpNum(dsdt, i, TRUE)) { //device scope like Scope (_PCI)
} else if ((dsdt[i] == 0x10) && (dsdt[i-1] != 0x0A) && !CmpNum(dsdt, i, TRUE)) { //device scope like Scope (_PCI)
//additional check for Field
// a problem with fields 52 4D 53 33 10 41 4D 45 4D
// 1. Search outer filed
Expand All @@ -1401,6 +1401,7 @@ UINT32 CorrectOuters (UINT8 *dsdt, UINT32 len, UINT32 adr, INT32 shift)
SBFound = TRUE;
while (j > 0x20) {
if (((dsdt[j - 1] == 0x5B) && (dsdt[j] == 0x81)) ||
((dsdt[j - 1] == 0x5B) && (dsdt[j] == 0x82)) ||
((dsdt[j - 1] == 0x5B) && (dsdt[j] == 0x86))) { //we found a Field() or IndexField before the 0x10 will check what is it
size = (INT32)get_size(dsdt, j + 1); // if it is not a size then size = 0
if (j + size >= i) {
Expand Down

0 comments on commit ba2c47c

Please sign in to comment.