| 4285 | } |
| 4286 | |
| 4287 | static void getACPISettings(const TagDict *CfgDict) |
| 4288 | { |
| 4289 | const TagDict* ACPIDict = CfgDict->dictPropertyForKey("ACPI"); |
| 4290 | if (ACPIDict) { |
| 4291 | const TagArray* DropTablesArray = ACPIDict->arrayPropertyForKey("DropTables"); // array of dict |
| 4292 | if (DropTablesArray) { |
| 4293 | INTN i; |
| 4294 | INTN Count = DropTablesArray->arrayContent().size(); |
| 4295 | BOOLEAN Dropped; |
| 4296 | |
| 4297 | if (Count > 0) { |
| 4298 | DBG("Dropping %lld tables:\n", Count); |
| 4299 | |
| 4300 | for (i = 0; i < Count; i++) { |
| 4301 | UINT32 Signature = 0; |
| 4302 | UINT32 TabLength = 0; |
| 4303 | UINT64 TableId = 0; |
| 4304 | BOOLEAN OtherOS = FALSE; |
| 4305 | |
| 4306 | const TagDict* Dict2 = DropTablesArray->dictElementAt(i, "ACPI/DropTables"_XS8); |
| 4307 | |
| 4308 | DBG(" - [%02lld]: Drop table ", i); |
| 4309 | // Get the table signatures to drop |
| 4310 | const TagStruct* Prop2 = Dict2->propertyForKey("Signature"); |
| 4311 | if (Prop2 && (Prop2->isString()) && Prop2->getString()->stringValue().notEmpty()) { |
| 4312 | CHAR8 s1 = 0, s2 = 0, s3 = 0, s4 = 0; |
| 4313 | const CHAR8 *str = Prop2->getString()->stringValue().c_str(); |
| 4314 | if (*str) { |
| 4315 | s1 = *str++; |
| 4316 | } |
| 4317 | if (*str) { |
| 4318 | s2 = *str++; |
| 4319 | } |
| 4320 | if (*str) { |
| 4321 | s3 = *str++; |
| 4322 | } |
| 4323 | if (*str) { |
| 4324 | s4 = *str++; |
| 4325 | } |
| 4326 | Signature = SIGNATURE_32(s1, s2, s3, s4); |
| 4327 | DBG(" signature=\"%c%c%c%c\" (%8.8X)\n", s1, s2, s3, s4, Signature); |
| 4328 | } |
| 4329 | // Get the table ids to drop |
| 4330 | Prop2 = Dict2->propertyForKey("TableId"); |
| 4331 | if (Prop2 != NULL) { |
| 4332 | if ( !Prop2->isString() ) { |
| 4333 | MsgLog("ATTENTION : property not string in TableId\n"); |
| 4334 | }else{ |
| 4335 | UINTN IdIndex = 0; |
| 4336 | CHAR8 Id[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; |
| 4337 | const CHAR8 *Str = Prop2->getString()->stringValue().c_str(); |
| 4338 | if (Str) { |
| 4339 | while (*Str && (IdIndex < 8)) { |
| 4340 | // DBG("%c", *Str); |
| 4341 | Id[IdIndex++] = *Str++; |
| 4342 | } |
| 4343 | } |
| 4344 |
no test coverage detected