mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-10 09:40:53 +01:00
prepare for sequoia
Signed-off-by: Slice <sergey.slice@gmail.com>
This commit is contained in:
parent
f3d43d9c2a
commit
083b863ee6
@ -306,9 +306,10 @@ void GetAcpiTablesList()
|
||||
UINT32 Count = XsdtTableCount();
|
||||
UINT64* Ptr = XsdtEntryPtrFromIndex(0);
|
||||
UINT64* EndPtr = XsdtEntryPtrFromIndex(Count);
|
||||
DBG("from XSDT:\n");
|
||||
DBG("from XSDT: count=%u\n", Count);
|
||||
for (; Ptr < EndPtr; Ptr++) {
|
||||
EFI_ACPI_DESCRIPTION_HEADER* Table = (EFI_ACPI_DESCRIPTION_HEADER*)(UINTN)ReadUnaligned64(Ptr);
|
||||
// DBG("X: Table=%16llX\n", (UINTN)Table);
|
||||
if (!Table) {
|
||||
// skip NULL entry
|
||||
continue;
|
||||
@ -316,12 +317,14 @@ void GetAcpiTablesList()
|
||||
AddDropTable(Table, IndexFromXsdtEntryPtr(Ptr));
|
||||
}
|
||||
} else if (Rsdt) {
|
||||
DBG("from RSDT:\n");
|
||||
|
||||
UINT32 Count = RsdtTableCount();
|
||||
DBG("from RSDT: count=%u\n", Count);
|
||||
UINT32* Ptr = RsdtEntryPtrFromIndex(0);
|
||||
UINT32* EndPtr = RsdtEntryPtrFromIndex(Count);
|
||||
for (; Ptr < EndPtr; Ptr++) {
|
||||
EFI_ACPI_DESCRIPTION_HEADER* Table = (EFI_ACPI_DESCRIPTION_HEADER*)(UINTN)*Ptr;
|
||||
// DBG("R: Table=%16llX\n", (UINTN)Table);
|
||||
if (!Table) {
|
||||
// skip NULL entry
|
||||
continue;
|
||||
@ -1239,16 +1242,26 @@ EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE* GetFadt()
|
||||
// EFI_STATUS Status;
|
||||
|
||||
RsdPtr = (__typeof__(RsdPtr))FindAcpiRsdPtr();
|
||||
// DBG("0: RsdPtr=%16llX\n", (UINTN)RsdPtr);
|
||||
if (RsdPtr == NULL) {
|
||||
/*Status = */EfiGetSystemConfigurationTable (&gEfiAcpi20TableGuid, (void **)&RsdPtr);
|
||||
if (RsdPtr == NULL) {
|
||||
/*Status = */EfiGetSystemConfigurationTable (&gEfiAcpi10TableGuid, (void **)&RsdPtr);
|
||||
// DBG("1: RsdPtr=%16llX\n", (UINTN)RsdPtr);
|
||||
if (RsdPtr == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
// DBG("2: RsdPtr=%16llX\n", (UINTN)RsdPtr);
|
||||
// DBG(" Rsdt=%08X\n", (UINT32)(RsdPtr->RsdtAddress));
|
||||
// DBG(" Xsdt=%16llX\n", (UINTN)(RsdPtr->XsdtAddress)); //==0
|
||||
// DBG(" RsdPtr->Revision=%16llX\n", (UINTN)(RsdPtr->Revision)); //==0
|
||||
|
||||
Rsdt = (RSDT_TABLE*)(UINTN)(RsdPtr->RsdtAddress);
|
||||
// if (Rsdt) {
|
||||
// DBG(" Rsdt->Header.Signature=%16llX\n", (UINTN)(Rsdt->Header.Signature));
|
||||
// }
|
||||
if (RsdPtr->Revision > 0) {
|
||||
if (Rsdt == NULL || Rsdt->Header.Signature != EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE) {
|
||||
Xsdt = (XSDT_TABLE *)(UINTN)(RsdPtr->XsdtAddress);
|
||||
@ -1262,6 +1275,17 @@ EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE* GetFadt()
|
||||
/*Status = */EfiGetSystemConfigurationTable (&gEfiAcpi20TableGuid, (void**)&RsdPtr);
|
||||
if (RsdPtr != NULL) {
|
||||
DBG("Found UEFI Acpi 2.0 RSDP at %llx\n", (uintptr_t)RsdPtr);
|
||||
|
||||
// DBG("3: RsdPtr=%16llX\n", (UINTN)RsdPtr);
|
||||
// DBG(" Rsdt=%08X\n", (UINT32)(RsdPtr->RsdtAddress));
|
||||
// DBG(" Xsdt=%16llX\n", (UINTN)(RsdPtr->XsdtAddress));
|
||||
// DBG(" RsdPtr->Revision=%16llX\n", (UINTN)(RsdPtr->Revision));
|
||||
|
||||
Rsdt = (RSDT_TABLE*)(UINTN)(RsdPtr->RsdtAddress);
|
||||
// if (Rsdt) {
|
||||
// DBG(" Rsdt->Header.Signature=%16llX\n", (UINTN)(Rsdt->Header.Signature));
|
||||
// }
|
||||
|
||||
Rsdt = (RSDT_TABLE*)(UINTN)(RsdPtr->RsdtAddress);
|
||||
if (RsdPtr->Revision > 0) {
|
||||
if (Rsdt == NULL || Rsdt->Header.Signature != EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE) {
|
||||
|
@ -239,7 +239,7 @@ DONE_ERROR:
|
||||
// and we can't free memory up to stop AsyncPlay
|
||||
FreeAlignedPages(WaveData.Samples, EFI_SIZE_TO_PAGES(WaveData.SamplesLength + 4095));
|
||||
}
|
||||
DBG("sound play end with status=%s\n", efiStrError(Status));
|
||||
// DBG("sound play end with status=%s\n", efiStrError(Status));
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ public:
|
||||
SmbiosPlistClass::SmbiosDictClass SMBIOS_monterey = SmbiosPlistClass::SmbiosDictClass();
|
||||
SmbiosPlistClass::SmbiosDictClass SMBIOS_ventura = SmbiosPlistClass::SmbiosDictClass();
|
||||
SmbiosPlistClass::SmbiosDictClass SMBIOS_sonoma = SmbiosPlistClass::SmbiosDictClass();
|
||||
SmbiosPlistClass::SmbiosDictClass SMBIOS_fifteen = SmbiosPlistClass::SmbiosDictClass();
|
||||
SmbiosPlistClass::SmbiosDictClass SMBIOS_sequoia = SmbiosPlistClass::SmbiosDictClass();
|
||||
// SmbiosPlistClass::SmbiosDictClass SMBIOS_lion = SmbiosPlistClass::SmbiosDictClass();
|
||||
public:
|
||||
SystemParameters_Class SystemParameters = SystemParameters_Class();
|
||||
@ -120,7 +120,7 @@ public:
|
||||
{"SMBIOS_monterey", SMBIOS_monterey},
|
||||
{"SMBIOS_ventura", SMBIOS_ventura},
|
||||
{"SMBIOS_sonoma", SMBIOS_sonoma},
|
||||
{"SMBIOS_fifteen", SMBIOS_fifteen},
|
||||
{"SMBIOS_sequoia", SMBIOS_sequoia},
|
||||
{"SystemParameters", SystemParameters},
|
||||
{"RtVariables", RtVariables},
|
||||
{"Quirks", Quirks},
|
||||
|
@ -761,7 +761,7 @@ public:
|
||||
SmbiosDictClass SMBIOS_monterey = SmbiosDictClass();
|
||||
SmbiosDictClass SMBIOS_ventura = SmbiosDictClass();
|
||||
SmbiosDictClass SMBIOS_sonoma = SmbiosDictClass();
|
||||
SmbiosDictClass SMBIOS_fifteen = SmbiosDictClass();
|
||||
SmbiosDictClass SMBIOS_sequoia = SmbiosDictClass();
|
||||
|
||||
XmlDictField m_fields[15] = {
|
||||
{"SMBIOS", SMBIOS},
|
||||
@ -778,7 +778,7 @@ public:
|
||||
{"SMBIOS_monterey", SMBIOS_monterey},
|
||||
{"SMBIOS_ventura", SMBIOS_ventura},
|
||||
{"SMBIOS_sonoma", SMBIOS_sonoma},
|
||||
{"SMBIOS_fifteen", SMBIOS_fifteen},
|
||||
{"SMBIOS_sequoia", SMBIOS_sequoia},
|
||||
};
|
||||
|
||||
public:
|
||||
|
@ -587,7 +587,7 @@ MacOsVersion GetOSVersion(int LoaderType, const EFI_GUID& APFSTargetUUID, const
|
||||
OSVersion = "13"_XS8;
|
||||
} else if ( Prop->getString()->stringValue().contains("Install%20macOS%20Sonoma") || Prop->getString()->stringValue().contains("Install%20macOS%2014")) {
|
||||
OSVersion = "14"_XS8;
|
||||
} else if ( Prop->getString()->stringValue().contains("Install%20macOS%20Fifteen") || Prop->getString()->stringValue().contains("Install%20macOS%2015")) {
|
||||
} else if ( Prop->getString()->stringValue().contains("Install%20macOS%20Sequoia") || Prop->getString()->stringValue().contains("Install%20macOS%2015")) {
|
||||
OSVersion = "15"_XS8;
|
||||
} else if ( Prop->getString()->stringValue().contains("Install%20macOS%2010.16")) {
|
||||
OSVersion = "10.16"_XS8;
|
||||
@ -842,8 +842,8 @@ GetOSIconName (const MacOsVersion& OSVersion)
|
||||
if (OSVersion.isEmpty()) {
|
||||
OSIconName = L"mac"_XSW;
|
||||
} else if (OSVersion.elementAt(0) == 15 ){
|
||||
// Fifteen
|
||||
OSIconName = L"fifteen,mac"_XSW;
|
||||
// Sequoia
|
||||
OSIconName = L"sequoia,mac"_XSW;
|
||||
} else if (OSVersion.elementAt(0) == 14 ){
|
||||
// Sonoma
|
||||
OSIconName = L"sonoma,mac"_XSW;
|
||||
|
@ -86,7 +86,7 @@ CONST LString8 IconsNames[] = {
|
||||
"os_monterey", //54 == ICON_MONTEREY
|
||||
"os_ventura", //55 == ICON_VENTURA
|
||||
"os_sonoma", //56 == ICON_SONOMA
|
||||
"os_fifteen", //57 == ICON_FIFTEEN
|
||||
"os_sequoia", //57 == ICON_SEQUOIA
|
||||
""
|
||||
};
|
||||
const INTN IconsNamesSize = sizeof(IconsNames) / sizeof(IconsNames[0]);
|
||||
|
@ -138,11 +138,11 @@ EFI_STATUS Status = EFI_NOT_FOUND;
|
||||
ThemeDict = ThemeX->LoadTheme(XStringW(ThemeNameArray[Rnd]));
|
||||
} else {
|
||||
ThemeDict = ThemeX->LoadTheme(gSettings.GUI.Theme);
|
||||
if (ThemeDict == NULL) {
|
||||
DBG("GlobalConfig: %ls not found, get embedded theme\n", gSettings.GUI.Theme.wc_str());
|
||||
} else {
|
||||
DBG("chosen theme %ls\n", gSettings.GUI.Theme.wc_str());
|
||||
}
|
||||
// if (ThemeDict == NULL) {
|
||||
// DBG("GlobalConfig: %ls not found, get embedded theme\n", gSettings.GUI.Theme.wc_str());
|
||||
// } else {
|
||||
// DBG("chosen theme %ls\n", gSettings.GUI.Theme.wc_str());
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -364,7 +364,7 @@ void DebugPause(void);
|
||||
#define ICON_MONTEREY (54)
|
||||
#define ICON_VENTURA (55)
|
||||
#define ICON_SONOMA (56)
|
||||
#define ICON_FIFTEEN (57)
|
||||
#define ICON_SEQUOIA (57)
|
||||
#define BUILTIN_ICON_BACKGROUND (100)
|
||||
#define BUILTIN_ICON_SELECTION (101)
|
||||
#define BUILTIN_ICON_ANIME (102)
|
||||
|
@ -1242,7 +1242,7 @@ void LOADER_ENTRY::StartLoader()
|
||||
if ( FileExists(&self.getCloverDir(), bundleFullPath) ) {
|
||||
XString8 bundlePathUnderKextsDir = S8Printf("%ls\\%ls", KextEntry.KextDirNameUnderOEMPath.wc_str(), KextEntry.FileName.wc_str());
|
||||
OC_STRING_ASSIGN(mOpenCoreConfiguration.Kernel.Add.Values[kextIdx]->BundlePath, bundlePathUnderKextsDir.c_str());
|
||||
DBG("OC BundlePath = '%s'\n", OC_BLOB_GET(&mOpenCoreConfiguration.Kernel.Add.Values[kextIdx]->BundlePath));
|
||||
// DBG("OC BundlePath = '%s'\n", OC_BLOB_GET(&mOpenCoreConfiguration.Kernel.Add.Values[kextIdx]->BundlePath));
|
||||
} else {
|
||||
DBG("Cannot find kext bundlePath at '%s'\n", bundleFullPath.c_str());
|
||||
}
|
||||
@ -1260,7 +1260,7 @@ void LOADER_ENTRY::StartLoader()
|
||||
} else {
|
||||
OC_STRING_ASSIGN(mOpenCoreConfiguration.Kernel.Add.Values[kextIdx]->PlistPath, "Contents\\Info.plist");
|
||||
}
|
||||
DBG("OC PlistPath = '%s'\n", OC_BLOB_GET(&mOpenCoreConfiguration.Kernel.Add.Values[kextIdx]->PlistPath));
|
||||
// DBG("OC PlistPath = '%s'\n", OC_BLOB_GET(&mOpenCoreConfiguration.Kernel.Add.Values[kextIdx]->PlistPath));
|
||||
} else {
|
||||
DBG("Cannot find kext info.plist at '%ls'\n", KextEntry.FileName.wc_str());
|
||||
}
|
||||
@ -1268,7 +1268,7 @@ void LOADER_ENTRY::StartLoader()
|
||||
XString8 execpath = getKextExecPath(&self.getCloverDir(), KextEntry.KextDirNameUnderOEMPath, KextEntry.FileName, dict, NoContents);
|
||||
if (execpath.notEmpty()) {
|
||||
OC_STRING_ASSIGN(mOpenCoreConfiguration.Kernel.Add.Values[kextIdx]->ExecutablePath, execpath.c_str());
|
||||
DBG("OC ExecutablePath = '%s'\n", execpath.c_str());
|
||||
// DBG("OC ExecutablePath = '%s'\n", execpath.c_str());
|
||||
}
|
||||
if ( dict ) dict->ReleaseTag();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user