* Searches for TableName in PathPatched dirs and loads it * to Buffer if found. Buffer is allocated here and should be released * by caller. */
| 2272 | * by caller. |
| 2273 | */ |
| 2274 | EFI_STATUS LoadAcpiTable ( |
| 2275 | CONST CHAR16 *PathPatched, |
| 2276 | CONST CHAR16 *TableName, |
| 2277 | UINT8 **Buffer, |
| 2278 | UINTN *BufferLen |
| 2279 | ) |
| 2280 | { |
| 2281 | EFI_STATUS Status; |
| 2282 | |
| 2283 | Status = EFI_NOT_FOUND; |
| 2284 | |
| 2285 | // checking \EFI\ACPI\patched dir |
| 2286 | XStringW TmpStr = SWPrintf("%ls\\%ls", PathPatched, TableName); |
| 2287 | if (FileExists(SelfRootDir, TmpStr)) { |
| 2288 | DBG("found %ls\n", TmpStr.wc_str()); |
| 2289 | Status = egLoadFile(SelfRootDir, TmpStr.wc_str(), Buffer, BufferLen); |
| 2290 | } |
| 2291 | return Status; |
| 2292 | } |
| 2293 | |
| 2294 | /** |
| 2295 | * Searches for DSDT in AcpiOemPath or PathPatched dirs and inserts it |
no test coverage detected