Commit Graph

143 Commits

Author SHA1 Message Date
jief
a9b0654a59 Improve XString forgetDataWithoutFreeing() to avoid freeing a literal.
Improve XString stealValueFrom to avoid a memory leak
Change GlobalConfig.ACPIDropTables to a XObjArray.
2023-11-12 03:48:29 +01:00
jief
88a2a69734 Fix include path.
Revert a FreePool mistakenly commented out.
2023-11-05 18:56:53 +01:00
SergeySlice
7adb640a42 BlockSkywalk will be false by default
Signed-off-by: SergeySlice <sergey.slice@gmail.com>
2023-09-05 19:54:23 +03:00
Сергей Исаков
2313e8bac9 fix clang 13 compatibility
Signed-off-by: Сергей Исаков <sergey@iMac2017.local>
2022-08-12 22:09:53 +03:00
SergeySlice
27133ac407 fix unused variable
Signed-off-by: SergeySlice <sergey.slice@gmail.com>
2022-03-22 21:21:26 +03:00
SergeySlice
d388e910fe wrong DEBUG usage, firmware version is 2
Signed-off-by: SergeySlice <sergey.slice@gmail.com>
2022-01-23 15:19:15 +03:00
jief666
542b812276 Refactor array of RamSlotInfo and RAM_SLOT_INFO to avoid allocating
empty slots.
Remove the InUse member.
Remove mHandle17, mInstalled, mEnabled global.
Create numeric_limits.
2021-10-02 20:44:16 +03:00
jief666
2c829b66cd Create XBool to avoid nasty side effect when assigning int to bool. 2021-09-28 11:28:45 +03:00
jief666
8134f37bde Change ConfigsList from statically allocated to XStringWArray. 2021-09-27 10:05:11 +03:00
jief666
a634a8258c DumpNvram().
Debug messages in Self.
Typo in BootLog.cpp
Comment in XStringAbstract.h
2021-07-02 18:10:10 +03:00
jief666
9906261e23 Fix visual studio compilation.
Fix some warnings.
Rename panic_ask to log_technical_bug.
2021-05-08 12:34:17 +03:00
jief666
d52803e7cd DO NOT explicitly call default ctor with new because of clang bug. 2021-05-05 20:10:10 +03:00
jief666
0a8f273560 Cleaning and improvement of PlatformPOSIX.
Create a PlatformPOSIX+EFI.
2021-05-05 13:20:40 +03:00
jief666
391ed70310 Fix bug in ConfigPlist when an unknown key happens is ACPI/DSDT/Fixes.
Light refactor of PauseForKey.
gSettings.CPU.SavingMode is ConfigManager.
PlatformPosix : do not redefine abort(), use abort() instead of
CpuDeadLoop().
Format debug.log file name.
Use malloc/free instead of AllocateZeroPool/FreePool for validator
compatibility.
Use strlen instead of AsciiStrLen for validator compatibility.
getRBr() and getRPlt() : make them independent from global var.
Fix wrong line number in XmlLiteParser.
2021-05-04 13:03:40 +03:00
jief666
0223567648 New parser XML. New ConfigManager. A lot of refactoring... 2021-04-28 21:30:34 +03:00
jief666
51d5d4a141 Fix compilation Xcode 12.5.
Debug message in Smbios.cpp.
2021-04-28 21:00:28 +03:00
jief666
cc3c8fe0a7 Fix bug : it was ignoring legacy with PBR, MBR and CD.
Uncomment eComStation, BeOS, ZETA and Haiku legacy boot sector
detection.
Return unknown icon instead of dummy.
Improve legacy entries title when _LoaderTitle is empty.
Create log_technical_bug(). Temporary redirected to panic.
Hardened egLoadFile().
Hardened SelfOem.
Copy ctor in XStringArray.
Improve qemu launch scripts.
2021-04-23 15:20:48 +03:00
jief666
a1a27d29a1 Improve some messages.
unicode_conversions version.
2021-04-21 08:32:38 +03:00
jief666
c07c1542e8 Create XBuffer setSize(IntegralType size, const T& elementToCopy). 2021-04-12 15:13:14 +03:00
jief666
7babc6fe9b Do not use OC quirks struct anymore in settings.
Fix Disabled property in Smbios/Block config.
Move flagstate in GlobalConfig.
Remove gSettings.Smbios.REV, ECPI, RBr and RPlt.
Create getRBr() and getRPlt().
Operator == and isEqual in XArray, XObjArray, SETTINGS_DATA.
Rename equal to isEqual in XString and XStringArray.
Operator == in INPUT_ITEM, undefinable, ABSTRACT_PATCH (and derived) and
RAM_SLOT_INFO class.
Clean b64cdecode.h.
2021-04-11 08:18:52 +03:00
jief666
975ac8f4fb Implement the possibility to cache XString size. Not activated.
Improve unicode_conversions.
Move strlen declaration to string.h.
2021-04-08 18:07:05 +03:00
jief666
277f3e8619 Speed up devprop_generate_string by using a XBuffer instead of a String.
Create a S8Catf in XBuffer.
2021-04-08 11:01:20 +03:00
jief666
2cf69b2b55 Rename ABSTRACT_PATCH Data & Patch, Find and Replace.
Create GetChassisTypeFromModel() and GetFwFeaturesMaskFromModel().
Ignore first '\' in ForceKextsToLoad.
XString : Add a parameter to wc_str to access address of nth chars.
XString : Add endWithOrEqualToIC.
Create ConstXStringArray.
2021-04-06 16:39:55 +03:00
jief666
946a6428b5 Remove the trim to the first space for PartNo, Vendor, SerialNo.
Refactor ACPI_NAME_LIST as XString8Array.
Create ACPI_RENAME_DEVICE and ACPI_NAME to replace ACPI_NAME_LIST.
Change RAM_SLOT_INFO and MEM_STRUCTURE into class.
Improve XObjArray::RemoveWithoutFreeingAtIndex.
Create XStringArray::ExtractFromPos.
Move CheckFatalError and CheckError to BasicIO.
2021-04-05 11:57:55 +03:00
jief666
6ff5bab8a5 Create section Smbios and BootGraphics.
Move OptionsBits and FlagsBits in GlobalConfig.
Move OEMVendor, OEMProduct, OEMBoard in GlobalConfig.
Move KernelPatchesAllowed, KextPatchesAllowed, EnabledCores and
BlockKexts in GlobalConfig.
Create RomVersionUsed, EfiVersionUsed and ReleaseDateUsed in
GlobalConfig.
Move gFwFeatures, gFwFeaturesMask, gPlatformFeature, SlotDevices in
Smbios section.
Move UserInUse, UserChannels and User from gRAM to Smbios settings
section.
Rename enum LANGUAGES to LanguageCode.
2021-04-03 17:42:49 +03:00
jief666
69a47c5fac Create Properties, Arbitrary and AddProperties menu.
hex2bin returns the length when passing NULL for out parameter instead
of 0.
Buildid in OEMString for my own build.
Create TagTypes.h.
Rename AddProperties to AddPropertiesArray.
devprop_generate_string now returns a XString8.
Add cpy method in XBuffer.
Add strsicpy in XString.
2021-04-01 11:06:53 +03:00
jief666
a5494a89f6 Create SETTINGS_DATA Devices section.
Convert AddProperties to XObjArray<DEV_ADDPROPERTY>.
2021-03-29 11:50:02 +03:00
SergeySlice
ea0c6838f0 merge conflicts
Signed-off-by: SergeySlice <sergey.slice@gmail.com>
2021-03-26 22:15:21 +03:00
jief666
4a3bc612b8 Create settings section Graphics, RtVariables.
Mobe Turbo in GlobalConfig.
2021-03-26 12:43:15 +03:00
SergeySlice
5bd8c21a6d add new files in proj
Signed-off-by: SergeySlice <sergey.slice@gmail.com>
2021-03-26 05:59:11 +03:00
jief666
65f8cc122d Created ABSTRACT_PATCH.
Renamed ForceKexts to ForceKextsToLoad.
Create a copy KPKernelPm, KPAppleIntelCPUPM as they can be modified by
NeedPMfix.
Delete gRemapSmBiosIsRequire, duplicate of Patches->KPDELLSMBIOS
Slight refactor of hex2bin and XMLDecode.
Memory leak in XBuffer.stealValueFrom().
Create XString.strsicat() and stealValueFrom with a size parameter.
2021-03-25 17:32:56 +03:00
jief666
3fb08d97f8 Continuation of refactor of settings. 2021-03-15 12:02:34 +03:00
SergeySlice
76bf6321a6 release compilation should never panic on bad user input, use DEBUG for testing
Signed-off-by: SergeySlice <sergey.slice@gmail.com>
2021-02-21 16:49:09 +03:00
jief666
95be95c531 Reactivate warnings.
Clean warnings reactivated.
Clean build flags in the 4 configurations to make RELEASE_XCODE8 works
in QEMU.
2021-02-10 15:32:07 +03:00
jief666
75097bd304 Remove include <Platform.h> from headers. Keep them in sources. 2021-02-07 17:39:03 +03:00
jief666
1a02f530db Refactoring to allow Clover to be compiled as a macOs app. 2021-02-06 20:16:46 +03:00
jief666
333b6ce1ca Hide dead installer prebooter.
Do not hide installer if there is a main partition.
2021-02-04 17:04:31 +03:00
jief666
16c627596f Rename OSVersion to macOSVersion.
Fixed some icons ordering in main menu.
Fixed macOs version detection for custom entries.
Fixed main Big Sur partition appearing in menu.
Refactor IsValidGuidAsciiString.
2021-01-31 12:50:23 +03:00
jief666
b5e0562a3b DMG boot support through OC. 2021-01-22 11:35:57 +03:00
jief666
7f1b87c92f Create object MacOsVersion. 2020-11-13 00:25:56 +03:00
Jief L
da8ad5c0eb MSVC compilation. 2020-11-02 16:45:11 +03:00
jief666
e80852a82f Allow 11 11.x in IsOSValid().
No timing in JIEF_DEBUG.
2020-10-20 10:55:46 +03:00
jief666
70988228c4 Refactor selfOem. Created getConfigDir... methods.
Enclose access to getOemDir... by if (selfOem.oemDirExists()).
Enclose access to getKextsDir... by if (selfOem.isKextsDirFound()).
closeDebugLog() in UninitRefitLib().
Prevent DBG loop.
2020-10-17 16:01:33 +03:00
jief666
a2ffdf8642 Add Find/Replace with mask tests.
Improve unit test framework.
2020-10-12 17:49:43 +03:00
jief666
b8a188382c Make Clover path independent. 2020-10-03 20:02:31 +03:00
jief666
acc2fea810 Use kext from correct folder for version < 11.0
Use OpenCore OS_INFO_PROTOCOL.
2020-09-14 16:01:30 +03:00
jief666
7470ecc797 LoadOptions for OC (don't know if it's the right way)
Bridge KextPatch to OC.
2020-09-08 12:33:35 +03:00
jief666
babba4de6e make TagData::setDataValue accept NULL value for data. 2020-08-30 22:53:40 +03:00
jief666
9cb4016bc5 Final refactoring of plist : now each tag is a class.
Rename strerror to efiStrError because of conflict when run cpp_tests on
Mac.
Switch base64_decode_block to long to avoid warning and cast.
Correct GetTableType4(). Size was used without being initialized.
2020-08-25 18:35:19 +03:00
jief666
85716960f9 Further refactor of plist. 2020-08-22 16:39:24 +03:00