MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / LoadAcpiTable

Function LoadAcpiTable

rEFIt_UEFI/Platform/AcpiPatcher.cpp:2274–2292  ·  view source on GitHub ↗

* Searches for TableName in PathPatched dirs and loads it * to Buffer if found. Buffer is allocated here and should be released * by caller. */

Source from the content-addressed store, hash-verified

2272 * by caller.
2273 */
2274EFI_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

Callers 2

LoadAndInjectDSDTFunction · 0.85
LoadAndInjectAcpiTableFunction · 0.85

Calls 4

SWPrintfFunction · 0.85
FileExistsFunction · 0.85
egLoadFileFunction · 0.85
wc_strMethod · 0.45

Tested by

no test coverage detected