mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-12 09:54:36 +01:00
Display full path of acpi files in debug log.
This commit is contained in:
parent
92f0a22458
commit
dcd17ca8cd
@ -1 +1 @@
|
||||
Subproject commit 519672e7f7996f308d11c81c9438aa9c18ccaee4
|
||||
Subproject commit b0eecfb30d655f98cd709f417715e3686a9fd437
|
@ -1572,7 +1572,7 @@ void SaveOemDsdt(BOOLEAN FullPatch)
|
||||
}
|
||||
}
|
||||
|
||||
BOOLEAN LoadPatchedAML(CONST CHAR16* AcpiOemPath, CONST CHAR16* PartName, UINTN Pass)
|
||||
BOOLEAN LoadPatchedAML(const EFI_FILE& dir, const XStringW& acpiOemPath, CONST CHAR16* PartName, UINTN Pass)
|
||||
{
|
||||
// pass1 prefilter based on file names (optimization that avoids loading same files twice)
|
||||
UINTN Index = IGNORE_INDEX;
|
||||
@ -1589,7 +1589,7 @@ BOOLEAN LoadPatchedAML(CONST CHAR16* AcpiOemPath, CONST CHAR16* PartName, UINTN
|
||||
}
|
||||
UINT8 *buffer = NULL;
|
||||
UINTN bufferLen = 0;
|
||||
EFI_STATUS Status = egLoadFile(&selfOem.getOemDir(), SWPrintf("%ls\\%ls", AcpiOemPath, PartName).wc_str(), &buffer, &bufferLen);
|
||||
EFI_STATUS Status = egLoadFile(&dir, SWPrintf("%ls\\%ls", acpiOemPath.wc_str(), PartName).wc_str(), &buffer, &bufferLen);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
if (buffer) {
|
||||
EFI_ACPI_DESCRIPTION_HEADER* TableHeader = (EFI_ACPI_DESCRIPTION_HEADER*)buffer;
|
||||
@ -1613,7 +1613,7 @@ BOOLEAN LoadPatchedAML(CONST CHAR16* AcpiOemPath, CONST CHAR16* PartName, UINTN
|
||||
|
||||
#define BVALUE_ATTEMPTED 2 // special value for MenuItem.BValue to avoid excessive log output
|
||||
|
||||
void LoadAllPatchedAML(CONST CHAR16* AcpiOemPath, UINTN Pass)
|
||||
void LoadAllPatchedAML(const XStringW& acpiPathUnderOem, UINTN Pass)
|
||||
{
|
||||
if (!gSettings.AutoMerge && AUTOMERGE_PASS1 == Pass) {
|
||||
// nothing to do in this case, since AutoMerge=false -> no tables ever merged
|
||||
@ -1639,8 +1639,8 @@ void LoadAllPatchedAML(CONST CHAR16* AcpiOemPath, UINTN Pass)
|
||||
}
|
||||
}
|
||||
if (!ACPIPatchedAMLTmp) { // NULL when not disabled
|
||||
DBG("Inserting table[%llu]:%ls from %ls: ", Index, gSettings.SortedACPI[Index], AcpiOemPath);
|
||||
if (LoadPatchedAML(AcpiOemPath, gSettings.SortedACPI[Index], Pass)) {
|
||||
DBG("Inserting table[%llu]:%ls from %ls\\%ls: ", Index, gSettings.SortedACPI[Index], selfOem.getOemFullPath().wc_str(), acpiPathUnderOem.wc_str());
|
||||
if (LoadPatchedAML(selfOem.getOemDir(), acpiPathUnderOem, gSettings.SortedACPI[Index], Pass)) {
|
||||
// avoid inserting table again on second pass
|
||||
for (ACPI_PATCHED_AML* temp2 = ACPIPatchedAML; temp2; temp2 = temp2->Next) {
|
||||
if (0 == StriCmp(temp2->FileName, gSettings.SortedACPI[Index])) {
|
||||
@ -1656,8 +1656,8 @@ void LoadAllPatchedAML(CONST CHAR16* AcpiOemPath, UINTN Pass)
|
||||
DBG("Unsorted\n");
|
||||
for (ACPIPatchedAMLTmp = ACPIPatchedAML; ACPIPatchedAMLTmp; ACPIPatchedAMLTmp = ACPIPatchedAMLTmp->Next) {
|
||||
if (!ACPIPatchedAMLTmp->MenuItem.BValue) {
|
||||
DBG("Inserting %ls from %ls: ", ACPIPatchedAMLTmp->FileName, AcpiOemPath);
|
||||
if (LoadPatchedAML(AcpiOemPath, ACPIPatchedAMLTmp->FileName, Pass)) {
|
||||
DBG("Inserting %ls from %ls\\%ls: ", ACPIPatchedAMLTmp->FileName, selfOem.getOemFullPath().wc_str(), acpiPathUnderOem.wc_str());
|
||||
if (LoadPatchedAML(selfOem.getOemDir(), acpiPathUnderOem, ACPIPatchedAMLTmp->FileName, Pass)) {
|
||||
// avoid inserting table again on second pass
|
||||
ACPIPatchedAMLTmp->MenuItem.BValue = BVALUE_ATTEMPTED;
|
||||
}
|
||||
@ -2073,7 +2073,7 @@ EFI_STATUS PatchACPI(IN REFIT_VOLUME *Volume, const XString8& OSVersion)
|
||||
XsdtReplaceSizes = (__typeof__(XsdtReplaceSizes))AllocateZeroPool(XsdtTableCount() * sizeof(*XsdtReplaceSizes));
|
||||
|
||||
// Load merged ACPI files from ACPI/patched
|
||||
LoadAllPatchedAML(L"ACPI\\patched", AUTOMERGE_PASS1);
|
||||
LoadAllPatchedAML(L"ACPI\\patched"_XSW, AUTOMERGE_PASS1);
|
||||
|
||||
// Drop tables
|
||||
if (gSettings.ACPIDropTables) {
|
||||
@ -2100,7 +2100,7 @@ EFI_STATUS PatchACPI(IN REFIT_VOLUME *Volume, const XString8& OSVersion)
|
||||
PatchAllTables();
|
||||
|
||||
// Load add-on ACPI files from ACPI/patched
|
||||
LoadAllPatchedAML(L"ACPI\\patched", AUTOMERGE_PASS2);
|
||||
LoadAllPatchedAML(L"ACPI\\patched"_XSW, AUTOMERGE_PASS2);
|
||||
|
||||
if (XsdtReplaceSizes) {
|
||||
FreePool(XsdtReplaceSizes);
|
||||
|
@ -1110,7 +1110,6 @@ DBG("Beginning OC\n");
|
||||
#endif
|
||||
mOpenCoreConfiguration.Uefi.Output.ProvideConsoleGop = gSettings.ProvideConsoleGop;
|
||||
OC_STRING_ASSIGN(mOpenCoreConfiguration.Uefi.Output.Resolution, XString8(GlobalConfig.ScreenResolution).c_str());
|
||||
OcMain(&mOpenCoreStorage, NULL);
|
||||
|
||||
|
||||
// if OC is NOT initialized with OcMain, we need the following
|
||||
@ -1140,6 +1139,8 @@ DBG("Beginning OC\n");
|
||||
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL* FileSystem = LocateFileSystem(OcLoadedImage->DeviceHandle, OcLoadedImage->FilePath);
|
||||
Status = OcStorageInitFromFs(&mOpenCoreStorage, FileSystem, self.getCloverDirPathAsXStringW().wc_str(), NULL);
|
||||
|
||||
OcMain(&mOpenCoreStorage, NULL);
|
||||
|
||||
CHAR16* UnicodeDevicePath = NULL; (void)UnicodeDevicePath;
|
||||
UnicodeDevicePath = ConvertDevicePathToText (DevicePath, FALSE, FALSE);
|
||||
MsgLog("DevicePAth = %ls\n", UnicodeDevicePath);
|
||||
|
Loading…
Reference in New Issue
Block a user