| 5214 | } |
| 5215 | |
| 5216 | BOOLEAN CmpFullName(UINT8* Table, UINTN Len, ACPI_NAME_LIST *Bridge) |
| 5217 | { |
| 5218 | // "RP02" NameLen=4 |
| 5219 | // "_SB_PCI0RP02" NameLen=12 |
| 5220 | |
| 5221 | UINTN NameLen = 0; |
| 5222 | INTN i = 0; |
| 5223 | CHAR8 *Name; |
| 5224 | while ((NameLen < Len) && isACPI_Char((CHAR8)Table[NameLen])) NameLen++; |
| 5225 | NameLen &= ~3; |
| 5226 | if (NameLen < 4) { |
| 5227 | return FALSE; |
| 5228 | } |
| 5229 | Name = (__typeof__(Name))AllocateCopyPool(NameLen + 1, Table); |
| 5230 | Name[NameLen] = '\0'; |
| 5231 | i = NameLen - 4; |
| 5232 | while (Bridge && (i >= 0)) { |
| 5233 | if (AsciiStrStr(Name + i, Bridge->Name) == NULL) { //compare Bridge->Name with RP02, Next->Name with PCI0 then _SB_ |
| 5234 | FreePool(Name); |
| 5235 | return FALSE; |
| 5236 | } |
| 5237 | i -= 4; |
| 5238 | Bridge = Bridge->Next; |
| 5239 | } |
| 5240 | FreePool(Name); |
| 5241 | return TRUE; |
| 5242 | } |
| 5243 | |
| 5244 | VOID RenameDevices(UINT8* table) |
| 5245 | { |
no test coverage detected