mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-27 16:58:09 +01:00
Continuation of refactor of settings.
This commit is contained in:
parent
235f13a3db
commit
3fb08d97f8
@ -19,6 +19,10 @@
|
||||
9A09863B2438A15400826276 /* shared_with_menu.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A0986362438A15400826276 /* shared_with_menu.h */; };
|
||||
9A09863C2438A15400826276 /* shared_with_menu.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A0986362438A15400826276 /* shared_with_menu.h */; };
|
||||
9A09863D2438A15400826276 /* shared_with_menu.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A0986362438A15400826276 /* shared_with_menu.h */; };
|
||||
9A0D112A25FF4E170040555F /* strings.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A0D112825FF4E160040555F /* strings.h */; };
|
||||
9A0D112B25FF4E170040555F /* strings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A0D112925FF4E160040555F /* strings.cpp */; };
|
||||
9A0D112E25FF50090040555F /* strcasecmp_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A0D112C25FF50090040555F /* strcasecmp_test.cpp */; };
|
||||
9A0D112F25FF50090040555F /* strcasecmp_test.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A0D112D25FF50090040555F /* strcasecmp_test.h */; };
|
||||
9A105B1A244644C50006DE06 /* XCinema.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A105B18244644C50006DE06 /* XCinema.cpp */; };
|
||||
9A105B1B244644C50006DE06 /* XCinema.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A105B18244644C50006DE06 /* XCinema.cpp */; };
|
||||
9A105B1C244644C50006DE06 /* XCinema.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A105B18244644C50006DE06 /* XCinema.cpp */; };
|
||||
@ -66,6 +70,9 @@
|
||||
9A28CD34241BC0DF00F3D247 /* strncmp_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A28CD2E241BC0DF00F3D247 /* strncmp_test.cpp */; };
|
||||
9A28CD35241BC0DF00F3D247 /* strlen_test.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A28CD2F241BC0DF00F3D247 /* strlen_test.h */; };
|
||||
9A28CD36241BC0DF00F3D247 /* strncmp_test.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A28CD30241BC0DF00F3D247 /* strncmp_test.h */; };
|
||||
9A2E678025FF590600868259 /* DataHub.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A2E677D25FF590500868259 /* DataHub.cpp */; };
|
||||
9A2E678125FF590600868259 /* DataHub.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A2E677E25FF590500868259 /* DataHub.h */; };
|
||||
9A2E678225FF590600868259 /* DataHubExt.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A2E677F25FF590500868259 /* DataHubExt.h */; };
|
||||
9A35A6182451FE1600CAFF76 /* XStringAbstract.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A35A6172451FE1500CAFF76 /* XStringAbstract.h */; };
|
||||
9A36E5D624F56261007A1107 /* plist_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E5D424F56261007A1107 /* plist_tests.cpp */; };
|
||||
9A36E5D724F56261007A1107 /* plist_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A36E5D424F56261007A1107 /* plist_tests.cpp */; };
|
||||
@ -661,6 +668,10 @@
|
||||
9A09863024389A6A00826276 /* menu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = menu.cpp; sourceTree = "<group>"; };
|
||||
9A0986352438A15400826276 /* shared_with_menu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shared_with_menu.cpp; sourceTree = "<group>"; };
|
||||
9A0986362438A15400826276 /* shared_with_menu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shared_with_menu.h; sourceTree = "<group>"; };
|
||||
9A0D112825FF4E160040555F /* strings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = strings.h; sourceTree = "<group>"; };
|
||||
9A0D112925FF4E160040555F /* strings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = strings.cpp; sourceTree = "<group>"; };
|
||||
9A0D112C25FF50090040555F /* strcasecmp_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = strcasecmp_test.cpp; sourceTree = "<group>"; };
|
||||
9A0D112D25FF50090040555F /* strcasecmp_test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = strcasecmp_test.h; sourceTree = "<group>"; };
|
||||
9A105B18244644C50006DE06 /* XCinema.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XCinema.cpp; sourceTree = "<group>"; };
|
||||
9A105B19244644C50006DE06 /* XCinema.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XCinema.h; sourceTree = "<group>"; };
|
||||
9A105B2224464A830006DE06 /* VectorGraphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VectorGraphics.h; sourceTree = "<group>"; };
|
||||
@ -697,6 +708,9 @@
|
||||
9A28CD2E241BC0DF00F3D247 /* strncmp_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = strncmp_test.cpp; sourceTree = "<group>"; };
|
||||
9A28CD2F241BC0DF00F3D247 /* strlen_test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = strlen_test.h; sourceTree = "<group>"; };
|
||||
9A28CD30241BC0DF00F3D247 /* strncmp_test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = strncmp_test.h; sourceTree = "<group>"; };
|
||||
9A2E677D25FF590500868259 /* DataHub.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DataHub.cpp; sourceTree = "<group>"; };
|
||||
9A2E677E25FF590500868259 /* DataHub.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataHub.h; sourceTree = "<group>"; };
|
||||
9A2E677F25FF590500868259 /* DataHubExt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataHubExt.h; sourceTree = "<group>"; };
|
||||
9A35A6172451FE1500CAFF76 /* XStringAbstract.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XStringAbstract.h; sourceTree = "<group>"; };
|
||||
9A36E5D424F56261007A1107 /* plist_tests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = plist_tests.cpp; sourceTree = "<group>"; };
|
||||
9A36E5D524F56261007A1107 /* plist_tests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = plist_tests.h; sourceTree = "<group>"; };
|
||||
@ -968,24 +982,26 @@
|
||||
9AA3912D25CC65820099DC1F /* Posix */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9A0D112925FF4E160040555F /* strings.cpp */,
|
||||
9A0D112825FF4E160040555F /* strings.h */,
|
||||
9AA3913225CC65820099DC1F /* abort.cpp */,
|
||||
9AA3913D25CC65820099DC1F /* abort.h */,
|
||||
9AA3912F25CC65820099DC1F /* limits.h */,
|
||||
9AA9250925CD696B00BD5E8B /* posix_additions.cpp */,
|
||||
9AA9250A25CD696B00BD5E8B /* posix_additions.h */,
|
||||
9AA3912E25CC65820099DC1F /* stdlib.h */,
|
||||
9AA3912F25CC65820099DC1F /* limits.h */,
|
||||
9AA3913625CC65820099DC1F /* posix.h */,
|
||||
9AA3913A25CC65820099DC1F /* stdarg.h */,
|
||||
9AA3913725CC65820099DC1F /* stdbool.h */,
|
||||
9AA3913025CC65820099DC1F /* stddef.h */,
|
||||
9AA3913B25CC65820099DC1F /* stdint.h */,
|
||||
9AA3913125CC65820099DC1F /* stdio.cpp */,
|
||||
9AA3913225CC65820099DC1F /* abort.cpp */,
|
||||
9AA3913925CC65820099DC1F /* stdio.h */,
|
||||
9AA3912E25CC65820099DC1F /* stdlib.h */,
|
||||
9AA3913325CC65820099DC1F /* string.cpp */,
|
||||
9AA3913C25CC65820099DC1F /* string.h */,
|
||||
9AA3913825CC65820099DC1F /* strlen.cpp */,
|
||||
9AA3913425CC65820099DC1F /* wchar.cpp */,
|
||||
9AA3913525CC65820099DC1F /* wchar.h */,
|
||||
9AA3913625CC65820099DC1F /* posix.h */,
|
||||
9AA3913725CC65820099DC1F /* stdbool.h */,
|
||||
9AA3913825CC65820099DC1F /* strlen.cpp */,
|
||||
9AA3913925CC65820099DC1F /* stdio.h */,
|
||||
9AA3913A25CC65820099DC1F /* stdarg.h */,
|
||||
9AA3913B25CC65820099DC1F /* stdint.h */,
|
||||
9AA3913C25CC65820099DC1F /* string.h */,
|
||||
9AA3913D25CC65820099DC1F /* abort.h */,
|
||||
);
|
||||
path = Posix;
|
||||
sourceTree = "<group>";
|
||||
@ -1068,6 +1084,8 @@
|
||||
9AC77ECA24176C04005CDD5C /* cpp_unit_test */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9A0D112C25FF50090040555F /* strcasecmp_test.cpp */,
|
||||
9A0D112D25FF50090040555F /* strcasecmp_test.h */,
|
||||
9A36E5D424F56261007A1107 /* plist_tests.cpp */,
|
||||
9A36E5D524F56261007A1107 /* plist_tests.h */,
|
||||
9AC77ED424176C04005CDD5C /* all_tests.cpp */,
|
||||
@ -1122,6 +1140,9 @@
|
||||
9AC77F1624176C04005CDD5C /* Platform */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9A2E677D25FF590500868259 /* DataHub.cpp */,
|
||||
9A2E677E25FF590500868259 /* DataHub.h */,
|
||||
9A2E677F25FF590500868259 /* DataHubExt.h */,
|
||||
9AA3918725CC72900099DC1F /* KextList.cpp */,
|
||||
9AA3918825CC72900099DC1F /* KextList.h */,
|
||||
9AA3918525CC6EBB0099DC1F /* KERNEL_AND_KEXT_PATCHES.cpp */,
|
||||
@ -1448,6 +1469,7 @@
|
||||
9AC7807324176C04005CDD5C /* menu_globals.h in Headers */,
|
||||
9AC7809824176C04005CDD5C /* XObjArray.h in Headers */,
|
||||
9A9AEB99243F7B7A00FBD7D8 /* printf_lite-test.h in Headers */,
|
||||
9A0D112A25FF4E170040555F /* strings.h in Headers */,
|
||||
9AC7801324176C04005CDD5C /* sse3_5_patcher.h in Headers */,
|
||||
9AC7803E24176C04005CDD5C /* spd.h in Headers */,
|
||||
9AABBE1D2524863E0033A009 /* SelfOem.h in Headers */,
|
||||
@ -1482,11 +1504,14 @@
|
||||
9AA3917C25CC65830099DC1F /* TagDate.h in Headers */,
|
||||
9AA3917B25CC65830099DC1F /* TagInt64.h in Headers */,
|
||||
9A09863B2438A15400826276 /* shared_with_menu.h in Headers */,
|
||||
9A0D112F25FF50090040555F /* strcasecmp_test.h in Headers */,
|
||||
9AC77FFF24176C04005CDD5C /* Handle.h in Headers */,
|
||||
9A2E678225FF590600868259 /* DataHubExt.h in Headers */,
|
||||
9AA3916525CC65830099DC1F /* stdio.h in Headers */,
|
||||
9A105B5F24483AE40006DE06 /* Injectors.h in Headers */,
|
||||
9AC7809724176C04005CDD5C /* XArray.h in Headers */,
|
||||
9AA3916925CC65830099DC1F /* abort.h in Headers */,
|
||||
9A2E678125FF590600868259 /* DataHub.h in Headers */,
|
||||
9AC7805D24176C04005CDD5C /* MSPCADB.h in Headers */,
|
||||
9A36E5D924F56261007A1107 /* plist_tests.h in Headers */,
|
||||
9AC7804F24176C04005CDD5C /* libeg.h in Headers */,
|
||||
@ -1914,6 +1939,7 @@
|
||||
9A105B6924483AE40006DE06 /* APFS.cpp in Sources */,
|
||||
9AA3917425CC65830099DC1F /* TagDate.cpp in Sources */,
|
||||
9AC7805124176C04005CDD5C /* egemb_font.cpp in Sources */,
|
||||
9A0D112B25FF4E170040555F /* strings.cpp in Sources */,
|
||||
9AC7806424176C04005CDD5C /* securemenu.cpp in Sources */,
|
||||
9AABBE1C2524863E0033A009 /* SelfOem.cpp in Sources */,
|
||||
9AC7804D24176C04005CDD5C /* text.cpp in Sources */,
|
||||
@ -1924,6 +1950,7 @@
|
||||
9AC77FC224176C04005CDD5C /* XObjArray_tests.cpp in Sources */,
|
||||
9AC7803B24176C04005CDD5C /* cpu.cpp in Sources */,
|
||||
9AC7800124176C04005CDD5C /* LegacyBoot.cpp in Sources */,
|
||||
9A2E678025FF590600868259 /* DataHub.cpp in Sources */,
|
||||
9AC7807524176C04005CDD5C /* REFIT_MENU_SCREEN.cpp in Sources */,
|
||||
9AA3916F25CC65830099DC1F /* base64.cpp in Sources */,
|
||||
9AC7801F24176C04005CDD5C /* LegacyBiosThunk.cpp in Sources */,
|
||||
@ -1945,6 +1972,7 @@
|
||||
9AC44EDE253AE78C00326488 /* MemoryOperation.c in Sources */,
|
||||
9A105B85244852D70006DE06 /* VersionString.cpp in Sources */,
|
||||
9A9D3B2324221563006D8CD9 /* printf_lite-test.cpp in Sources */,
|
||||
9A0D112E25FF50090040555F /* strcasecmp_test.cpp in Sources */,
|
||||
9AC7800424176C04005CDD5C /* kext_patcher.cpp in Sources */,
|
||||
9AC7802624176C04005CDD5C /* gma.cpp in Sources */,
|
||||
9AC7805424176C04005CDD5C /* FloatLib.cpp in Sources */,
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
9A0B085E240300E000E2B470 /* Platform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A0B085D240300E000E2B470 /* Platform.cpp */; };
|
||||
9A0D113825FF58420040555F /* strcasecmp_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A0D113625FF583F0040555F /* strcasecmp_test.cpp */; };
|
||||
9A272A7F25D5062E00F03E19 /* DataHub.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A272A7D25D5062D00F03E19 /* DataHub.cpp */; };
|
||||
9A28CD1F241BB61B00F3D247 /* abort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A28CD1D241BB61B00F3D247 /* abort.cpp */; };
|
||||
9A28CD22241BB61B00F3D247 /* strlen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A28CD1E241BB61B00F3D247 /* strlen.cpp */; };
|
||||
@ -270,6 +271,8 @@
|
||||
9A0B084A2402FE9300E2B470 /* XArray.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XArray.h; sourceTree = "<group>"; };
|
||||
9A0B084B2402FE9300E2B470 /* XObjArray.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XObjArray.h; sourceTree = "<group>"; };
|
||||
9A0B085D240300E000E2B470 /* Platform.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Platform.cpp; sourceTree = "<group>"; };
|
||||
9A0D113625FF583F0040555F /* strcasecmp_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = strcasecmp_test.cpp; sourceTree = "<group>"; };
|
||||
9A0D113725FF58400040555F /* strcasecmp_test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = strcasecmp_test.h; sourceTree = "<group>"; };
|
||||
9A272A7C25D5062D00F03E19 /* DataHubExt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataHubExt.h; sourceTree = "<group>"; };
|
||||
9A272A7D25D5062D00F03E19 /* DataHub.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DataHub.cpp; sourceTree = "<group>"; };
|
||||
9A272A7E25D5062E00F03E19 /* DataHub.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataHub.h; sourceTree = "<group>"; };
|
||||
@ -15781,6 +15784,8 @@
|
||||
9AFDD05825CE730F00EEAF06 /* cpp_unit_test */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9A0D113625FF583F0040555F /* strcasecmp_test.cpp */,
|
||||
9A0D113725FF58400040555F /* strcasecmp_test.h */,
|
||||
9AFDD07125CE730F00EEAF06 /* all_tests.cpp */,
|
||||
9AFDD07A25CE730F00EEAF06 /* all_tests.h */,
|
||||
9A9037E425CFE7D000F14179 /* config-test.cpp */,
|
||||
@ -16020,6 +16025,7 @@
|
||||
9A358B3025CF115200A3850D /* Config_Graphics.cpp in Sources */,
|
||||
9A36E51024F3B537007A1107 /* TagArray.cpp in Sources */,
|
||||
9A272A7F25D5062E00F03E19 /* DataHub.cpp in Sources */,
|
||||
9A0D113825FF58420040555F /* strcasecmp_test.cpp in Sources */,
|
||||
9AA918C125CD4B7900BD5E8B /* lib.cpp in Sources */,
|
||||
9A36E4F024F3B537007A1107 /* TagString8.cpp in Sources */,
|
||||
9AFDD08D25CE731000EEAF06 /* plist_tests.cpp in Sources */,
|
||||
|
@ -26,4 +26,8 @@
|
||||
|
||||
#define Xrealloc(ptr, newsize, oldsize) realloc(ptr, newsize)
|
||||
|
||||
#define XTOOLS_VA_LIST va_list
|
||||
#define XTOOLS_VA_START va_start
|
||||
#define XTOOLS_VA_END va_end
|
||||
|
||||
#endif
|
||||
|
@ -20,6 +20,10 @@
|
||||
9A0B087D2403B08400E2B470 /* XStringArray_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A0B084F2402FE9B00E2B470 /* XStringArray_test.cpp */; };
|
||||
9A0B087E2403B08400E2B470 /* XArray_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A0B08532402FE9B00E2B470 /* XArray_tests.cpp */; };
|
||||
9A0B087F2403B08400E2B470 /* Platform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A0B085D240300E000E2B470 /* Platform.cpp */; };
|
||||
9A0D113225FF506E0040555F /* strcasecmp_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A0D113025FF506E0040555F /* strcasecmp_test.cpp */; };
|
||||
9A0D113325FF506E0040555F /* strcasecmp_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A0D113025FF506E0040555F /* strcasecmp_test.cpp */; };
|
||||
9A0D113425FF506E0040555F /* strcasecmp_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A0D113025FF506E0040555F /* strcasecmp_test.cpp */; };
|
||||
9A0D113525FF506E0040555F /* strcasecmp_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A0D113025FF506E0040555F /* strcasecmp_test.cpp */; };
|
||||
9A28CD09241B8DD400F3D247 /* strncmp_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A28CD05241B8DD400F3D247 /* strncmp_test.cpp */; };
|
||||
9A28CD0A241B8DD400F3D247 /* strncmp_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A28CD05241B8DD400F3D247 /* strncmp_test.cpp */; };
|
||||
9A28CD0B241B8DD400F3D247 /* strncmp_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A28CD05241B8DD400F3D247 /* strncmp_test.cpp */; };
|
||||
@ -357,6 +361,8 @@
|
||||
9A0B085D240300E000E2B470 /* Platform.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Platform.cpp; sourceTree = "<group>"; };
|
||||
9A0B08642403144C00E2B470 /* global_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = global_test.cpp; sourceTree = "<group>"; };
|
||||
9A0B08862403B08400E2B470 /* cpp_tests UTF32 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "cpp_tests UTF32"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
9A0D113025FF506E0040555F /* strcasecmp_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = strcasecmp_test.cpp; sourceTree = "<group>"; };
|
||||
9A0D113125FF506E0040555F /* strcasecmp_test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = strcasecmp_test.h; sourceTree = "<group>"; };
|
||||
9A1A3FDC2424BC22008C89EB /* printf_lite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = printf_lite.h; sourceTree = "<group>"; };
|
||||
9A28CD05241B8DD400F3D247 /* strncmp_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = strncmp_test.cpp; sourceTree = "<group>"; };
|
||||
9A28CD06241B8DD400F3D247 /* strcmp_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = strcmp_test.cpp; sourceTree = "<group>"; };
|
||||
@ -580,6 +586,8 @@
|
||||
9A0B084C2402FE9B00E2B470 /* cpp_unit_test */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9A0D113025FF506E0040555F /* strcasecmp_test.cpp */,
|
||||
9A0D113125FF506E0040555F /* strcasecmp_test.h */,
|
||||
9A0B08512402FE9B00E2B470 /* all_tests.cpp */,
|
||||
9A0B08542402FE9B00E2B470 /* all_tests.h */,
|
||||
9A9037EB25D0010500F14179 /* config-test.cpp */,
|
||||
@ -1059,6 +1067,7 @@
|
||||
9A36E51124F3B537007A1107 /* TagArray.cpp in Sources */,
|
||||
9A36E4F124F3B537007A1107 /* TagString8.cpp in Sources */,
|
||||
9A36E50924F3B537007A1107 /* TagDate.cpp in Sources */,
|
||||
9A0D113325FF506E0040555F /* strcasecmp_test.cpp in Sources */,
|
||||
9AD0359525C57C8A00E58351 /* PrintLib.c in Sources */,
|
||||
9A4185C12439F73A00BEAFB8 /* XStringArray.cpp in Sources */,
|
||||
9A9037F125D0010500F14179 /* config-test.cpp in Sources */,
|
||||
@ -1139,6 +1148,7 @@
|
||||
9A36E51324F3B537007A1107 /* TagArray.cpp in Sources */,
|
||||
9A36E4F324F3B537007A1107 /* TagString8.cpp in Sources */,
|
||||
9A36E50B24F3B537007A1107 /* TagDate.cpp in Sources */,
|
||||
9A0D113525FF506E0040555F /* strcasecmp_test.cpp in Sources */,
|
||||
9AD0359725C57C8A00E58351 /* PrintLib.c in Sources */,
|
||||
9A2A7C7D24576CCE00422263 /* XStringArray.cpp in Sources */,
|
||||
9A9037F325D0010500F14179 /* config-test.cpp in Sources */,
|
||||
@ -1219,6 +1229,7 @@
|
||||
9A36E51224F3B537007A1107 /* TagArray.cpp in Sources */,
|
||||
9A36E4F224F3B537007A1107 /* TagString8.cpp in Sources */,
|
||||
9A36E50A24F3B537007A1107 /* TagDate.cpp in Sources */,
|
||||
9A0D113425FF506E0040555F /* strcasecmp_test.cpp in Sources */,
|
||||
9AD0359625C57C8A00E58351 /* PrintLib.c in Sources */,
|
||||
9A4185C22439F73A00BEAFB8 /* XStringArray.cpp in Sources */,
|
||||
9A9037F225D0010500F14179 /* config-test.cpp in Sources */,
|
||||
@ -1284,6 +1295,7 @@
|
||||
9A0B08592402FF8200E2B470 /* all_tests.cpp in Sources */,
|
||||
9A90384D25D0024500F14179 /* ConfigPlist.cpp in Sources */,
|
||||
9A90383525D0024500F14179 /* Config_Quirks.cpp in Sources */,
|
||||
9A0D113225FF506E0040555F /* strcasecmp_test.cpp in Sources */,
|
||||
9A9037F025D0010500F14179 /* config-test.cpp in Sources */,
|
||||
9A0B08662403144C00E2B470 /* global_test.cpp in Sources */,
|
||||
9A4185B12439E4D600BEAFB8 /* LoadOptions_test.cpp in Sources */,
|
||||
|
@ -2103,7 +2103,7 @@ EFI_STATUS PatchACPI(IN REFIT_VOLUME *Volume, const MacOsVersion& OSVersion)
|
||||
}
|
||||
}
|
||||
|
||||
if (gSettings.ACPI.SSDT.DropSSDT) {
|
||||
if (GlobalConfig.DropSSDT) {
|
||||
DbgHeader("DropSSDT");
|
||||
//special case if we set into menu drop all SSDT
|
||||
DropTableFromXSDT(EFI_ACPI_4_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE, 0, 0);
|
||||
|
@ -1,80 +0,0 @@
|
||||
//
|
||||
// strings.c
|
||||
// CloverX64
|
||||
//
|
||||
// Created by Jief on 01/02/2021.
|
||||
//
|
||||
|
||||
#include "strings.h"
|
||||
|
||||
|
||||
/*
|
||||
* This array is designed for mapping upper and lower case letter
|
||||
* together for a case independent comparison. The mappings are
|
||||
* based upon ascii character sequences.
|
||||
*/
|
||||
static const unsigned char charmap[] = {
|
||||
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
|
||||
'\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
|
||||
'\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
|
||||
'\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
|
||||
'\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
|
||||
'\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
|
||||
'\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
|
||||
'\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
|
||||
'\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
|
||||
'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
|
||||
'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
|
||||
'\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
|
||||
'\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
|
||||
'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
|
||||
'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
|
||||
'\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
|
||||
'\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
|
||||
'\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
|
||||
'\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
|
||||
'\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
|
||||
'\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
|
||||
'\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
|
||||
'\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
|
||||
'\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
|
||||
'\300', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
|
||||
'\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
|
||||
'\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
|
||||
'\370', '\371', '\372', '\333', '\334', '\335', '\336', '\337',
|
||||
'\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
|
||||
'\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
|
||||
'\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
|
||||
'\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
|
||||
};
|
||||
|
||||
int strncasecmp(const char* s1, const char* s2, size_t n)
|
||||
{
|
||||
register unsigned char u1, u2;
|
||||
for (; n != 0; --n) {
|
||||
u1 = (unsigned char) *s1++;
|
||||
u2 = (unsigned char) *s2++;
|
||||
if (charmap[u1] != charmap[u2]) {
|
||||
return charmap[u1] - charmap[u2];
|
||||
}
|
||||
if (u1 == '\0') {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int strcasecmp(const char* s1, const char* s2)
|
||||
{
|
||||
register unsigned char u1, u2;
|
||||
for (;;) {
|
||||
u1 = (unsigned char) *s1++;
|
||||
u2 = (unsigned char) *s2++;
|
||||
if (charmap[u1] != charmap[u2]) {
|
||||
return charmap[u1] - charmap[u2];
|
||||
}
|
||||
if (u1 == '\0') {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
80
rEFIt_UEFI/Platform/Posix/strings.cpp
Normal file
80
rEFIt_UEFI/Platform/Posix/strings.cpp
Normal file
@ -0,0 +1,80 @@
|
||||
//
|
||||
// strings.c
|
||||
// CloverX64
|
||||
//
|
||||
// Created by Jief on 01/02/2021.
|
||||
//
|
||||
|
||||
#include "strings.h"
|
||||
|
||||
|
||||
/*
|
||||
* This array is designed for mapping upper and lower case letter
|
||||
* together for a case independent comparison. The mappings are
|
||||
* based upon ascii character sequences.
|
||||
*/
|
||||
static const unsigned char charmap[] = {
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
||||
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
|
||||
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
|
||||
0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
|
||||
0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
||||
0x40, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
|
||||
0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
|
||||
0x78, 0x79, 0x7a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
||||
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
|
||||
0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
|
||||
0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
|
||||
0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
|
||||
0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
|
||||
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
|
||||
0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||
0xc0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
|
||||
0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
|
||||
0xf8, 0xf9, 0xfa, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
|
||||
0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
|
||||
0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
|
||||
};
|
||||
|
||||
int strncasecmp(const char* s1, const char* s2, size_t n)
|
||||
{
|
||||
unsigned char u1, u2;
|
||||
for (; n != 0; --n) {
|
||||
u1 = (unsigned char) *s1++;
|
||||
u2 = (unsigned char) *s2++;
|
||||
if (charmap[u1] != charmap[u2]) {
|
||||
return charmap[u1] - charmap[u2];
|
||||
}
|
||||
if (u1 == '\0') {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int strcasecmp(const char* s1, const char* s2)
|
||||
{
|
||||
unsigned char u1, u2;
|
||||
for (;;) {
|
||||
u1 = (unsigned char) *s1++;
|
||||
u2 = (unsigned char) *s2++;
|
||||
if (charmap[u1] != charmap[u2]) {
|
||||
return charmap[u1] - charmap[u2];
|
||||
}
|
||||
if (u1 == '\0') {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
@ -31,6 +31,7 @@
|
||||
#include "Edid.h"
|
||||
#include "hda.h"
|
||||
#include "../../Version.h"
|
||||
#include "../entry_scan/bootscreen.h"
|
||||
|
||||
#ifndef DEBUG_ALL
|
||||
#define DEBUG_SET 1
|
||||
@ -1463,23 +1464,6 @@ static UINT8 GetVolumeType(const TagDict* DictPointer)
|
||||
}
|
||||
|
||||
|
||||
static CONST CHAR8 *CustomBootModeStr[] = {
|
||||
"CUSTOM_BOOT_DISABLED",
|
||||
"CUSTOM_BOOT_USER_DISABLED",
|
||||
"CUSTOM_BOOT_NONE",
|
||||
"CUSTOM_BOOT_APPLE",
|
||||
"CUSTOM_BOOT_ALT_APPLE",
|
||||
"CUSTOM_BOOT_THEME",
|
||||
"CUSTOM_BOOT_USER",
|
||||
};
|
||||
static CONST CHAR8 *CustomBootModeToStr(IN UINT8 Mode)
|
||||
{
|
||||
if (Mode >= (sizeof(CustomBootModeStr) / sizeof(CustomBootModeStr[0]))) {
|
||||
return CustomBootModeStr[0];
|
||||
}
|
||||
return CustomBootModeStr[Mode];
|
||||
}
|
||||
|
||||
STATIC
|
||||
BOOLEAN
|
||||
FillinCustomEntry (
|
||||
@ -2067,7 +2051,7 @@ GetEDIDSettings(const TagDict* DictPointer)
|
||||
#pragma GCC diagnostic ignored "-Wshadow"
|
||||
EFI_STATUS GetEarlyUserSettings (
|
||||
const TagDict* CfgDict,
|
||||
SETTINGS_DATA& settingsData
|
||||
SETTINGS_DATA& gSettings
|
||||
)
|
||||
{
|
||||
#pragma GCC diagnostic pop
|
||||
@ -2091,10 +2075,10 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
// }
|
||||
// }
|
||||
|
||||
settingsData.KextPatchesAllowed = TRUE;
|
||||
settingsData.KernelAndKextPatches.KPAppleRTC = TRUE;
|
||||
settingsData.KernelAndKextPatches.KPDELLSMBIOS = FALSE; // default is false
|
||||
settingsData.KernelPatchesAllowed = TRUE;
|
||||
gSettings.KextPatchesAllowed = TRUE;
|
||||
gSettings.KernelAndKextPatches.KPAppleRTC = TRUE;
|
||||
gSettings.KernelAndKextPatches.KPDELLSMBIOS = FALSE; // default is false
|
||||
gSettings.KernelPatchesAllowed = TRUE;
|
||||
|
||||
if (CfgDict != NULL) {
|
||||
//DBG("Loading early settings\n");
|
||||
@ -2104,35 +2088,35 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
if (BootDict != NULL) {
|
||||
const TagStruct* Prop = BootDict->propertyForKey("Timeout");
|
||||
if (Prop != NULL) {
|
||||
settingsData.Boot.Timeout = (INT32)GetPropertyAsInteger(Prop, settingsData.Boot.Timeout);
|
||||
DBG("timeout set to %lld\n", settingsData.Boot.Timeout);
|
||||
gSettings.Boot.Timeout = (INT32)GetPropertyAsInteger(Prop, gSettings.Boot.Timeout);
|
||||
DBG("timeout set to %lld\n", gSettings.Boot.Timeout);
|
||||
}
|
||||
|
||||
Prop = BootDict->propertyForKey("SkipHibernateTimeout");
|
||||
settingsData.Boot.SkipHibernateTimeout = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.Boot.SkipHibernateTimeout = IsPropertyNotNullAndTrue(Prop);
|
||||
|
||||
//DisableCloverHotkeys
|
||||
Prop = BootDict->propertyForKey("DisableCloverHotkeys");
|
||||
settingsData.Boot.DisableCloverHotkeys = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.Boot.DisableCloverHotkeys = IsPropertyNotNullAndTrue(Prop);
|
||||
|
||||
Prop = BootDict->propertyForKey("Arguments");
|
||||
if (Prop != NULL && (Prop->isString()) && Prop->getString()->stringValue().notEmpty()) {
|
||||
settingsData.Boot.BootArgs = Prop->getString()->stringValue();
|
||||
gSettings.Boot.BootArgs = Prop->getString()->stringValue();
|
||||
}
|
||||
|
||||
// defaults if "DefaultVolume" is not present or is empty
|
||||
settingsData.Boot.LastBootedVolume = FALSE;
|
||||
gSettings.Boot.LastBootedVolume = FALSE;
|
||||
// settingsData.Boot.DefaultVolume = NULL;
|
||||
|
||||
Prop = BootDict->propertyForKey("DefaultVolume");
|
||||
if (Prop != NULL) {
|
||||
if ( Prop->isString() && Prop->getString()->stringValue().notEmpty() ) {
|
||||
settingsData.Boot.DefaultVolume.setEmpty();
|
||||
gSettings.Boot.DefaultVolume.setEmpty();
|
||||
// check for special value for remembering boot volume
|
||||
if (Prop->getString()->stringValue().equalIC("LastBootedVolume")) {
|
||||
settingsData.Boot.LastBootedVolume = TRUE;
|
||||
gSettings.Boot.LastBootedVolume = TRUE;
|
||||
} else {
|
||||
settingsData.Boot.DefaultVolume = Prop->getString()->stringValue();
|
||||
gSettings.Boot.DefaultVolume = Prop->getString()->stringValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2142,28 +2126,28 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
if ( !Prop->isString() ) {
|
||||
MsgLog("ATTENTION : property not string in DefaultLoader\n");
|
||||
}else{
|
||||
settingsData.Boot.DefaultLoader = Prop->getString()->stringValue();
|
||||
gSettings.Boot.DefaultLoader = Prop->getString()->stringValue();
|
||||
}
|
||||
}
|
||||
|
||||
Prop = BootDict->propertyForKey("Debug");
|
||||
if ( Prop ) {
|
||||
if ( Prop->isString() ) {
|
||||
if ( Prop->getString()->stringValue().equalIC("true") ) settingsData.Boot.DebugLog = true;
|
||||
else if ( Prop->getString()->stringValue().equalIC("false") ) settingsData.Boot.DebugLog = false;
|
||||
if ( Prop->getString()->stringValue().equalIC("true") ) gSettings.Boot.DebugLog = true;
|
||||
else if ( Prop->getString()->stringValue().equalIC("false") ) gSettings.Boot.DebugLog = false;
|
||||
else MsgLog("MALFORMED config.plist : property Boot/Debug must be true, false, or scratch\n");
|
||||
}else if ( Prop->isBool() ) {
|
||||
settingsData.Boot.DebugLog = Prop->getBool()->boolValue();
|
||||
gSettings.Boot.DebugLog = Prop->getBool()->boolValue();
|
||||
}else{
|
||||
MsgLog("MALFORMED config.plist : property Boot/Debug must be a string (true, false) or <true/> or <false/>\n");
|
||||
}
|
||||
}
|
||||
|
||||
Prop = BootDict->propertyForKey("Fast");
|
||||
settingsData.Boot.FastBoot = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.Boot.FastBoot = IsPropertyNotNullAndTrue(Prop);
|
||||
|
||||
Prop = BootDict->propertyForKey("NoEarlyProgress");
|
||||
settingsData.Boot.NoEarlyProgress = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.Boot.NoEarlyProgress = IsPropertyNotNullAndTrue(Prop);
|
||||
|
||||
// if (SpecialBootMode) {
|
||||
// GlobalConfig.isFastBoot() = TRUE;
|
||||
@ -2171,21 +2155,21 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
// }
|
||||
|
||||
Prop = BootDict->propertyForKey("NeverHibernate");
|
||||
settingsData.Boot.NeverHibernate = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.Boot.NeverHibernate = IsPropertyNotNullAndTrue(Prop);
|
||||
|
||||
Prop = BootDict->propertyForKey("StrictHibernate");
|
||||
settingsData.Boot.StrictHibernate = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.Boot.StrictHibernate = IsPropertyNotNullAndTrue(Prop);
|
||||
|
||||
Prop = BootDict->propertyForKey("RtcHibernateAware");
|
||||
settingsData.Boot.RtcHibernateAware = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.Boot.RtcHibernateAware = IsPropertyNotNullAndTrue(Prop);
|
||||
|
||||
Prop = BootDict->propertyForKey("HibernationFixup");
|
||||
if (Prop) {
|
||||
settingsData.Boot.HibernationFixup = IsPropertyNotNullAndTrue(Prop); //it will be set automatically
|
||||
gSettings.Boot.HibernationFixup = IsPropertyNotNullAndTrue(Prop); //it will be set automatically
|
||||
}
|
||||
|
||||
Prop = BootDict->propertyForKey("SignatureFixup");
|
||||
settingsData.Boot.SignatureFixup = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.Boot.SignatureFixup = IsPropertyNotNullAndTrue(Prop);
|
||||
|
||||
// Prop = GetProperty(DictPointer, "GetLegacyLanAddress");
|
||||
// GetLegacyLanAddress = IsPropertyTrue(Prop);
|
||||
@ -2195,41 +2179,44 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
* it is true
|
||||
* SecureBoot is already true.
|
||||
*/
|
||||
gSettings.Boot.SecureSetting = -1;
|
||||
Prop = BootDict->propertyForKey("Secure");
|
||||
if (Prop != NULL) {
|
||||
if ( Prop->isFalse() ) {
|
||||
// Only disable setup mode, we want always secure boot
|
||||
settingsData.Boot.SecureBootSetupMode = 0;
|
||||
} else if ( Prop->isTrue() && !settingsData.Boot.SecureBoot ) {
|
||||
// This mode will force boot policy even when no secure boot or it is disabled
|
||||
settingsData.Boot.SecureBootSetupMode = 1;
|
||||
settingsData.Boot.SecureBoot = 1;
|
||||
}
|
||||
if ( Prop->isTrue() ) gSettings.Boot.SecureSetting = 1;
|
||||
if ( Prop->isFalse() ) gSettings.Boot.SecureSetting = 0;
|
||||
// if ( Prop->isFalse() ) {
|
||||
// // Only disable setup mode, we want always secure boot
|
||||
// settingsData.Boot.SecureBootSetupMode = 0;
|
||||
// } else if ( Prop->isTrue() && !settingsData.Boot.SecureBoot ) {
|
||||
// // This mode will force boot policy even when no secure boot or it is disabled
|
||||
// settingsData.Boot.SecureBootSetupMode = 1;
|
||||
// settingsData.Boot.SecureBoot = 1;
|
||||
// }
|
||||
}
|
||||
// Secure boot policy
|
||||
Prop = BootDict->propertyForKey("Policy");
|
||||
if (Prop != NULL && (Prop->isString()) && Prop->getString()->stringValue().notEmpty()) {
|
||||
if ((Prop->getString()->stringValue()[0] == 'D') || (Prop->getString()->stringValue()[0] == 'd')) {
|
||||
// Deny all images
|
||||
settingsData.Boot.SecureBootPolicy = SECURE_BOOT_POLICY_DENY;
|
||||
gSettings.Boot.SecureBootPolicy = SECURE_BOOT_POLICY_DENY;
|
||||
} else if ((Prop->getString()->stringValue()[0] == 'A') || (Prop->getString()->stringValue()[0] == 'a')) {
|
||||
// Allow all images
|
||||
settingsData.Boot.SecureBootPolicy = SECURE_BOOT_POLICY_ALLOW;
|
||||
gSettings.Boot.SecureBootPolicy = SECURE_BOOT_POLICY_ALLOW;
|
||||
} else if ((Prop->getString()->stringValue()[0] == 'Q') || (Prop->getString()->stringValue()[0] == 'q')) {
|
||||
// Query user
|
||||
settingsData.Boot.SecureBootPolicy = SECURE_BOOT_POLICY_QUERY;
|
||||
gSettings.Boot.SecureBootPolicy = SECURE_BOOT_POLICY_QUERY;
|
||||
} else if ((Prop->getString()->stringValue()[0] == 'I') || (Prop->getString()->stringValue()[0] == 'i')) {
|
||||
// Insert
|
||||
settingsData.Boot.SecureBootPolicy = SECURE_BOOT_POLICY_INSERT;
|
||||
gSettings.Boot.SecureBootPolicy = SECURE_BOOT_POLICY_INSERT;
|
||||
} else if ((Prop->getString()->stringValue()[0] == 'W') || (Prop->getString()->stringValue()[0] == 'w')) {
|
||||
// White list
|
||||
settingsData.Boot.SecureBootPolicy = SECURE_BOOT_POLICY_WHITELIST;
|
||||
gSettings.Boot.SecureBootPolicy = SECURE_BOOT_POLICY_WHITELIST;
|
||||
} else if ((Prop->getString()->stringValue()[0] == 'B') || (Prop->getString()->stringValue()[0] == 'b')) {
|
||||
// Black list
|
||||
settingsData.Boot.SecureBootPolicy = SECURE_BOOT_POLICY_BLACKLIST;
|
||||
gSettings.Boot.SecureBootPolicy = SECURE_BOOT_POLICY_BLACKLIST;
|
||||
} else if ((Prop->getString()->stringValue()[0] == 'U') || (Prop->getString()->stringValue()[0] == 'u')) {
|
||||
// User policy
|
||||
settingsData.Boot.SecureBootPolicy = SECURE_BOOT_POLICY_USER;
|
||||
gSettings.Boot.SecureBootPolicy = SECURE_BOOT_POLICY_USER;
|
||||
}
|
||||
}
|
||||
// Secure boot white list
|
||||
@ -2238,7 +2225,7 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
INTN i;
|
||||
INTN Count = arrayProp->arrayContent().size();
|
||||
if (Count > 0) {
|
||||
settingsData.Boot.SecureBootWhiteList.setEmpty();
|
||||
gSettings.Boot.SecureBootWhiteList.setEmpty();
|
||||
for (i = 0; i < Count; i++) {
|
||||
const TagStruct* prop2 = &arrayProp->arrayContent()[i];
|
||||
if ( !prop2->isString() ) {
|
||||
@ -2246,7 +2233,7 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
continue;
|
||||
}
|
||||
if ( prop2->getString()->stringValue().notEmpty() ) {
|
||||
settingsData.Boot.SecureBootWhiteList.AddNoNull(prop2->getString()->stringValue());
|
||||
gSettings.Boot.SecureBootWhiteList.AddNoNull(prop2->getString()->stringValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2257,7 +2244,7 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
INTN i;
|
||||
INTN Count = arrayProp->arrayContent().size();
|
||||
if (Count > 0) {
|
||||
settingsData.Boot.SecureBootBlackList.setEmpty();
|
||||
gSettings.Boot.SecureBootBlackList.setEmpty();
|
||||
for (i = 0; i < Count; i++) {
|
||||
const TagStruct* prop2 = &arrayProp->arrayContent()[i];
|
||||
if ( !prop2->isString() ) {
|
||||
@ -2265,7 +2252,7 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
continue;
|
||||
}
|
||||
if ( prop2->getString()->stringValue().notEmpty() ) {
|
||||
settingsData.Boot.SecureBootBlackList.AddNoNull(prop2->getString()->stringValue());
|
||||
gSettings.Boot.SecureBootBlackList.AddNoNull(prop2->getString()->stringValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2278,23 +2265,23 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
// 2 = Use second profile
|
||||
Prop = BootDict->propertyForKey("XMPDetection");
|
||||
if (Prop != NULL) {
|
||||
settingsData.Boot.XMPDetection = 0;
|
||||
gSettings.Boot.XMPDetection = 0;
|
||||
if ( Prop->isFalse() ) {
|
||||
settingsData.Boot.XMPDetection = -1;
|
||||
gSettings.Boot.XMPDetection = -1;
|
||||
} else if ( Prop->isString() ) {
|
||||
if ((Prop->getString()->stringValue()[0] == 'n') ||
|
||||
(Prop->getString()->stringValue()[0] == 'N') ||
|
||||
(Prop->getString()->stringValue()[0] == '-')) {
|
||||
settingsData.Boot.XMPDetection = -1;
|
||||
gSettings.Boot.XMPDetection = -1;
|
||||
} else {
|
||||
settingsData.Boot.XMPDetection = (INT8)AsciiStrDecimalToUintn(Prop->getString()->stringValue().c_str());
|
||||
gSettings.Boot.XMPDetection = (INT8)AsciiStrDecimalToUintn(Prop->getString()->stringValue().c_str());
|
||||
}
|
||||
} else if (Prop->isInt64()) {
|
||||
settingsData.Boot.XMPDetection = (INT8)Prop->getInt64()->intValue();
|
||||
gSettings.Boot.XMPDetection = (INT8)Prop->getInt64()->intValue();
|
||||
}
|
||||
// Check that the setting value is sane
|
||||
if ((settingsData.Boot.XMPDetection < -1) || (settingsData.Boot.XMPDetection > 2)) {
|
||||
settingsData.Boot.XMPDetection = -1;
|
||||
if ((gSettings.Boot.XMPDetection < -1) || (gSettings.Boot.XMPDetection > 2)) {
|
||||
gSettings.Boot.XMPDetection = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2304,87 +2291,90 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
if ( !Prop->isString() ) {
|
||||
MsgLog("ATTENTION : Prop property not string in Legacy\n");
|
||||
}else{
|
||||
settingsData.Boot.LegacyBoot = Prop->getString()->stringValue();
|
||||
gSettings.Boot.LegacyBoot = Prop->getString()->stringValue();
|
||||
}
|
||||
} else if (gFirmwareClover) {
|
||||
// default for CLOVER EFI boot
|
||||
settingsData.Boot.LegacyBoot = "PBR"_XS8;
|
||||
gSettings.Boot.LegacyBoot = "PBR"_XS8;
|
||||
} else {
|
||||
// default for UEFI boot
|
||||
settingsData.Boot.LegacyBoot = "LegacyBiosDefault"_XS8;
|
||||
gSettings.Boot.LegacyBoot = "LegacyBiosDefault"_XS8;
|
||||
}
|
||||
|
||||
// Entry for LegacyBiosDefault
|
||||
Prop = BootDict->propertyForKey("LegacyBiosDefaultEntry");
|
||||
if (Prop != NULL) {
|
||||
settingsData.Boot.LegacyBiosDefaultEntry = (UINT16)GetPropertyAsInteger(Prop, 0); // disabled by default
|
||||
gSettings.Boot.LegacyBiosDefaultEntry = (UINT16)GetPropertyAsInteger(Prop, 0); // disabled by default
|
||||
}
|
||||
|
||||
// Whether or not to draw boot screen
|
||||
gSettings.Boot.CustomLogoAsXString8.setEmpty();
|
||||
gSettings.Boot.CustomLogoAsData.setEmpty();
|
||||
Prop = BootDict->propertyForKey("CustomLogo");
|
||||
if (Prop != NULL) {
|
||||
if (IsPropertyNotNullAndTrue(Prop)) {
|
||||
settingsData.Boot.CustomBoot = CUSTOM_BOOT_APPLE;
|
||||
gSettings.Boot.CustomBootSetting = CUSTOM_BOOT_APPLE;
|
||||
} else if ((Prop->isString()) && Prop->getString()->stringValue().notEmpty()) {
|
||||
gSettings.Boot.CustomLogoAsXString8 = Prop->getString()->stringValue();
|
||||
if (Prop->getString()->stringValue().equalIC("Apple")) {
|
||||
settingsData.Boot.CustomBoot = CUSTOM_BOOT_APPLE;
|
||||
gSettings.Boot.CustomBootSetting = CUSTOM_BOOT_APPLE;
|
||||
} else if (Prop->getString()->stringValue().equalIC("Alternate")) {
|
||||
settingsData.Boot.CustomBoot = CUSTOM_BOOT_ALT_APPLE;
|
||||
gSettings.Boot.CustomBootSetting = CUSTOM_BOOT_ALT_APPLE;
|
||||
} else if (Prop->getString()->stringValue().equalIC("Theme")) {
|
||||
settingsData.Boot.CustomBoot = CUSTOM_BOOT_THEME;
|
||||
gSettings.Boot.CustomBootSetting = CUSTOM_BOOT_THEME;
|
||||
} else {
|
||||
XStringW customLogo = XStringW() = Prop->getString()->stringValue();
|
||||
settingsData.Boot.CustomBoot = CUSTOM_BOOT_USER;
|
||||
if (settingsData.Boot.CustomLogo != NULL) {
|
||||
delete settingsData.Boot.CustomLogo;
|
||||
}
|
||||
settingsData.Boot.CustomLogo = new XImage;
|
||||
settingsData.Boot.CustomLogo->LoadXImage(&self.getSelfVolumeRootDir(), customLogo);
|
||||
if (settingsData.Boot.CustomLogo->isEmpty()) {
|
||||
DBG("Custom boot logo not found at path `%ls`!\n", customLogo.wc_str());
|
||||
settingsData.Boot.CustomBoot = CUSTOM_BOOT_DISABLED;
|
||||
}
|
||||
gSettings.Boot.CustomBootSetting = CUSTOM_BOOT_USER;
|
||||
// if (settingsData.Boot.CustomLogo != NULL) {
|
||||
// delete settingsData.Boot.CustomLogo;
|
||||
// }
|
||||
// settingsData.Boot.CustomLogo = new XImage;
|
||||
// settingsData.Boot.CustomLogo->LoadXImage(&self.getSelfVolumeRootDir(), customLogo);
|
||||
// if (settingsData.Boot.CustomLogo->isEmpty()) {
|
||||
// DBG("Custom boot logo not found at path `%ls`!\n", customLogo.wc_str());
|
||||
// settingsData.Boot.CustomBoot = CUSTOM_BOOT_DISABLED;
|
||||
// }
|
||||
}
|
||||
} else if ( Prop->isData() && Prop->getData()->dataLenValue() > 0 ) {
|
||||
settingsData.Boot.CustomBoot = CUSTOM_BOOT_USER;
|
||||
if (settingsData.Boot.CustomLogo != NULL) {
|
||||
delete settingsData.Boot.CustomLogo;
|
||||
}
|
||||
settingsData.Boot.CustomLogo = new XImage;
|
||||
settingsData.Boot.CustomLogo->FromPNG(Prop->getData()->dataValue(), Prop->getData()->dataLenValue());
|
||||
if (settingsData.Boot.CustomLogo->isEmpty()) {
|
||||
DBG("Custom boot logo not decoded from data!\n"/*, Prop->getString()->stringValue().c_str()*/);
|
||||
settingsData.Boot.CustomBoot = CUSTOM_BOOT_DISABLED;
|
||||
}
|
||||
gSettings.Boot.CustomLogoAsData = Prop->getData()->data();
|
||||
gSettings.Boot.CustomBootSetting = CUSTOM_BOOT_USER;
|
||||
// if (settingsData.Boot.CustomLogo != NULL) {
|
||||
// delete settingsData.Boot.CustomLogo;
|
||||
// }
|
||||
// settingsData.Boot.CustomLogo = new XImage;
|
||||
// settingsData.Boot.CustomLogo->FromPNG(Prop->getData()->dataValue(), Prop->getData()->dataLenValue());
|
||||
// if (settingsData.Boot.CustomLogo->isEmpty()) {
|
||||
// DBG("Custom boot logo not decoded from data!\n"/*, Prop->getString()->stringValue().c_str()*/);
|
||||
// settingsData.Boot.CustomBoot = CUSTOM_BOOT_DISABLED;
|
||||
// }
|
||||
} else {
|
||||
settingsData.Boot.CustomBoot = CUSTOM_BOOT_USER_DISABLED;
|
||||
gSettings.Boot.CustomBootSetting = CUSTOM_BOOT_USER_DISABLED;
|
||||
}
|
||||
} else {
|
||||
settingsData.Boot.CustomBoot = CUSTOM_BOOT_DISABLED;
|
||||
gSettings.Boot.CustomBootSetting = CUSTOM_BOOT_DISABLED;
|
||||
}
|
||||
DBG("Custom boot %s (0x%llX)\n", CustomBootModeToStr(settingsData.Boot.CustomBoot), (uintptr_t)settingsData.Boot.CustomLogo);
|
||||
|
||||
}
|
||||
|
||||
//*** SYSTEM ***
|
||||
settingsData.WithKexts = TRUE; //default
|
||||
gSettings.WithKexts = TRUE; //default
|
||||
const TagDict* SystemParametersDict = CfgDict->dictPropertyForKey("SystemParameters");
|
||||
if (SystemParametersDict != NULL) {
|
||||
// Inject kexts
|
||||
const TagStruct* Prop = SystemParametersDict->propertyForKey("InjectKexts");
|
||||
if (Prop != NULL) {
|
||||
if (IsPropertyNotNullAndTrue(Prop)) {
|
||||
settingsData.WithKexts = TRUE;
|
||||
gSettings.WithKexts = TRUE;
|
||||
} else if ((Prop->isString()) &&
|
||||
(Prop->getString()->stringValue().equalIC("Detect"))) {
|
||||
// settingsData.WithKexts = TRUE;
|
||||
settingsData.WithKextsIfNoFakeSMC = TRUE;
|
||||
gSettings.WithKextsIfNoFakeSMC = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
// No caches - obsolete
|
||||
Prop = SystemParametersDict->propertyForKey("NoCaches");
|
||||
if (IsPropertyNotNullAndTrue(Prop)) {
|
||||
settingsData.NoCaches = TRUE;
|
||||
gSettings.NoCaches = TRUE;
|
||||
}
|
||||
//test float - success
|
||||
// Prop = SystemParametersDict->propertyForKey("BlueValue");
|
||||
@ -2396,18 +2386,18 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
// KernelAndKextPatches
|
||||
const TagDict* KernelAndKextPatchesDict = CfgDict->dictPropertyForKey("KernelAndKextPatches");
|
||||
if (KernelAndKextPatchesDict != NULL) {
|
||||
FillinKextPatches(&settingsData.KernelAndKextPatches, KernelAndKextPatchesDict);
|
||||
FillinKextPatches(&gSettings.KernelAndKextPatches, KernelAndKextPatchesDict);
|
||||
}
|
||||
|
||||
const TagDict* GUIDict = CfgDict->dictPropertyForKey("GUI");
|
||||
if (GUIDict != NULL) {
|
||||
const TagStruct* Prop = GUIDict->propertyForKey("Timezone");
|
||||
settingsData.GUI.Timezone = (INT32)GetPropertyAsInteger(Prop, settingsData.GUI.Timezone);
|
||||
gSettings.GUI.Timezone = (INT32)GetPropertyAsInteger(Prop, gSettings.GUI.Timezone);
|
||||
//initialize Daylight when we know timezone
|
||||
#ifdef CLOVER_BUILD
|
||||
EFI_TIME Now;
|
||||
gRT->GetTime(&Now, NULL);
|
||||
INT32 NowHour = Now.Hour + settingsData.GUI.Timezone;
|
||||
INT32 NowHour = Now.Hour + gSettings.GUI.Timezone;
|
||||
if (NowHour < 0 ) NowHour += 24;
|
||||
if (NowHour >= 24 ) NowHour -= 24;
|
||||
ThemeX.Daylight = (NowHour > 8) && (NowHour < 20);
|
||||
@ -2416,12 +2406,12 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
Prop = GUIDict->propertyForKey("Theme");
|
||||
if (Prop != NULL && (Prop->isString()) && Prop->getString()->stringValue().notEmpty()) {
|
||||
ThemeX.Theme.takeValueFrom(Prop->getString()->stringValue());
|
||||
settingsData.GUI.Theme.takeValueFrom(Prop->getString()->stringValue());
|
||||
DBG("Default theme: %ls\n", settingsData.GUI.Theme.wc_str());
|
||||
gSettings.GUI.Theme.takeValueFrom(Prop->getString()->stringValue());
|
||||
DBG("Default theme: %ls\n", gSettings.GUI.Theme.wc_str());
|
||||
OldChosenTheme = 0xFFFF; //default for embedded
|
||||
for (UINTN i = 0; i < ThemeNameArray.size(); i++) {
|
||||
//now comparison is case sensitive
|
||||
if ( settingsData.GUI.Theme.equalIC(ThemeNameArray[i]) ) {
|
||||
if ( gSettings.GUI.Theme.equalIC(ThemeNameArray[i]) ) {
|
||||
OldChosenTheme = i;
|
||||
break;
|
||||
}
|
||||
@ -2442,61 +2432,61 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
}
|
||||
}
|
||||
Prop = GUIDict->propertyForKey("PlayAsync"); //PlayAsync
|
||||
settingsData.PlayAsync = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.PlayAsync = IsPropertyNotNullAndTrue(Prop);
|
||||
|
||||
// CustomIcons
|
||||
Prop = GUIDict->propertyForKey("CustomIcons");
|
||||
settingsData.GUI.CustomIcons = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.GUI.CustomIcons = IsPropertyNotNullAndTrue(Prop);
|
||||
Prop = GUIDict->propertyForKey("TextOnly");
|
||||
settingsData.GUI.TextOnly = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.GUI.TextOnly = IsPropertyNotNullAndTrue(Prop);
|
||||
Prop = GUIDict->propertyForKey("ShowOptimus");
|
||||
settingsData.GUI.ShowOptimus = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.GUI.ShowOptimus = IsPropertyNotNullAndTrue(Prop);
|
||||
|
||||
Prop = GUIDict->propertyForKey("ScreenResolution");
|
||||
if (Prop != NULL) {
|
||||
if ((Prop->isString()) && Prop->getString()->stringValue().notEmpty()) {
|
||||
settingsData.GUI.ScreenResolution.takeValueFrom(Prop->getString()->stringValue());
|
||||
gSettings.GUI.ScreenResolution.takeValueFrom(Prop->getString()->stringValue());
|
||||
}
|
||||
}
|
||||
|
||||
Prop = GUIDict->propertyForKey("ProvideConsoleGop");
|
||||
settingsData.ProvideConsoleGop = !IsPropertyNotNullAndFalse(Prop); //default is true
|
||||
gSettings.ProvideConsoleGop = !IsPropertyNotNullAndFalse(Prop); //default is true
|
||||
|
||||
Prop = GUIDict->propertyForKey("ConsoleMode");
|
||||
if (Prop != NULL) {
|
||||
if (Prop->isInt64()) {
|
||||
settingsData.GUI.ConsoleMode = Prop->getInt64()->intValue();
|
||||
gSettings.GUI.ConsoleMode = Prop->getInt64()->intValue();
|
||||
} else if ((Prop->isString()) && Prop->getString()->stringValue().notEmpty()) {
|
||||
if ( Prop->getString()->stringValue().contains("Max") ) {
|
||||
settingsData.GUI.ConsoleMode = -1;
|
||||
gSettings.GUI.ConsoleMode = -1;
|
||||
DBG("ConsoleMode will be set to highest mode\n");
|
||||
} else if ( Prop->getString()->stringValue().contains("Min") ) {
|
||||
settingsData.GUI.ConsoleMode = -2;
|
||||
gSettings.GUI.ConsoleMode = -2;
|
||||
DBG("ConsoleMode will be set to lowest mode\n");
|
||||
} else {
|
||||
settingsData.GUI.ConsoleMode = (INT32)AsciiStrDecimalToUintn(Prop->getString()->stringValue());
|
||||
gSettings.GUI.ConsoleMode = (INT32)AsciiStrDecimalToUintn(Prop->getString()->stringValue());
|
||||
}
|
||||
}
|
||||
if (settingsData.GUI.ConsoleMode > 0) {
|
||||
DBG("ConsoleMode will be set to mode #%lld\n", settingsData.GUI.ConsoleMode);
|
||||
if (gSettings.GUI.ConsoleMode > 0) {
|
||||
DBG("ConsoleMode will be set to mode #%lld\n", gSettings.GUI.ConsoleMode);
|
||||
}
|
||||
}
|
||||
|
||||
Prop = GUIDict->propertyForKey("Language");
|
||||
if (Prop != NULL) {
|
||||
settingsData.Language = Prop->getString()->stringValue();
|
||||
gSettings.Language = Prop->getString()->stringValue();
|
||||
if ( Prop->getString()->stringValue().contains("en") ) {
|
||||
gLanguage = english;
|
||||
settingsData.GUI.Codepage = 0xC0;
|
||||
settingsData.GUI.CodepageSize = 0;
|
||||
gSettings.GUI.Codepage = 0xC0;
|
||||
gSettings.GUI.CodepageSize = 0;
|
||||
} else if ( Prop->getString()->stringValue().contains("ru")) {
|
||||
gLanguage = russian;
|
||||
settingsData.GUI.Codepage = 0x410;
|
||||
settingsData.GUI.CodepageSize = 0x40;
|
||||
gSettings.GUI.Codepage = 0x410;
|
||||
gSettings.GUI.CodepageSize = 0x40;
|
||||
} else if ( Prop->getString()->stringValue().contains("ua")) {
|
||||
gLanguage = ukrainian;
|
||||
settingsData.GUI.Codepage = 0x400;
|
||||
settingsData.GUI.CodepageSize = 0x60;
|
||||
gSettings.GUI.Codepage = 0x400;
|
||||
gSettings.GUI.CodepageSize = 0x60;
|
||||
} else if ( Prop->getString()->stringValue().contains("fr")) {
|
||||
gLanguage = french; //default is extended latin
|
||||
} else if ( Prop->getString()->stringValue().contains("it")) {
|
||||
@ -2521,21 +2511,21 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
gLanguage = indonesian;
|
||||
} else if ( Prop->getString()->stringValue().contains("zh_CN")) {
|
||||
gLanguage = chinese;
|
||||
settingsData.GUI.Codepage = 0x3400;
|
||||
settingsData.GUI.CodepageSize = 0x19C0;
|
||||
gSettings.GUI.Codepage = 0x3400;
|
||||
gSettings.GUI.CodepageSize = 0x19C0;
|
||||
} else if ( Prop->getString()->stringValue().contains("ro")) {
|
||||
gLanguage = romanian;
|
||||
} else if ( Prop->getString()->stringValue().contains("ko")) {
|
||||
gLanguage = korean;
|
||||
settingsData.GUI.Codepage = 0x1100;
|
||||
settingsData.GUI.CodepageSize = 0x100;
|
||||
gSettings.GUI.Codepage = 0x1100;
|
||||
gSettings.GUI.CodepageSize = 0x100;
|
||||
}
|
||||
}
|
||||
|
||||
// if (settingsData.Language != NULL) { // settingsData.Language != NULL cannot be false because settingsData.Language is dclared as CHAR8 Language[16]; Must we replace by settingsData.Language[0] != NULL
|
||||
Prop = GUIDict->propertyForKey("KbdPrevLang");
|
||||
if (Prop != NULL) {
|
||||
settingsData.KbdPrevLang = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.KbdPrevLang = IsPropertyNotNullAndTrue(Prop);
|
||||
}
|
||||
// }
|
||||
|
||||
@ -2543,23 +2533,23 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
if (MouseDict != NULL) {
|
||||
const TagStruct* prop = MouseDict->propertyForKey("Speed");
|
||||
if (prop != NULL) {
|
||||
settingsData.PointerSpeed = (INT32)GetPropertyAsInteger(prop, 0);
|
||||
settingsData.PointerEnabled = (settingsData.PointerSpeed != 0);
|
||||
gSettings.PointerSpeed = (INT32)GetPropertyAsInteger(prop, 0);
|
||||
gSettings.PointerEnabled = (gSettings.PointerSpeed != 0);
|
||||
}
|
||||
//but we can disable mouse even if there was positive speed
|
||||
prop = MouseDict->propertyForKey("Enabled");
|
||||
if (IsPropertyNotNullAndFalse(prop)) {
|
||||
settingsData.PointerEnabled = FALSE;
|
||||
gSettings.PointerEnabled = FALSE;
|
||||
}
|
||||
|
||||
prop = MouseDict->propertyForKey("Mirror");
|
||||
if (IsPropertyNotNullAndTrue(prop)) {
|
||||
settingsData.PointerMirror = TRUE;
|
||||
gSettings.PointerMirror = TRUE;
|
||||
}
|
||||
|
||||
prop = MouseDict->propertyForKey("DoubleClickTime");
|
||||
if (prop != NULL) {
|
||||
settingsData.DoubleClickTime = (UINT64)GetPropertyAsInteger(prop, 500);
|
||||
gSettings.DoubleClickTime = (UINT64)GetPropertyAsInteger(prop, 500);
|
||||
}
|
||||
}
|
||||
// hide by name/uuid. Array of string
|
||||
@ -2568,7 +2558,7 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
INTN i;
|
||||
INTN Count = HideArray->arrayContent().size();
|
||||
if (Count > 0) {
|
||||
settingsData.HVHideStrings.setEmpty();
|
||||
gSettings.HVHideStrings.setEmpty();
|
||||
for (i = 0; i < Count; i++) {
|
||||
const TagStruct* prop2 = &HideArray->arrayContent()[i];
|
||||
if ( !prop2->isString()) {
|
||||
@ -2576,60 +2566,60 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
continue;
|
||||
}
|
||||
if ( prop2->getString()->stringValue().notEmpty() ) {
|
||||
settingsData.HVHideStrings.Add(prop2->getString()->stringValue());
|
||||
gSettings.HVHideStrings.Add(prop2->getString()->stringValue());
|
||||
DBG("Hiding entries with string %s\n", prop2->getString()->stringValue().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
settingsData.LinuxScan = TRUE;
|
||||
gSettings.LinuxScan = TRUE;
|
||||
// Disable loader scan
|
||||
Prop = GUIDict->propertyForKey("Scan");
|
||||
if (Prop != NULL) {
|
||||
if (IsPropertyNotNullAndFalse(Prop)) {
|
||||
settingsData.DisableEntryScan = TRUE;
|
||||
settingsData.DisableToolScan = TRUE;
|
||||
settingsData.GUI.NoLegacy = TRUE;
|
||||
gSettings.DisableEntryScan = TRUE;
|
||||
gSettings.DisableToolScan = TRUE;
|
||||
gSettings.GUI.NoLegacy = TRUE;
|
||||
} else if (Prop->isDict()) {
|
||||
const TagStruct* prop2 = Prop->getDict()->propertyForKey("Entries");
|
||||
if (IsPropertyNotNullAndFalse(prop2)) {
|
||||
settingsData.DisableEntryScan = TRUE;
|
||||
gSettings.DisableEntryScan = TRUE;
|
||||
}
|
||||
prop2 = Prop->getDict()->propertyForKey("Tool");
|
||||
if (IsPropertyNotNullAndFalse(prop2)) {
|
||||
settingsData.DisableToolScan = TRUE;
|
||||
gSettings.DisableToolScan = TRUE;
|
||||
}
|
||||
prop2 = Prop->getDict()->propertyForKey("Linux");
|
||||
settingsData.LinuxScan = !IsPropertyNotNullAndFalse(prop2);
|
||||
gSettings.LinuxScan = !IsPropertyNotNullAndFalse(prop2);
|
||||
prop2 = Prop->getDict()->propertyForKey("Legacy");
|
||||
if (prop2 != NULL) {
|
||||
if (prop2->isFalse()) {
|
||||
settingsData.GUI.NoLegacy = TRUE;
|
||||
gSettings.GUI.NoLegacy = TRUE;
|
||||
} else if ((prop2->isString()) && prop2->getString()->stringValue().notEmpty() ) {
|
||||
if ((prop2->getString()->stringValue()[0] == 'N') || (prop2->getString()->stringValue()[0] == 'n')) {
|
||||
settingsData.GUI.NoLegacy = TRUE;
|
||||
gSettings.GUI.NoLegacy = TRUE;
|
||||
} else if ((prop2->getString()->stringValue()[0] == 'F') || (prop2->getString()->stringValue()[0] == 'f')) {
|
||||
settingsData.GUI.LegacyFirst = TRUE;
|
||||
gSettings.GUI.LegacyFirst = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
prop2 = Prop->getDict()->propertyForKey("Kernel");
|
||||
if (prop2 != NULL) {
|
||||
if (prop2->isFalse()) {
|
||||
settingsData.KernelScan = KERNEL_SCAN_NONE;
|
||||
gSettings.KernelScan = KERNEL_SCAN_NONE;
|
||||
} else if ((prop2->isString()) && prop2->getString()->stringValue().notEmpty() ) {
|
||||
if ((prop2->getString()->stringValue()[0] == 'N') || (prop2->getString()->stringValue()[0] == 'n')) {
|
||||
settingsData.KernelScan = ( prop2->getString()->stringValue().length() > 1 && (prop2->getString()->stringValue()[1] == 'E' || prop2->getString()->stringValue()[1] == 'e') ) ? KERNEL_SCAN_NEWEST : KERNEL_SCAN_NONE;
|
||||
gSettings.KernelScan = ( prop2->getString()->stringValue().length() > 1 && (prop2->getString()->stringValue()[1] == 'E' || prop2->getString()->stringValue()[1] == 'e') ) ? KERNEL_SCAN_NEWEST : KERNEL_SCAN_NONE;
|
||||
} else if ((prop2->getString()->stringValue()[0] == 'O') || (prop2->getString()->stringValue()[0] == 'o')) {
|
||||
settingsData.KernelScan = KERNEL_SCAN_OLDEST;
|
||||
gSettings.KernelScan = KERNEL_SCAN_OLDEST;
|
||||
} else if ((prop2->getString()->stringValue()[0] == 'F') || (prop2->getString()->stringValue()[0] == 'f')) {
|
||||
settingsData.KernelScan = KERNEL_SCAN_FIRST;
|
||||
gSettings.KernelScan = KERNEL_SCAN_FIRST;
|
||||
} else if ((prop2->getString()->stringValue()[0] == 'L') || (prop2->getString()->stringValue()[0] == 'l')) {
|
||||
settingsData.KernelScan = KERNEL_SCAN_LAST;
|
||||
gSettings.KernelScan = KERNEL_SCAN_LAST;
|
||||
} else if ((prop2->getString()->stringValue()[0] == 'M') || (prop2->getString()->stringValue()[0] == 'm')) {
|
||||
settingsData.KernelScan = KERNEL_SCAN_MOSTRECENT;
|
||||
gSettings.KernelScan = KERNEL_SCAN_MOSTRECENT;
|
||||
} else if ((prop2->getString()->stringValue()[0] == 'E') || (prop2->getString()->stringValue()[0] == 'e')) {
|
||||
settingsData.KernelScan = KERNEL_SCAN_EARLIEST;
|
||||
gSettings.KernelScan = KERNEL_SCAN_EARLIEST;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2693,9 +2683,9 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
if (GraphicsDict != NULL) {
|
||||
|
||||
const TagStruct* Prop = GraphicsDict->propertyForKey("PatchVBios");
|
||||
settingsData.PatchVBios = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.PatchVBios = IsPropertyNotNullAndTrue(Prop);
|
||||
|
||||
settingsData.PatchVBiosBytesCount = 0;
|
||||
gSettings.PatchVBiosBytesCount = 0;
|
||||
|
||||
const TagArray* Dict2 = GraphicsDict->arrayPropertyForKey("PatchVBiosBytes"); // array of dict
|
||||
if (Dict2 != NULL) {
|
||||
@ -2706,14 +2696,14 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
UINTN ReplaceSize = 0;
|
||||
BOOLEAN Valid;
|
||||
// alloc space for up to 16 entries
|
||||
settingsData.PatchVBiosBytes = (__typeof__(settingsData.PatchVBiosBytes))AllocateZeroPool(Count * sizeof(VBIOS_PATCH_BYTES));
|
||||
gSettings.PatchVBiosBytes = (__typeof__(gSettings.PatchVBiosBytes))AllocateZeroPool(Count * sizeof(VBIOS_PATCH_BYTES));
|
||||
|
||||
// get all entries
|
||||
for (INTN i = 0; i < Count; i++) {
|
||||
const TagDict* dict3 = Dict2->dictElementAt(i, "Graphics/PatchVBiosBytes"_XS8);
|
||||
Valid = TRUE;
|
||||
// read entry
|
||||
VBiosPatch = &settingsData.PatchVBiosBytes[settingsData.PatchVBiosBytesCount];
|
||||
VBiosPatch = &gSettings.PatchVBiosBytes[gSettings.PatchVBiosBytesCount];
|
||||
VBiosPatch->Find = GetDataSetting (dict3, "Find", &FindSize);
|
||||
VBiosPatch->Replace = GetDataSetting (dict3, "Replace", &ReplaceSize);
|
||||
|
||||
@ -2735,7 +2725,7 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
if (Valid) {
|
||||
VBiosPatch->NumberOfBytes = FindSize;
|
||||
// go to next entry
|
||||
++settingsData.PatchVBiosBytesCount;
|
||||
++gSettings.PatchVBiosBytesCount;
|
||||
} else {
|
||||
// error - release mem
|
||||
if (VBiosPatch->Find != NULL) {
|
||||
@ -2750,9 +2740,9 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
}
|
||||
}
|
||||
|
||||
if (settingsData.PatchVBiosBytesCount == 0) {
|
||||
FreePool(settingsData.PatchVBiosBytes);
|
||||
settingsData.PatchVBiosBytes = NULL;
|
||||
if (gSettings.PatchVBiosBytesCount == 0) {
|
||||
FreePool(gSettings.PatchVBiosBytes);
|
||||
gSettings.PatchVBiosBytes = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2765,7 +2755,7 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
INTN i;
|
||||
INTN Count = DisableDriversArray->arrayContent().size();
|
||||
if (Count > 0) {
|
||||
settingsData.DisabledDriverArray.setEmpty();
|
||||
gSettings.DisabledDriverArray.setEmpty();
|
||||
|
||||
for (i = 0; i < Count; i++) {
|
||||
const TagStruct* Prop = &DisableDriversArray->arrayContent()[i];
|
||||
@ -2773,7 +2763,7 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
MsgLog("MALFORMED PLIST : DisableDrivers must be an array of string");
|
||||
continue;
|
||||
}
|
||||
settingsData.DisabledDriverArray.Add(Prop->getString()->stringValue());
|
||||
gSettings.DisabledDriverArray.Add(Prop->getString()->stringValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2784,7 +2774,7 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
if (Dict2 != NULL) {
|
||||
// HDA
|
||||
const TagStruct* Prop = Dict2->propertyForKey("ResetHDA");
|
||||
settingsData.ResetHDA = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.ResetHDA = IsPropertyNotNullAndTrue(Prop);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2803,7 +2793,7 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
}
|
||||
}
|
||||
|
||||
settingsData.mmioWhiteListArray.setEmpty();
|
||||
gSettings.mmioWhiteListArray.setEmpty();
|
||||
// const TagDict* OcQuirksDict = CfgDict->dictPropertyForKey("OcQuirks");
|
||||
//if ( OcQuirksDict ) panic("config.plist/OcQuirks has been renamed Quirks. Update your config.plist");
|
||||
|
||||
@ -2813,59 +2803,59 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
const TagStruct* Prop;
|
||||
Prop = OcQuirksDict->propertyForKey("AvoidRuntimeDefrag");
|
||||
//if ( !Prop ) panic("Cannot find AvoidRuntimeDefrag in OcQuirks under root (OC booter quirks)");
|
||||
settingsData.ocBooterQuirks.AvoidRuntimeDefrag = !IsPropertyNotNullAndFalse(Prop); //true if absent so no panic
|
||||
settingsData.QuirksMask |= settingsData.ocBooterQuirks.AvoidRuntimeDefrag? QUIRK_DEFRAG:0;
|
||||
gSettings.ocBooterQuirks.AvoidRuntimeDefrag = !IsPropertyNotNullAndFalse(Prop); //true if absent so no panic
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.AvoidRuntimeDefrag? QUIRK_DEFRAG:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "DevirtualiseMmio");
|
||||
settingsData.ocBooterQuirks.DevirtualiseMmio = IsPropertyNotNullAndTrue(Prop);
|
||||
settingsData.QuirksMask |= settingsData.ocBooterQuirks.DevirtualiseMmio? QUIRK_MMIO:0;
|
||||
gSettings.ocBooterQuirks.DevirtualiseMmio = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.DevirtualiseMmio? QUIRK_MMIO:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "DisableSingleUser");
|
||||
settingsData.ocBooterQuirks.DisableSingleUser = IsPropertyNotNullAndTrue(Prop);
|
||||
settingsData.QuirksMask |= settingsData.ocBooterQuirks.DisableSingleUser? QUIRK_SU:0;
|
||||
gSettings.ocBooterQuirks.DisableSingleUser = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.DisableSingleUser? QUIRK_SU:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "DisableVariableWrite");
|
||||
settingsData.ocBooterQuirks.DisableVariableWrite = IsPropertyNotNullAndTrue(Prop);
|
||||
settingsData.QuirksMask |= settingsData.ocBooterQuirks.DisableVariableWrite? QUIRK_VAR:0;
|
||||
gSettings.ocBooterQuirks.DisableVariableWrite = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.DisableVariableWrite? QUIRK_VAR:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "DiscardHibernateMap");
|
||||
settingsData.ocBooterQuirks.DiscardHibernateMap = IsPropertyNotNullAndTrue(Prop);
|
||||
settingsData.QuirksMask |= settingsData.ocBooterQuirks.DiscardHibernateMap? QUIRK_HIBER:0;
|
||||
gSettings.ocBooterQuirks.DiscardHibernateMap = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.DiscardHibernateMap? QUIRK_HIBER:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "EnableSafeModeSlide");
|
||||
settingsData.ocBooterQuirks.EnableSafeModeSlide = !IsPropertyNotNullAndFalse(Prop);
|
||||
settingsData.QuirksMask |= settingsData.ocBooterQuirks.EnableSafeModeSlide? QUIRK_SAFE:0;
|
||||
gSettings.ocBooterQuirks.EnableSafeModeSlide = !IsPropertyNotNullAndFalse(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.EnableSafeModeSlide? QUIRK_SAFE:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "EnableWriteUnprotector");
|
||||
settingsData.ocBooterQuirks.EnableWriteUnprotector = !IsPropertyNotNullAndFalse(Prop);
|
||||
settingsData.QuirksMask |= settingsData.ocBooterQuirks.EnableWriteUnprotector? QUIRK_UNPROT:0;
|
||||
gSettings.ocBooterQuirks.EnableWriteUnprotector = !IsPropertyNotNullAndFalse(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.EnableWriteUnprotector? QUIRK_UNPROT:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "ForceExitBootServices");
|
||||
settingsData.ocBooterQuirks.ForceExitBootServices = IsPropertyNotNullAndTrue(Prop);
|
||||
settingsData.QuirksMask |= settingsData.ocBooterQuirks.ForceExitBootServices? QUIRK_EXIT:0;
|
||||
gSettings.ocBooterQuirks.ForceExitBootServices = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.ForceExitBootServices? QUIRK_EXIT:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "ProtectMemoryRegions");
|
||||
settingsData.ocBooterQuirks.ProtectMemoryRegions = IsPropertyNotNullAndTrue(Prop);
|
||||
settingsData.QuirksMask |= settingsData.ocBooterQuirks.ProtectMemoryRegions? QUIRK_REGION:0;
|
||||
gSettings.ocBooterQuirks.ProtectMemoryRegions = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.ProtectMemoryRegions? QUIRK_REGION:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "ProtectSecureBoot");
|
||||
settingsData.ocBooterQuirks.ProtectSecureBoot = IsPropertyNotNullAndTrue(Prop);
|
||||
settingsData.QuirksMask |= settingsData.ocBooterQuirks.ProtectSecureBoot? QUIRK_SECURE:0;
|
||||
gSettings.ocBooterQuirks.ProtectSecureBoot = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.ProtectSecureBoot? QUIRK_SECURE:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "ProtectUefiServices");
|
||||
settingsData.ocBooterQuirks.ProtectUefiServices = IsPropertyNotNullAndTrue(Prop);
|
||||
settingsData.QuirksMask |= settingsData.ocBooterQuirks.ProtectUefiServices? QUIRK_UEFI:0;
|
||||
gSettings.ocBooterQuirks.ProtectUefiServices = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.ProtectUefiServices? QUIRK_UEFI:0;
|
||||
//it is in GUI section
|
||||
// Prop = OcQuirksDict->propertyForKey( "ProvideConsoleGopEnable");
|
||||
// settingsData.ProvideConsoleGop = !IsPropertyNotNullAndFalse(Prop);
|
||||
Prop = OcQuirksDict->propertyForKey( "ProvideCustomSlide");
|
||||
settingsData.ocBooterQuirks.ProvideCustomSlide = IsPropertyNotNullAndTrue(Prop);
|
||||
settingsData.QuirksMask |= settingsData.ocBooterQuirks.ProvideCustomSlide? QUIRK_CUSTOM:0;
|
||||
gSettings.ocBooterQuirks.ProvideCustomSlide = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.ProvideCustomSlide? QUIRK_CUSTOM:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "ProvideMaxSlide");
|
||||
settingsData.ocBooterQuirks.ProvideMaxSlide = (UINT8)GetPropertyAsInteger(Prop, 0); // cast will be safe when the new parser will ensure that the value is UINT8
|
||||
gSettings.ocBooterQuirks.ProvideMaxSlide = (UINT8)GetPropertyAsInteger(Prop, 0); // cast will be safe when the new parser will ensure that the value is UINT8
|
||||
Prop = OcQuirksDict->propertyForKey( "RebuildAppleMemoryMap");
|
||||
settingsData.ocBooterQuirks.RebuildAppleMemoryMap = IsPropertyNotNullAndTrue(Prop);
|
||||
settingsData.QuirksMask |= settingsData.ocBooterQuirks.RebuildAppleMemoryMap? QUIRK_MAP:0;
|
||||
gSettings.ocBooterQuirks.RebuildAppleMemoryMap = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.RebuildAppleMemoryMap? QUIRK_MAP:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "SetupVirtualMap");
|
||||
settingsData.ocBooterQuirks.SetupVirtualMap = !IsPropertyNotNullAndFalse(Prop);
|
||||
settingsData.QuirksMask |= settingsData.ocBooterQuirks.SetupVirtualMap? QUIRK_VIRT:0;
|
||||
gSettings.ocBooterQuirks.SetupVirtualMap = !IsPropertyNotNullAndFalse(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.SetupVirtualMap? QUIRK_VIRT:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "SignalAppleOS");
|
||||
settingsData.ocBooterQuirks.SignalAppleOS = IsPropertyNotNullAndTrue(Prop);
|
||||
settingsData.QuirksMask |= settingsData.ocBooterQuirks.SignalAppleOS? QUIRK_OS:0;
|
||||
gSettings.ocBooterQuirks.SignalAppleOS = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.SignalAppleOS? QUIRK_OS:0;
|
||||
Prop = OcQuirksDict->propertyForKey( "SyncRuntimePermissions");
|
||||
settingsData.ocBooterQuirks.SyncRuntimePermissions = !IsPropertyNotNullAndFalse(Prop);
|
||||
settingsData.QuirksMask |= settingsData.ocBooterQuirks.SyncRuntimePermissions? QUIRK_PERM:0;
|
||||
settingsData.mmioWhiteListArray.setEmpty();
|
||||
gSettings.ocBooterQuirks.SyncRuntimePermissions = !IsPropertyNotNullAndFalse(Prop);
|
||||
gSettings.QuirksMask |= gSettings.ocBooterQuirks.SyncRuntimePermissions? QUIRK_PERM:0;
|
||||
gSettings.mmioWhiteListArray.setEmpty();
|
||||
|
||||
const TagArray* Dict2 = OcQuirksDict->arrayPropertyForKey("MmioWhitelist"); // array of dict
|
||||
if (Dict2 != NULL) {
|
||||
@ -2893,27 +2883,27 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
Prop2 = Dict3->propertyForKey("Enabled");
|
||||
mmioWhiteList.enabled = IsPropertyNotNullAndTrue(Prop2);
|
||||
}
|
||||
settingsData.mmioWhiteListArray.AddReference(mmioWhiteListPtr, true);
|
||||
gSettings.mmioWhiteListArray.AddReference(mmioWhiteListPtr, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Prop = OcQuirksDict->propertyForKey("FuzzyMatch");
|
||||
if (Prop != NULL || GlobalConfig.gBootChanged) {
|
||||
settingsData.KernelAndKextPatches.FuzzyMatch = !IsPropertyNotNullAndFalse(Prop);
|
||||
gSettings.KernelAndKextPatches.FuzzyMatch = !IsPropertyNotNullAndFalse(Prop);
|
||||
}
|
||||
|
||||
Prop = OcQuirksDict->propertyForKey("KernelCache");
|
||||
if (Prop != NULL || GlobalConfig.gBootChanged) {
|
||||
if ( Prop->isString() ) {
|
||||
if ( Prop->getString()->stringValue().notEmpty() ) {
|
||||
settingsData.KernelAndKextPatches.OcKernelCache = Prop->getString()->stringValue();
|
||||
gSettings.KernelAndKextPatches.OcKernelCache = Prop->getString()->stringValue();
|
||||
}else{
|
||||
settingsData.KernelAndKextPatches.OcKernelCache = "Auto"_XS8;
|
||||
gSettings.KernelAndKextPatches.OcKernelCache = "Auto"_XS8;
|
||||
}
|
||||
}else{
|
||||
MsgLog("MALFORMED PLIST : Quirks/KernelCache must be a string");
|
||||
settingsData.KernelAndKextPatches.OcKernelCache = "Auto"_XS8;
|
||||
gSettings.KernelAndKextPatches.OcKernelCache = "Auto"_XS8;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2921,17 +2911,17 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
// Booter Quirks
|
||||
// Prop = OcQuirksDict->propertyForKey("AppleCpuPmCfgLock");
|
||||
// settingsData.KernelAndKextPatches.OcKernelQuirks.AppleCpuPmCfgLock = IsPropertyNotNullAndTrue(Prop);
|
||||
settingsData.KernelAndKextPatches.OcKernelQuirks.AppleCpuPmCfgLock = settingsData.KernelAndKextPatches.KPAppleIntelCPUPM;
|
||||
gSettings.KernelAndKextPatches.OcKernelQuirks.AppleCpuPmCfgLock = gSettings.KernelAndKextPatches.KPAppleIntelCPUPM;
|
||||
|
||||
// Prop = OcQuirksDict->propertyForKey("AppleXcpmCfgLock"); //
|
||||
// settingsData.KernelAndKextPatches.OcKernelQuirks.AppleXcpmCfgLock = IsPropertyNotNullAndTrue(Prop);
|
||||
settingsData.KernelAndKextPatches.OcKernelQuirks.AppleXcpmCfgLock = settingsData.KernelAndKextPatches.KPKernelPm;
|
||||
gSettings.KernelAndKextPatches.OcKernelQuirks.AppleXcpmCfgLock = gSettings.KernelAndKextPatches.KPKernelPm;
|
||||
|
||||
Prop = OcQuirksDict->propertyForKey("AppleXcpmExtraMsrs");
|
||||
settingsData.KernelAndKextPatches.OcKernelQuirks.AppleXcpmExtraMsrs = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.KernelAndKextPatches.OcKernelQuirks.AppleXcpmExtraMsrs = IsPropertyNotNullAndTrue(Prop);
|
||||
|
||||
Prop = OcQuirksDict->propertyForKey("AppleXcpmForceBoost");
|
||||
settingsData.KernelAndKextPatches.OcKernelQuirks.AppleXcpmForceBoost = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.KernelAndKextPatches.OcKernelQuirks.AppleXcpmForceBoost = IsPropertyNotNullAndTrue(Prop);
|
||||
|
||||
// We can't use that Quirks because we don't delegate SMBios to OC.
|
||||
// Prop = OcQuirksDict->propertyForKey("CustomSMBIOSGuid");
|
||||
@ -2939,40 +2929,40 @@ EFI_STATUS GetEarlyUserSettings (
|
||||
|
||||
Prop = OcQuirksDict->propertyForKey("DisableIoMapper");
|
||||
//if ( !Prop ) panic("Cannot find DisableIoMapper in config.plist/Quirks. You forgot to merge your quirks into one section. Update your config.plist");
|
||||
settingsData.KernelAndKextPatches.OcKernelQuirks.DisableIoMapper = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.KernelAndKextPatches.OcKernelQuirks.DisableIoMapper = IsPropertyNotNullAndTrue(Prop);
|
||||
|
||||
Prop = OcQuirksDict->propertyForKey("DisableLinkeditJettison");
|
||||
settingsData.KernelAndKextPatches.OcKernelQuirks.DisableLinkeditJettison = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.KernelAndKextPatches.OcKernelQuirks.DisableLinkeditJettison = IsPropertyNotNullAndTrue(Prop);
|
||||
|
||||
// Prop = OcQuirksDict->propertyForKey("DisableRtcChecksum");
|
||||
// settingsData.KernelAndKextPatches.OcKernelQuirks.DisableRtcChecksum = IsPropertyNotNullAndTrue(Prop);
|
||||
settingsData.KernelAndKextPatches.OcKernelQuirks.DisableRtcChecksum = settingsData.KernelAndKextPatches.KPAppleRTC;
|
||||
gSettings.KernelAndKextPatches.OcKernelQuirks.DisableRtcChecksum = gSettings.KernelAndKextPatches.KPAppleRTC;
|
||||
|
||||
Prop = OcQuirksDict->propertyForKey("DummyPowerManagement");
|
||||
settingsData.KernelAndKextPatches.OcKernelQuirks.DummyPowerManagement = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.KernelAndKextPatches.OcKernelQuirks.DummyPowerManagement = IsPropertyNotNullAndTrue(Prop);
|
||||
|
||||
Prop = OcQuirksDict->propertyForKey("ExternalDiskIcons");
|
||||
settingsData.KernelAndKextPatches.OcKernelQuirks.ExternalDiskIcons = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.KernelAndKextPatches.OcKernelQuirks.ExternalDiskIcons = IsPropertyNotNullAndTrue(Prop);
|
||||
|
||||
Prop = OcQuirksDict->propertyForKey("IncreasePciBarSize");
|
||||
settingsData.KernelAndKextPatches.OcKernelQuirks.IncreasePciBarSize = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.KernelAndKextPatches.OcKernelQuirks.IncreasePciBarSize = IsPropertyNotNullAndTrue(Prop);
|
||||
|
||||
// Prop = OcQuirksDict->propertyForKey("LapicKernelPanic");
|
||||
// settingsData.KernelAndKextPatches.OcKernelQuirks.LapicKernelPanic = IsPropertyNotNullAndTrue(Prop);
|
||||
settingsData.KernelAndKextPatches.OcKernelQuirks.LapicKernelPanic = settingsData.KernelAndKextPatches.KPKernelLapic;
|
||||
gSettings.KernelAndKextPatches.OcKernelQuirks.LapicKernelPanic = gSettings.KernelAndKextPatches.KPKernelLapic;
|
||||
|
||||
// Prop = OcQuirksDict->propertyForKey("PanicNoKextDump");
|
||||
// settingsData.KernelAndKextPatches.OcKernelQuirks.PanicNoKextDump = IsPropertyNotNullAndTrue(Prop); //KPPanicNoKextDump
|
||||
settingsData.KernelAndKextPatches.OcKernelQuirks.PanicNoKextDump = settingsData.KernelAndKextPatches.KPPanicNoKextDump;
|
||||
gSettings.KernelAndKextPatches.OcKernelQuirks.PanicNoKextDump = gSettings.KernelAndKextPatches.KPPanicNoKextDump;
|
||||
|
||||
Prop = OcQuirksDict->propertyForKey("PowerTimeoutKernelPanic");
|
||||
settingsData.KernelAndKextPatches.OcKernelQuirks.PowerTimeoutKernelPanic = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.KernelAndKextPatches.OcKernelQuirks.PowerTimeoutKernelPanic = IsPropertyNotNullAndTrue(Prop);
|
||||
|
||||
Prop = OcQuirksDict->propertyForKey("ThirdPartyDrives");
|
||||
settingsData.KernelAndKextPatches.OcKernelQuirks.ThirdPartyDrives = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.KernelAndKextPatches.OcKernelQuirks.ThirdPartyDrives = IsPropertyNotNullAndTrue(Prop);
|
||||
|
||||
Prop = OcQuirksDict->propertyForKey("XhciPortLimit");
|
||||
settingsData.KernelAndKextPatches.OcKernelQuirks.XhciPortLimit = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.KernelAndKextPatches.OcKernelQuirks.XhciPortLimit = IsPropertyNotNullAndTrue(Prop);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3772,7 +3762,7 @@ static void getACPISettings(const TagDict *CfgDict)
|
||||
}
|
||||
|
||||
const TagStruct* Prop = SSDTDict->propertyForKey("DropOem");
|
||||
gSettings.ACPI.SSDT.DropSSDT = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.ACPI.SSDT.DropSSDTSetting = IsPropertyNotNullAndTrue(Prop);
|
||||
|
||||
Prop = SSDTDict->propertyForKey("NoOemTableId"); // to disable OEM table ID on ACPI/orgin/SSDT file names
|
||||
gSettings.ACPI.SSDT.NoOemTableId = IsPropertyNotNullAndTrue(Prop);
|
||||
@ -3993,7 +3983,7 @@ EFI_STATUS GetUserSettings(const TagDict* CfgDict, SETTINGS_DATA& gSettings)
|
||||
}
|
||||
|
||||
Prop = BootDict->propertyForKey("NeverDoRecovery");
|
||||
gSettings.NeverDoRecovery = IsPropertyNotNullAndTrue(Prop);
|
||||
gSettings.Boot.NeverDoRecovery = IsPropertyNotNullAndTrue(Prop);
|
||||
}
|
||||
|
||||
|
||||
|
@ -273,6 +273,7 @@ public:
|
||||
bool SkipHibernateTimeout = false;
|
||||
bool DisableCloverHotkeys = false;
|
||||
XString8 BootArgs = XString8();
|
||||
bool NeverDoRecovery = 0;
|
||||
bool LastBootedVolume = false;
|
||||
XStringW DefaultVolume = XStringW();
|
||||
XStringW DefaultLoader = XStringW();
|
||||
@ -284,8 +285,9 @@ public:
|
||||
bool RtcHibernateAware = false;
|
||||
bool HibernationFixup = false;
|
||||
bool SignatureFixup = false;
|
||||
UINT8 SecureBoot = 0;
|
||||
UINT8 SecureBootSetupMode = 0;
|
||||
INT8 SecureSetting = 0; // 0 == false, 1 == true, -1 == undefined
|
||||
// UINT8 SecureBoot = 0;
|
||||
// UINT8 SecureBootSetupMode = 0;
|
||||
UINT8 SecureBootPolicy = 0;
|
||||
// Secure boot white/black list
|
||||
XStringWArray SecureBootWhiteList = XStringWArray();
|
||||
@ -294,8 +296,9 @@ public:
|
||||
// LegacyBoot
|
||||
XStringW LegacyBoot = XStringW();
|
||||
UINT16 LegacyBiosDefaultEntry = 0;
|
||||
UINT8 CustomBoot = 0;
|
||||
XImage *CustomLogo = 0;
|
||||
UINT8 CustomBootSetting = 0;
|
||||
XString8 CustomLogoAsXString8 = XString8();
|
||||
XBuffer<UINT8> CustomLogoAsData = XBuffer<UINT8>();
|
||||
} Boot = BootClass();
|
||||
|
||||
class ACPIClass
|
||||
@ -336,7 +339,7 @@ public:
|
||||
BOOLEAN GenerateAPLF = 0;
|
||||
BOOLEAN GeneratePluginType = 0;
|
||||
} Generate = GenerateClass();
|
||||
BOOLEAN DropSSDT = 0;
|
||||
BOOLEAN DropSSDTSetting = 0;
|
||||
BOOLEAN NoOemTableId = 0;
|
||||
BOOLEAN NoDynamicExtract = 0;
|
||||
BOOLEAN EnableISS = 0;
|
||||
@ -590,7 +593,6 @@ public:
|
||||
UINT32 CsrActiveConfig;
|
||||
UINT16 BooterConfig;
|
||||
XString8 BooterCfgStr;
|
||||
BOOLEAN NeverDoRecovery;
|
||||
|
||||
// Multi-config
|
||||
CHAR16 ConfigName[30];
|
||||
@ -699,7 +701,7 @@ public:
|
||||
HDALayoutId(0), USBInjection(0), USBFixOwnership(0), InjectClockID(0), HighCurrent(0), NameEH00(0), NameXH00(0), LANInjection(0), HDMIInjection(0),
|
||||
HWP(0), TDP(0), HWPValue(0), HVHideStrings(), KernelAndKextPatches(), KextPatchesAllowed(0),
|
||||
KernelPatchesAllowed(0), AirportBridgeDeviceName(), KbdPrevLang(0), PointerEnabled(0), PointerSpeed(0), DoubleClickTime(0), PointerMirror(0),
|
||||
RefCLK(0), RtMLB(), RtROM(), CsrActiveConfig(0), BooterConfig(0), BooterCfgStr(), NeverDoRecovery(0),
|
||||
RefCLK(0), RtMLB(), RtROM(), CsrActiveConfig(0), BooterConfig(0), BooterCfgStr(),
|
||||
ConfigName{0}, /*MainConfigName(0),*/ /*BlackListCount(0),*/ DisabledDriverArray(), RPlt{0}, RBr{0}, EPCI{0}, REV{0}, ForceHPET(0), ResetHDA(0), PlayAsync(0), DisableFunctions(0), SlpWak(0), UseIntelHDMI(0),
|
||||
AFGLowPowerState(0), DisableEntryScan(0), DisableToolScan(0), KernelScan(0), LinuxScan(0), CustomEntries(0),
|
||||
CustomLegacy(0), CustomTool(0), NrAddProperties(0), AddProperties(0), BlockKexts{0},
|
||||
@ -926,7 +928,13 @@ public:
|
||||
BOOLEAN NeedPMfix = FALSE;
|
||||
ACPI_DROP_TABLE *ACPIDropTables = NULL;
|
||||
|
||||
UINT8 CustomBoot = 0; // this will be initialized with gSettings.Boot.CustomBoot and set back to CUSTOM_BOOT_DISABLED if CustomLogo could not be loaded or decoded (see afterGetUserSettings)
|
||||
XImage *CustomLogo = 0;
|
||||
|
||||
bool DropSSDT = 0; // init with gSettings.Boot.DropSSDTSetting. Put back to false is one table is dropped (see afterGetUserSettings)
|
||||
|
||||
UINT8 SecureBoot = 0;
|
||||
UINT8 SecureBootSetupMode = 0;
|
||||
|
||||
/*
|
||||
* Defqult ctor :
|
||||
|
@ -38,6 +38,11 @@ public:
|
||||
/*
|
||||
* getters and setters
|
||||
*/
|
||||
const XBuffer<UINT8>& data() const
|
||||
{
|
||||
// if ( !isData() ) panic("TagData::dataValue() : !isData() ");
|
||||
return dataBuffer;
|
||||
}
|
||||
const UINT8* dataValue() const
|
||||
{
|
||||
// if ( !isData() ) panic("TagData::dataValue() : !isData() ");
|
||||
|
@ -19,7 +19,7 @@
|
||||
template <typename T>
|
||||
class XBuffer : public XBuffer_Super
|
||||
{
|
||||
protected:
|
||||
protected:
|
||||
T*_WData; // same as RData (see XRBuffer)
|
||||
size_t m_allocatedSize;
|
||||
|
||||
@ -46,11 +46,11 @@ class XBuffer : public XBuffer_Super
|
||||
if( _WData ) free(_WData);
|
||||
Initialize(p, count, 0);
|
||||
}
|
||||
|
||||
|
||||
~XBuffer();
|
||||
|
||||
public:
|
||||
public:
|
||||
static XBuffer<T> NullXBuffer;
|
||||
|
||||
void CheckSize(size_t nNewSize, size_t nGrowBy = XBufferGrowByDefault);
|
||||
|
||||
void* vdata() const { return (void*)XBuffer_Super::data(); }
|
||||
@ -203,6 +203,8 @@ class XBuffer : public XBuffer_Super
|
||||
bool ReadFromXRBuffer(XRBuffer<T> &unXBuffer);
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
XBuffer<T> XBuffer<T>::NullXBuffer = XBuffer<T>();
|
||||
|
||||
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "strcmp_test.h"
|
||||
#include "strncmp_test.h"
|
||||
#include "strlen_test.h"
|
||||
#include "strcasecmp_test.h"
|
||||
#include "printf_lite-test.h"
|
||||
#include "LoadOptions_test.h"
|
||||
#include "XToolsCommon_test.h"
|
||||
@ -45,6 +46,11 @@ bool all_tests()
|
||||
printf("xml_lite_tests() failed at test %d\n", ret);
|
||||
all_ok = false;
|
||||
}
|
||||
ret = strcasecmp_tests();
|
||||
if ( ret != 0 ) {
|
||||
printf("strncmp_tests() failed at test %d\n", ret);
|
||||
all_ok = false;
|
||||
}
|
||||
// ret = config_plist_tests();
|
||||
// if ( ret != 0 ) {
|
||||
// printf("config_plist_tests() failed at test %d\n", ret);
|
||||
@ -89,6 +95,11 @@ bool all_tests()
|
||||
printf("strncmp_tests() failed at test %d\n", ret);
|
||||
all_ok = false;
|
||||
}
|
||||
ret = strcasecmp_tests();
|
||||
if ( ret != 0 ) {
|
||||
printf("strncmp_tests() failed at test %d\n", ret);
|
||||
all_ok = false;
|
||||
}
|
||||
ret = XToolsCommon_tests();
|
||||
if ( ret != 0 ) {
|
||||
printf("printlib_tests() failed at test %d\n", ret);
|
||||
|
95
rEFIt_UEFI/cpp_unit_test/strcasecmp_test.cpp
Executable file
95
rEFIt_UEFI/cpp_unit_test/strcasecmp_test.cpp
Executable file
@ -0,0 +1,95 @@
|
||||
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||
#include "../cpp_foundation/XString.h"
|
||||
#include "../cpp_foundation/unicode_conversions.h"
|
||||
#include "global_test.h"
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* This array is designed for mapping upper and lower case letter
|
||||
* together for a case independent comparison. The mappings are
|
||||
* based upon ascii character sequences.
|
||||
*/
|
||||
static const char charmap_octal[] = {
|
||||
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
|
||||
'\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
|
||||
'\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
|
||||
'\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
|
||||
'\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
|
||||
'\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
|
||||
'\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
|
||||
'\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
|
||||
'\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
|
||||
'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
|
||||
'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
|
||||
'\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
|
||||
'\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
|
||||
'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
|
||||
'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
|
||||
'\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
|
||||
'\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
|
||||
'\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
|
||||
'\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
|
||||
'\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
|
||||
'\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
|
||||
'\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
|
||||
'\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
|
||||
'\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
|
||||
'\300', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
|
||||
'\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
|
||||
'\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
|
||||
'\370', '\371', '\372', '\333', '\334', '\335', '\336', '\337',
|
||||
'\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
|
||||
'\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
|
||||
'\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
|
||||
'\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
|
||||
};
|
||||
|
||||
|
||||
static const unsigned char charmap[] = {
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
||||
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
|
||||
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
|
||||
0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
|
||||
0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
||||
0x40, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
|
||||
0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
|
||||
0x78, 0x79, 0x7a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
||||
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
|
||||
0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
|
||||
0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
|
||||
0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
|
||||
0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
|
||||
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
|
||||
0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||
0xc0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
|
||||
0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
|
||||
0xf8, 0xf9, 0xfa, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
|
||||
0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
|
||||
0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
|
||||
};
|
||||
|
||||
|
||||
int strcasecmp_tests()
|
||||
{
|
||||
|
||||
// int ret;
|
||||
|
||||
for ( int i = 0 ; i <= 255 ; ++i) {
|
||||
if ( (unsigned char)(charmap_octal[i]) != charmap[i] ) return i;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
1
rEFIt_UEFI/cpp_unit_test/strcasecmp_test.h
Normal file
1
rEFIt_UEFI/cpp_unit_test/strcasecmp_test.h
Normal file
@ -0,0 +1 @@
|
||||
int strcasecmp_tests();
|
@ -733,9 +733,9 @@ EFI_STATUS InitBootScreen(IN LOADER_ENTRY *Entry)
|
||||
if (customBoot == CUSTOM_BOOT_USER) {
|
||||
logo = Entry->CustomLogo;
|
||||
} else if (customBoot == CUSTOM_BOOT_DISABLED) {
|
||||
customBoot = gSettings.Boot.CustomBoot;
|
||||
customBoot = GlobalConfig.CustomBoot;
|
||||
if (customBoot == CUSTOM_BOOT_USER) {
|
||||
logo = *gSettings.Boot.CustomLogo;
|
||||
logo = *GlobalConfig.CustomLogo;
|
||||
}
|
||||
}
|
||||
switch (customBoot) {
|
||||
@ -785,3 +785,22 @@ EFI_STATUS InitBootScreen(IN LOADER_ENTRY *Entry)
|
||||
}
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static CONST CHAR8 *CustomBootModeStr[] = {
|
||||
"CUSTOM_BOOT_DISABLED",
|
||||
"CUSTOM_BOOT_USER_DISABLED",
|
||||
"CUSTOM_BOOT_NONE",
|
||||
"CUSTOM_BOOT_APPLE",
|
||||
"CUSTOM_BOOT_ALT_APPLE",
|
||||
"CUSTOM_BOOT_THEME",
|
||||
"CUSTOM_BOOT_USER",
|
||||
};
|
||||
|
||||
CONST CHAR8 *CustomBootModeToStr(IN UINT8 Mode)
|
||||
{
|
||||
if (Mode >= (sizeof(CustomBootModeStr) / sizeof(CustomBootModeStr[0]))) {
|
||||
return CustomBootModeStr[0];
|
||||
}
|
||||
return CustomBootModeStr[Mode];
|
||||
}
|
||||
|
@ -10,7 +10,8 @@ InitBootScreen (
|
||||
IN LOADER_ENTRY *Entry
|
||||
);
|
||||
|
||||
//CONST CHAR8 *CustomBootModeToStr(IN UINT8 Mode);
|
||||
|
||||
CONST CHAR8 *CustomBootModeToStr(IN UINT8 Mode);
|
||||
|
||||
#endif //__bootscreen_h__
|
||||
|
||||
|
@ -38,6 +38,7 @@
|
||||
../Include/Library/printf_lite-conf.h
|
||||
../Include/Library/printf_lite.h
|
||||
include/Devices.h
|
||||
include/DsdtFixList.h
|
||||
include/Efi.h
|
||||
include/Handle.h
|
||||
include/OneLinerMacros.h
|
||||
@ -127,8 +128,10 @@
|
||||
Platform/Posix/stdlib.h
|
||||
Platform/Posix/stdio.h
|
||||
Platform/Posix/stdio.cpp
|
||||
Platform/Posix/string.cpp
|
||||
Platform/Posix/string.h
|
||||
Platform/Posix/string.cpp
|
||||
Platform/Posix/strings.h
|
||||
Platform/Posix/strings.cpp
|
||||
Platform/Posix/strlen.cpp
|
||||
Platform/Posix/wchar.h
|
||||
Platform/Posix/wchar.cpp
|
||||
@ -304,6 +307,8 @@
|
||||
# cpp_foundation/XUINTN.h
|
||||
cpp_unit_test/all_tests.h
|
||||
cpp_unit_test/all_tests.cpp
|
||||
cpp_unit_test/config-test.h
|
||||
cpp_unit_test/config-test.cpp
|
||||
cpp_unit_test/find_replace_mask_Clover_tests.h
|
||||
cpp_unit_test/find_replace_mask_Clover_tests.cpp
|
||||
cpp_unit_test/find_replace_mask_OC_tests.h
|
||||
@ -327,6 +332,8 @@
|
||||
cpp_unit_test/XArray_tests.h
|
||||
cpp_unit_test/XBuffer_tests.cpp
|
||||
cpp_unit_test/XBuffer_tests.h
|
||||
cpp_unit_test/xml_lite-test.cpp
|
||||
cpp_unit_test/xml_lite-test.h
|
||||
cpp_unit_test/XObjArray_tests.cpp
|
||||
cpp_unit_test/XObjArray_tests.h
|
||||
cpp_unit_test/XString_test.cpp
|
||||
|
@ -2543,9 +2543,26 @@ RefitMain (IN EFI_HANDLE ImageHandle,
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wshadow"
|
||||
void afterGetUserSettings(SETTINGS_DATA& gSettings)
|
||||
void afterGetUserSettings(const SETTINGS_DATA& gSettings)
|
||||
{
|
||||
|
||||
// Secure boot
|
||||
/* this parameter, which should be called SecureBootSetupMode, is ignored if :
|
||||
* it is true
|
||||
* SecureBoot is already true.
|
||||
*/
|
||||
if ( gSettings.Boot.SecureSetting == 0 ) {
|
||||
// Only disable setup mode, we want always secure boot
|
||||
GlobalConfig.SecureBootSetupMode = 0;
|
||||
} else if ( gSettings.Boot.SecureSetting == 1 && !GlobalConfig.SecureBoot ) {
|
||||
// This mode will force boot policy even when no secure boot or it is disabled
|
||||
GlobalConfig.SecureBootSetupMode = 1;
|
||||
GlobalConfig.SecureBoot = 1;
|
||||
}
|
||||
|
||||
|
||||
//set to drop
|
||||
GlobalConfig.DropSSDT = gSettings.ACPI.SSDT.DropSSDTSetting;
|
||||
if (GlobalConfig.ACPIDropTables) {
|
||||
for ( size_t idx = 0 ; idx < gSettings.ACPI.ACPIDropTablesArray.size() ; ++idx)
|
||||
{
|
||||
@ -2559,7 +2576,7 @@ void afterGetUserSettings(SETTINGS_DATA& gSettings)
|
||||
(!gSettings.ACPI.ACPIDropTablesArray[idx].Signature && (DropTable->TableId == gSettings.ACPI.ACPIDropTablesArray[idx].TableId))) {
|
||||
DropTable->MenuItem.BValue = TRUE;
|
||||
DropTable->OtherOS = gSettings.ACPI.ACPIDropTablesArray[idx].OtherOS;
|
||||
gSettings.ACPI.SSDT.DropSSDT = FALSE; //if one item=true then dropAll=false by default
|
||||
GlobalConfig.DropSSDT = FALSE; // if one item=true then dropAll=false by default
|
||||
//DBG(" true");
|
||||
Dropped = TRUE;
|
||||
}
|
||||
@ -2568,6 +2585,33 @@ void afterGetUserSettings(SETTINGS_DATA& gSettings)
|
||||
DBG(" %s\n", Dropped ? "yes" : "no");
|
||||
}
|
||||
}
|
||||
|
||||
// Whether or not to draw boot screen
|
||||
GlobalConfig.CustomBoot = gSettings.Boot.CustomBootSetting;
|
||||
if ( gSettings.Boot.CustomLogoAsXString8.notEmpty() ) {
|
||||
if (GlobalConfig.CustomLogo != NULL) {
|
||||
delete GlobalConfig.CustomLogo;
|
||||
}
|
||||
GlobalConfig.CustomLogo = new XImage;
|
||||
GlobalConfig.CustomLogo->LoadXImage(&self.getSelfVolumeRootDir(), gSettings.Boot.CustomLogoAsXString8);
|
||||
if (GlobalConfig.CustomLogo->isEmpty()) {
|
||||
DBG("Custom boot logo not found at path '%s'!\n", gSettings.Boot.CustomLogoAsXString8.c_str());
|
||||
GlobalConfig.CustomBoot = CUSTOM_BOOT_DISABLED;
|
||||
}
|
||||
} else if ( gSettings.Boot.CustomLogoAsData.notEmpty() ) {
|
||||
if (GlobalConfig.CustomLogo != NULL) {
|
||||
delete GlobalConfig.CustomLogo;
|
||||
}
|
||||
GlobalConfig.CustomLogo = new XImage;
|
||||
GlobalConfig.CustomLogo->FromPNG(gSettings.Boot.CustomLogoAsData.data(), gSettings.Boot.CustomLogoAsData.size());
|
||||
if (GlobalConfig.CustomLogo->isEmpty()) {
|
||||
DBG("Custom boot logo not decoded from data!\n"/*, Prop->getString()->stringValue().c_str()*/);
|
||||
GlobalConfig.CustomBoot = CUSTOM_BOOT_DISABLED;
|
||||
}
|
||||
}
|
||||
DBG("Custom boot %s (0x%llX)\n", CustomBootModeToStr(GlobalConfig.CustomBoot), (uintptr_t)GlobalConfig.CustomLogo);
|
||||
|
||||
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
|
@ -152,7 +152,7 @@ void FillInputs(BOOLEAN New)
|
||||
InputItems[InputItemsCount++].IValue = 3;
|
||||
|
||||
InputItems[InputItemsCount].ItemType = BoolValue; //4
|
||||
InputItems[InputItemsCount++].BValue = gSettings.ACPI.SSDT.DropSSDT;
|
||||
InputItems[InputItemsCount++].BValue = GlobalConfig.DropSSDT;
|
||||
InputItems[InputItemsCount].ItemType = BoolValue; //5
|
||||
InputItems[InputItemsCount++].BValue = gSettings.ACPI.SSDT.Generate.GeneratePStates;
|
||||
InputItems[InputItemsCount].ItemType = BoolValue; //6
|
||||
@ -502,7 +502,7 @@ void ApplyInputs(void)
|
||||
}
|
||||
i++; //4
|
||||
if (InputItems[i].Valid) {
|
||||
gSettings.ACPI.SSDT.DropSSDT = InputItems[i].BValue;
|
||||
GlobalConfig.DropSSDT = InputItems[i].BValue;
|
||||
}
|
||||
i++; //5
|
||||
if (InputItems[i].Valid) {
|
||||
|
Loading…
Reference in New Issue
Block a user