the procedure search nearest "Device" code before given address should restrict the search by 6 bytes... OK, 10, .. until dsdt begin hmmm? will check device name
| 1551 | //should restrict the search by 6 bytes... OK, 10, .. until dsdt begin |
| 1552 | //hmmm? will check device name |
| 1553 | UINT32 devFind(UINT8 *dsdt, UINT32 address) |
| 1554 | { |
| 1555 | UINT32 k = address; |
| 1556 | INT32 size = 0; |
| 1557 | while (k > 30) { |
| 1558 | k--; |
| 1559 | if (dsdt[k] == 0x82 && dsdt[k-1] == 0x5B) { |
| 1560 | size = get_size(dsdt, k+1); |
| 1561 | if (!size) { |
| 1562 | continue; |
| 1563 | } |
| 1564 | if ((k + size + 1) > address) { |
| 1565 | return (k+1); //pointer to size |
| 1566 | } //else continue |
| 1567 | } |
| 1568 | } |
| 1569 | MsgLog("Device definition before adr=%X not found\n", address); |
| 1570 | return 0; //impossible value for fool proof |
| 1571 | } |
| 1572 | |
| 1573 | |
| 1574 | BOOLEAN CustProperties(AML_CHUNK* pack, UINT32 Dev) |
no test coverage detected