Merge branch 'CloverHackyColor:master' into master

This commit is contained in:
LAbyOne 2021-09-28 09:41:31 +02:00 committed by GitHub
commit c26c8483ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
43 changed files with 19734 additions and 17342 deletions

View File

@ -125,6 +125,7 @@
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
# PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
# OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf
@ -180,19 +181,25 @@
OcAppleBootPolicyLib|OpenCorePkg/Library/OcAppleBootPolicyLib/OcAppleBootPolicyLib.inf
OcAppleChunklistLib|OpenCorePkg/Library/OcAppleChunklistLib/OcAppleChunklistLib.inf
OcAppleDiskImageLib|OpenCorePkg/Library/OcAppleDiskImageLib/OcAppleDiskImageLib.inf
# OcAppleImageConversionLib|OpenCorePkg/Library/OcAppleImageConversionLib/OcAppleImageConversionLib.inf
OcAppleKeyMapLib|OpenCorePkg/Library/OcAppleKeyMapLib/OcAppleKeyMapLib.inf
OcAppleKeysLib|OpenCorePkg/Library/OcAppleKeysLib/OcAppleKeysLib.inf
OcAppleRamDiskLib|OpenCorePkg/Library/OcAppleRamDiskLib/OcAppleRamDiskLib.inf
OcBootManagementLib|OpenCorePkg/Library/OcBootManagementLib/OcBootManagementLib.inf
OcCompressionLib|OpenCorePkg/Library/OcCompressionLib/OcCompressionLib.inf
OcConsoleControlEntryModeGenericLib|OpenCorePkg/Library/OcConsoleControlEntryModeLib/OcConsoleControlEntryModeGenericLib.inf
OcConsoleLib|OpenCorePkg/Library/OcConsoleLib/OcConsoleLib.inf
OcCpuLib|OpenCorePkg/Library/OcCpuLib/OcCpuLib.inf
OcCryptoLib|OpenCorePkg/Library/OcCryptoLib/OcCryptoLib.inf
OcDeviceMiscLib|OpenCorePkg/Library/OcDeviceMiscLib/OcDeviceMiscLib.inf
OcDevicePathLib|OpenCorePkg/Library/OcDevicePathLib/OcDevicePathLib.inf
OcFileLib|OpenCorePkg/Library/OcFileLib/OcFileLib.inf
OcFlexArrayLib|OpenCorePkg/Library/OcFlexArrayLib/OcFlexArrayLib.inf
OcMainLib|OpenCorePkg/Library/OcMainLib/OcMainLibClover.inf
OcMemoryLib|OpenCorePkg/Library/OcMemoryLib/OcMemoryLib.inf
OcMiscLib|OpenCorePkg/Library/OcMiscLib/OcMiscLib.inf
OcOSInfoLib|OpenCorePkg/Library/OcOSInfoLib/OcOSInfoLib.inf
# OcPngLib|OpenCorePkg/Library/OcPngLib/OcPngLib.inf
OcRngLib|OpenCorePkg/Library/OcRngLib/OcRngLib.inf
OcRtcLib|OpenCorePkg/Library/OcRtcLib/OcRtcLib.inf
OcSerializeLib|OpenCorePkg/Library/OcSerializeLib/OcSerializeLib.inf
@ -200,6 +207,8 @@
OcStorageLib|OpenCorePkg/Library/OcStorageLib/OcStorageLib.inf
OcTemplateLib|OpenCorePkg/Library/OcTemplateLib/OcTemplateLib.inf
OcXmlLib|OpenCorePkg/Library/OcXmlLib/OcXmlLib.inf
OcTypingLib|OpenCorePkg/Library/OcTypingLib/OcTypingLib.inf
#OcTimerLib|OpenCorePkg/Library/OcTimerLib/OcTimerLib.inf
OcDeviceTreeLib|OpenCorePkg/Library/OcDeviceTreeLib/OcDeviceTreeLib.inf
OcDataHubLib|OpenCorePkg/Library/OcDataHubLib/OcDataHubLib.inf
OcAppleImg4Lib|OpenCorePkg/Library/OcAppleImg4Lib/OcAppleImg4Lib.inf
@ -209,13 +218,13 @@
OcMacInfoLib|OpenCorePkg/Library/OcMacInfoLib/OcMacInfoLib.inf
OcApfsLib|OpenCorePkg/Library/OcApfsLib/OcApfsLib.inf
OcAppleSecureBootLib|OpenCorePkg/Library/OcAppleSecureBootLib/OcAppleSecureBootLib.inf
OcAppleImageVerificationLib|OpenCorePkg/Library/OcAppleImageVerificationLib/OcAppleImageVerificationLib.inf
# OcAppleImageVerificationLib|OpenCorePkg/Library/OcAppleImageVerificationLib/OcAppleImageVerificationLib.inf
OcDriverConnectionLib|OpenCorePkg/Library/OcDriverConnectionLib/OcDriverConnectionLib.inf
#OcDebugLogLib|OpenCorePkg/Library/OcDebugLogLib/OcDebugLogLib.inf
OcAcpiLib|OpenCorePkg/Library/OcAcpiLib/OcAcpiLib.inf
OcAppleEventLib|OpenCorePkg/Library/OcAppleEventLib/OcAppleEventLib.inf
#OcAppleImageConversionLib|OpenCorePkg/Library/OcAppleImageConversionLib/OcAppleImageConversionLib.inf
OcAudioLib|OpenCorePkg/Library/OcAudioLib/OcAudioLib.inf
OcBlitLib|OpenCorePkg/Library/OcBlitLib/OcBlitLib.inf
OcInputLib|OpenCorePkg/Library/OcInputLib/OcInputLib.inf
OcAppleUserInterfaceThemeLib|OpenCorePkg/Library/OcAppleUserInterfaceThemeLib/OcAppleUserInterfaceThemeLib.inf
OcConfigurationLib|OpenCorePkg/Library/OcConfigurationLib/OcConfigurationLib.inf
@ -225,10 +234,13 @@
OcSmbiosLib|OpenCorePkg/Library/OcSmbiosLib/OcSmbiosLib.inf
OcSmcLib|OpenCorePkg/Library/OcSmcLib/OcSmcLib.inf
OcUnicodeCollationEngGenericLib|OpenCorePkg/Library/OcUnicodeCollationEngLib/OcUnicodeCollationEngGenericLib.inf
OcPeCoffExtLib|OpenCorePkg/Library/OcPeCoffExtLib/OcPeCoffExtLib.inf
OcPeCoffLib|OpenCorePkg/Library/OcPeCoffLib/OcPeCoffLib.inf
#OcPngLib|OpenCorePkg/Library/OcPngLib/OcPngLib.inf
OpenCoreLib|OpenCorePkg/Platform/OpenCore/OpenCoreLib.inf
OcVariableLib|OpenCorePkg/Library/OcVariableLib/OcVariableLib.inf
ResetSystemLib|OpenCorePkg/Library/OcResetSystemLib/OcResetSystemLib.inf
OpenCoreLib|OpenCorePkg/Application/OpenCore/OpenCoreLib.inf
OcDebugLogLibOc2Clover|OpenCorePkg/Library/OcDebugLogLibOc2Clover/OcDebugLogLibOc2Clover.inf
#MachoLib|Library/MachoLib/MachoLib.inf
@ -291,7 +303,7 @@
DEFINE OC_INCLUDE_FLAG = -include OpenCoreFromClover.h
!endif
OpenCorePkg/Platform/OpenCore/OpenCoreLib.inf {
OpenCorePkg/Application/OpenCore/OpenCoreLib.inf {
<BuildOptions>
*_*_*_CC_FLAGS = $(OC_INCLUDE_FLAG)
}
@ -347,6 +359,10 @@
<BuildOptions>
*_*_*_CC_FLAGS = $(OC_INCLUDE_FLAG)
}
OpenCorePkg/Library/OcDeviceMiscLib/OcDeviceMiscLib.inf {
<BuildOptions>
*_*_*_CC_FLAGS = $(OC_INCLUDE_FLAG)
}
OpenCorePkg/Library/OcDevicePathLib/OcDevicePathLib.inf {
<BuildOptions>
*_*_*_CC_FLAGS = $(OC_INCLUDE_FLAG)
@ -431,10 +447,10 @@
<BuildOptions>
*_*_*_CC_FLAGS = $(OC_INCLUDE_FLAG)
}
OpenCorePkg/Library/OcAppleImageVerificationLib/OcAppleImageVerificationLib.inf {
<BuildOptions>
*_*_*_CC_FLAGS = $(OC_INCLUDE_FLAG)
}
# OpenCorePkg/Library/OcAppleImageVerificationLib/OcAppleImageVerificationLib.inf {
# <BuildOptions>
# *_*_*_CC_FLAGS = $(OC_INCLUDE_FLAG)
# }
OpenCorePkg/Library/OcDriverConnectionLib/OcDriverConnectionLib.inf {
<BuildOptions>
*_*_*_CC_FLAGS = $(OC_INCLUDE_FLAG)
@ -493,6 +509,14 @@
<BuildOptions>
*_*_*_CC_FLAGS = $(OC_INCLUDE_FLAG)
}
OpenCorePkg/Library/OcVariableLib/OcVariableLib.inf {
<BuildOptions>
*_*_*_CC_FLAGS = $(OC_INCLUDE_FLAG)
}
OpenCorePkg/Library/OcMainLib/OcMainLibClover.inf {
<BuildOptions>
*_*_*_CC_FLAGS = $(OC_INCLUDE_FLAG)
}
#DuetPkg/BootSector/BootSector.inf
@ -794,7 +818,7 @@
#Sample/Application/Sample.inf
#gptsync/gptsync.inf
bdmesg_efi/bdmesg.inf
OpenCorePkg/Application/ControlMsrE2/ControlMsrE2.inf
OpenCorePkg/Application/ControlMsrE2/ControlMsrE2Clover.inf
!ifndef NO_CLOVER_SHELL
ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf

View File

@ -183,8 +183,6 @@
<true/>
<key>FixHPET</key>
<true/>
<key>FixHeaders</key>
<true/>
<key>FixLAN</key>
<true/>
<key>FixRTC</key>
@ -995,6 +993,12 @@
<string>Apple Inc.</string>
<key>#FirmwareFeatures</key>
<string>0xC0001403</string>
<key>#FirmwareFeaturesMask</key>
<string>0xFFFFFFFF</string>
<key>#ExtendedFirmwareFeatures</key>
<string>0x8FE001403</string>
<key>#ExtendedFirmwareFeaturesMask</key>
<string>0xFFFFFFFFFF</string>
<key>#PlatformFeature</key>
<string>0x00</string>
<key>#Trust</key>
@ -1003,8 +1007,6 @@
<string>C0225060SAMF651AX</string>
<key>#BiosVendor</key>
<string>Apple Inc.</string>
<key>#FirmwareFeaturesMask</key>
<string>0xFFFFFFFF</string>
<key>#BoardManufacturer</key>
<string>Apple Inc.</string>
<key>#BoardType</key>
@ -1156,6 +1158,8 @@
<true/>
<key>DummyPowerManagement</key>
<false/>
<key>ExtendBTFeatureFlags</key>
<false/>
<key>ExternalDiskIcons</key>
<false/>
<key>IncreasePciBarSize</key>
@ -1168,4 +1172,4 @@
<false/>
</dict>
</dict>
</plist>
</plist>

View File

@ -211,7 +211,7 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor|L"CLOVER"|VOID*|0x10010003
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision|0x00010010|UINT32|0x10010004
gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x0|UINT32|0x10010005
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x0|UINT32|0x10010006
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x0|UINT8|0x10010006
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x0|UINT32|0x10010007
gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE|BOOLEAN|0x10010008
gPcAtChipsetPkgTokenSpaceGuid.PcdIsaAcpiFloppyAEnable|FALSE|BOOLEAN|0x10010009

View File

@ -173,6 +173,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
#define FW_FEATURE_DISABLE_BOOTSCRIPT_WORKAROUND 0x80000000U // 31
//
// Supports large BaseSystem. Checked by patchd. Required by macOS 12.
//
#define FW_FEATURE_SUPPORTS_LARGE_BASESYSTEM 0x800000000U // 35
//
// OEM Platform Feature Information - Platform feature bits
// These bits are exposed via APPLE_SMBIOS_TABLE_TYPE133 FirmwareFeatures:

View File

@ -24,7 +24,10 @@ typedef struct {
/// The common ACPI description table header. This structure prefaces most ACPI tables.
///
typedef struct {
union {
UINT32 Signature;
CHAR8 SignatureAs4Char[4];
};
UINT32 Length;
UINT8 Revision;
UINT8 Checksum;

View File

@ -2879,6 +2879,11 @@ typedef struct {
///
#define EFI_ACPI_6_2_DATA_MANAGEMENT_TABLE_SIGNATURE SIGNATURE_32('M', 'S', 'D', 'M')
///
/// "PCCT" Platform Communications Channel Table
///
#define EFI_ACPI_6_2_PLATFORM_COMMUNICATIONS_CHANNEL_TABLE_SIGNATURE SIGNATURE_32('P', 'C', 'C', 'T')
///
/// "SDEI" Software Delegated Exceptions Interface Table
///

View File

@ -2,6 +2,7 @@
This file contains AML code definition in the latest ACPI spec.
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2019 - 2021, Arm Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -30,6 +31,7 @@
#define AML_PACKAGE_OP 0x12
#define AML_VAR_PACKAGE_OP 0x13
#define AML_METHOD_OP 0x14
#define AML_EXTERNAL_OP 0x15
#define AML_DUAL_NAME_PREFIX 0x2e
#define AML_MULTI_NAME_PREFIX 0x2f
#define AML_NAME_CHAR_A 0x41

View File

@ -0,0 +1,357 @@
/** @file
Arm Error Source Table as described in the
'ACPI for the Armv8 RAS Extensions 1.1' Specification.
Copyright (c) 2020 Arm Limited.
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s):
- ACPI for the Armv8 RAS Extensions 1.1 Platform Design Document,
dated 28 September 2020.
(https://developer.arm.com/documentation/den0085/0101/)
@par Glossary
- Ref : Reference
- Id : Identifier
**/
#ifndef ARM_ERROR_SOURCE_TABLE_H_
#define ARM_ERROR_SOURCE_TABLE_H_
///
/// "AEST" Arm Error Source Table
///
#define EFI_ACPI_6_3_ARM_ERROR_SOURCE_TABLE_SIGNATURE SIGNATURE_32('A', 'E', 'S', 'T')
#define EFI_ACPI_ARM_ERROR_SOURCE_TABLE_REVISION 1
#pragma pack(1)
///
/// Arm Error Source Table definition.
///
typedef struct {
EFI_ACPI_DESCRIPTION_HEADER Header;
} EFI_ACPI_ARM_ERROR_SOURCE_TABLE;
///
/// AEST Node structure.
///
typedef struct {
/// Node type:
/// 0x00 - Processor error node
/// 0x01 - Memory error node
/// 0x02 - SMMU error node
/// 0x03 - Vendor-defined error node
/// 0x04 - GIC error node
UINT8 Type;
/// Length of structure in bytes.
UINT16 Length;
/// Reserved - Must be zero.
UINT8 Reserved;
/// Offset from the start of the node to node-specific data.
UINT32 DataOffset;
/// Offset from the start of the node to the node interface structure.
UINT32 InterfaceOffset;
/// Offset from the start of the node to node interrupt array.
UINT32 InterruptArrayOffset;
/// Number of entries in the interrupt array.
UINT32 InterruptArrayCount;
// Generic node data
/// The timestamp frequency of the counter in Hz.
UINT64 TimestampRate;
/// Reserved - Must be zero.
UINT64 Reserved1;
/// The rate in Hz at which the Error Generation Counter decrements.
UINT64 ErrorInjectionCountdownRate;
} EFI_ACPI_AEST_NODE_STRUCT;
// AEST Node type definitions
#define EFI_ACPI_AEST_NODE_TYPE_PROCESSOR 0x0
#define EFI_ACPI_AEST_NODE_TYPE_MEMORY 0x1
#define EFI_ACPI_AEST_NODE_TYPE_SMMU 0x2
#define EFI_ACPI_AEST_NODE_TYPE_VENDOR_DEFINED 0x3
#define EFI_ACPI_AEST_NODE_TYPE_GIC 0x4
///
/// AEST Node Interface structure.
///
typedef struct {
/// Interface type:
/// 0x0 - System register (SR)
/// 0x1 - Memory mapped (MMIO)
UINT8 Type;
/// Reserved - Must be zero.
UINT8 Reserved[3];
/// AEST node interface flags.
UINT32 Flags;
/// Base address of error group that contains the error node.
UINT64 BaseAddress;
/// Zero-based index of the first standard error record that
/// belongs to this node.
UINT32 StartErrorRecordIndex;
/// Number of error records in this node including both
/// implemented and unimplemented records.
UINT32 NumberErrorRecords;
/// A bitmap indicating the error records within this
/// node that are implemented in the current system.
UINT64 ErrorRecordImplemented;
/// A bitmap indicating the error records within this node that
/// support error status reporting through the ERRGSR register.
UINT64 ErrorRecordStatusReportingSupported;
/// A bitmap indicating the addressing mode used by each error
/// record within this node to populate the ERR<n>_ADDR register.
UINT64 AddressingMode;
} EFI_ACPI_AEST_INTERFACE_STRUCT;
// AEST Interface node type definitions.
#define EFI_ACPI_AEST_INTERFACE_TYPE_SR 0x0
#define EFI_ACPI_AEST_INTERFACE_TYPE_MMIO 0x1
// AEST node interface flag definitions.
#define EFI_ACPI_AEST_INTERFACE_FLAG_PRIVATE 0
#define EFI_ACPI_AEST_INTERFACE_FLAG_SHARED BIT0
#define EFI_ACPI_AEST_INTERFACE_FLAG_CLEAR_MISCX BIT1
///
/// AEST Node Interrupt structure.
///
typedef struct {
/// Interrupt type:
/// 0x0 - Fault Handling Interrupt
/// 0x1 - Error Recovery Interrupt
UINT8 InterruptType;
/// Reserved - Must be zero.
UINT8 Reserved[2];
/// Interrupt flags
/// Bits [31:1]: Must be zero.
/// Bit 0:
/// 0b - Interrupt is edge-triggered
/// 1b - Interrupt is level-triggered
UINT8 InterruptFlags;
/// GSIV of interrupt, if interrupt is an SPI or a PPI.
UINT32 InterruptGsiv;
/// If MSI is supported, then this field must be set to the
/// Identifier field of the IORT ITS Group node.
UINT8 ItsGroupRefId;
/// Reserved - must be zero.
UINT8 Reserved1[3];
} EFI_ACPI_AEST_INTERRUPT_STRUCT;
// AEST Interrupt node - interrupt type defintions.
#define EFI_ACPI_AEST_INTERRUPT_TYPE_FAULT_HANDLING 0x0
#define EFI_ACPI_AEST_INTERRUPT_TYPE_ERROR_RECOVERY 0x1
// AEST Interrupt node - interrupt flag defintions.
#define EFI_ACPI_AEST_INTERRUPT_FLAG_TRIGGER_TYPE_EDGE 0
#define EFI_ACPI_AEST_INTERRUPT_FLAG_TRIGGER_TYPE_LEVEL BIT0
///
/// Cache Processor Resource structure.
///
typedef struct {
/// Reference to the cache structure in the PPTT table.
UINT32 CacheRefId;
/// Reserved
UINT32 Reserved;
} EFI_ACPI_AEST_PROCESSOR_CACHE_RESOURCE_STRUCT;
///
/// TLB Processor Resource structure.
///
typedef struct {
/// TLB level from perspective of current processor.
UINT32 TlbRefId;
/// Reserved
UINT32 Reserved;
} EFI_ACPI_AEST_PROCESSOR_TLB_RESOURCE_STRUCT;
///
/// Processor Generic Resource structure.
///
typedef struct {
/// Vendor-defined supplementary data.
UINT32 Data;
} EFI_ACPI_AEST_PROCESSOR_GENERIC_RESOURCE_STRUCT;
///
/// AEST Processor Resource union.
///
typedef union {
/// Processor Cache resource.
EFI_ACPI_AEST_PROCESSOR_CACHE_RESOURCE_STRUCT Cache;
/// Processor TLB resource.
EFI_ACPI_AEST_PROCESSOR_TLB_RESOURCE_STRUCT Tlb;
/// Processor Generic resource.
EFI_ACPI_AEST_PROCESSOR_GENERIC_RESOURCE_STRUCT Generic;
} EFI_ACPI_AEST_PROCESSOR_RESOURCE;
///
/// AEST Processor structure.
///
typedef struct {
/// AEST Node header
EFI_ACPI_AEST_NODE_STRUCT NodeHeader;
/// Processor ID of node.
UINT32 AcpiProcessorId;
/// Resource type of the processor node.
/// 0x0 - Cache
/// 0x1 - TLB
/// 0x2 - Generic
UINT8 ResourceType;
/// Reserved - must be zero.
UINT8 Reserved;
/// Processor structure flags.
UINT8 Flags;
/// Processor structure revision.
UINT8 Revision;
/// Processor affinity descriptor for the resource that this
/// error node pertains to.
UINT64 ProcessorAffinityLevelIndicator;
/// Processor resource
EFI_ACPI_AEST_PROCESSOR_RESOURCE Resource;
// Node Interface
// EFI_ACPI_AEST_INTERFACE_STRUCT NodeInterface;
// Node Interrupt Array
// EFI_ACPI_AEST_INTERRUPT_STRUCT NodeInterruptArray[n];
} EFI_ACPI_AEST_PROCESSOR_STRUCT;
// AEST Processor resource type definitions.
#define EFI_ACPI_AEST_PROCESSOR_RESOURCE_TYPE_CACHE 0x0
#define EFI_ACPI_AEST_PROCESSOR_RESOURCE_TYPE_TLB 0x1
#define EFI_ACPI_AEST_PROCESSOR_RESOURCE_TYPE_GENERIC 0x2
// AEST Processor flag definitions.
#define EFI_ACPI_AEST_PROCESSOR_FLAG_GLOBAL BIT0
#define EFI_ACPI_AEST_PROCESSOR_FLAG_SHARED BIT1
///
/// Memory Controller structure.
///
typedef struct {
/// AEST Node header
EFI_ACPI_AEST_NODE_STRUCT NodeHeader;
/// SRAT proximity domain.
UINT32 ProximityDomain;
// Node Interface
// EFI_ACPI_AEST_INTERFACE_STRUCT NodeInterface;
// Node Interrupt Array
// EFI_ACPI_AEST_INTERRUPT_STRUCT NodeInterruptArray[n];
} EFI_ACPI_AEST_MEMORY_CONTROLLER_STRUCT;
///
/// SMMU structure.
///
typedef struct {
/// AEST Node header
EFI_ACPI_AEST_NODE_STRUCT NodeHeader;
/// Reference to the IORT table node that describes this SMMU.
UINT32 SmmuRefId;
/// Reference to the IORT table node that is associated with the
/// sub-component within this SMMU.
UINT32 SubComponentRefId;
// Node Interface
// EFI_ACPI_AEST_INTERFACE_STRUCT NodeInterface;
// Node Interrupt Array
// EFI_ACPI_AEST_INTERRUPT_STRUCT NodeInterruptArray[n];
} EFI_ACPI_AEST_SMMU_STRUCT;
///
/// Vendor-Defined structure.
///
typedef struct {
/// AEST Node header
EFI_ACPI_AEST_NODE_STRUCT NodeHeader;
/// ACPI HID of the component.
UINT32 HardwareId;
/// The ACPI Unique identifier of the component.
UINT32 UniqueId;
/// Vendor-specific data, for example to identify this error source.
UINT8 VendorData[16];
// Node Interface
// EFI_ACPI_AEST_INTERFACE_STRUCT NodeInterface;
// Node Interrupt Array
// EFI_ACPI_AEST_INTERRUPT_STRUCT NodeInterruptArray[n];
} EFI_ACPI_AEST_VENDOR_DEFINED_STRUCT;
///
/// GIC structure.
///
typedef struct {
/// AEST Node header
EFI_ACPI_AEST_NODE_STRUCT NodeHeader;
/// Type of GIC interface that is associated with this error node.
/// 0x0 - GIC CPU (GICC)
/// 0x1 - GIC Distributor (GICD)
/// 0x2 - GIC Resistributor (GICR)
/// 0x3 - GIC ITS (GITS)
UINT32 InterfaceType;
/// Identifier for the interface instance.
UINT32 GicInterfaceRefId;
// Node Interface
// EFI_ACPI_AEST_INTERFACE_STRUCT NodeInterface;
// Node Interrupt Array
// EFI_ACPI_AEST_INTERRUPT_STRUCT NodeInterruptArray[n];
} EFI_ACPI_AEST_GIC_STRUCT;
// AEST GIC interface type definitions.
#define EFI_ACPI_AEST_GIC_INTERFACE_TYPE_GICC 0x0
#define EFI_ACPI_AEST_GIC_INTERFACE_TYPE_GICD 0x1
#define EFI_ACPI_AEST_GIC_INTERFACE_TYPE_GICR 0x2
#define EFI_ACPI_AEST_GIC_INTERFACE_TYPE_GITS 0x3
#pragma pack()
#endif // ARM_ERROR_SOURCE_TABLE_H_

View File

@ -906,7 +906,7 @@ typedef struct {
SMBIOS_TABLE_STRING Socket;
UINT8 ProcessorType; ///< The enumeration value from PROCESSOR_TYPE_DATA.
UINT8 ProcessorFamily; ///< The enumeration value from PROCESSOR_FAMILY_DATA.
SMBIOS_TABLE_STRING ProcessorManufacture;
SMBIOS_TABLE_STRING ProcessorManufacturer;
PROCESSOR_ID_DATA ProcessorId;
SMBIOS_TABLE_STRING ProcessorVersion;
PROCESSOR_VOLTAGE Voltage;

View File

@ -0,0 +1,271 @@
/** @file
Null instance of RegisterFilterLib.
Copyright (c) 2021 Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <Library/RegisterFilterLib.h>
/**
Filter IO read operation before read IO port.
It is used to filter IO read operation.
It will return the flag to decide whether require read real IO port.
It can be used for emulation environment.
@param[in] Width Signifies the width of the I/O operation.
@param[in] Address The base address of the I/O operation.
@param[in,out] Buffer The destination buffer to store the results.
@retval TRUE Need to excute the IO read.
@retval FALSE Skip the IO read.
**/
BOOLEAN
EFIAPI
FilterBeforeIoRead (
IN FILTER_IO_WIDTH Width,
IN UINTN Address,
IN OUT VOID *Buffer
)
{
return TRUE;
}
/**
Trace IO read operation after read IO port.
It is used to trace IO operation.
@param[in] Width Signifies the width of the I/O operation.
@param[in] Address The base address of the I/O operation.
@param[in] Buffer The destination buffer to store the results.
**/
VOID
EFIAPI
FilterAfterIoRead (
IN FILTER_IO_WIDTH Width,
IN UINTN Address,
IN VOID *Buffer
)
{
return;
}
/**
Filter IO Write operation before wirte IO port.
It is used to filter IO operation.
It will return the flag to decide whether require read write IO port.
It can be used for emulation environment.
@param[in] Width Signifies the width of the I/O operation.
@param[in] Address The base address of the I/O operation.
@param[in] Buffer The source buffer from which to write data.
@retval TRUE Need to excute the IO write.
@retval FALSE Skip the IO write.
**/
BOOLEAN
EFIAPI
FilterBeforeIoWrite (
IN FILTER_IO_WIDTH Width,
IN UINTN Address,
IN VOID *Buffer
)
{
return TRUE;
}
/**
Trace IO Write operation after wirte IO port.
It is used to trace IO operation.
@param[in] Width Signifies the width of the I/O operation.
@param[in] Address The base address of the I/O operation.
@param[in] Buffer The source buffer from which to Write data.
**/
VOID
EFIAPI
FilterAfterIoWrite (
IN FILTER_IO_WIDTH Width,
IN UINTN Address,
IN VOID *Buffer
)
{
return;
}
/**
Filter memory IO before Read operation.
It will return the flag to decide whether require read real MMIO.
It can be used for emulation environment.
@param[in] Width Signifies the width of the memory I/O operation.
@param[in] Address The base address of the memory I/O operation.
@param[in,out] Buffer The destination buffer to store the results.
@retval TRUE Need to excute the MMIO read.
@retval FALSE Skip the MMIO read.
**/
BOOLEAN
EFIAPI
FilterBeforeMmIoRead (
IN FILTER_IO_WIDTH Width,
IN UINTN Address,
IN OUT VOID *Buffer
)
{
return TRUE;
}
/**
Tracer memory IO after read operation.
@param[in] Width Signifies the width of the memory I/O operation.
@param[in] Address The base address of the memory I/O operation.
@param[in] Buffer The destination buffer to store the results.
**/
VOID
EFIAPI
FilterAfterMmIoRead (
IN FILTER_IO_WIDTH Width,
IN UINTN Address,
IN VOID *Buffer
)
{
return;
}
/**
Filter memory IO before write operation.
It will return the flag to decide whether require wirte real MMIO.
It can be used for emulation environment.
@param[in] Width Signifies the width of the memory I/O operation.
@param[in] Address The base address of the memory I/O operation.
@param[in] Buffer The source buffer from which to write data.
@retval TRUE Need to excute the MMIO write.
@retval FALSE Skip the MMIO write.
**/
BOOLEAN
EFIAPI
FilterBeforeMmIoWrite (
IN FILTER_IO_WIDTH Width,
IN UINTN Address,
IN VOID *Buffer
)
{
return TRUE;
}
/**
Tracer memory IO after write operation.
@param[in] Width Signifies the width of the memory I/O operation.
@param[in] Address The base address of the memory I/O operation.
@param[in] Buffer The source buffer from which to write data.
**/
VOID
EFIAPI
FilterAfterMmIoWrite (
IN FILTER_IO_WIDTH Width,
IN UINTN Address,
IN VOID *Buffer
)
{
return;
}
/**
Filter MSR before read operation.
It will return the flag to decide whether require read real MSR.
It can be used for emulation environment.
@param Index The Register index of the MSR.
@param Value Point to the data will be read from the MSR.
@retval TRUE Need to excute the MSR read.
@retval FALSE Skip the MSR read.
**/
BOOLEAN
EFIAPI
FilterBeforeMsrRead (
IN UINT32 Index,
IN OUT UINT64 *Value
)
{
return TRUE;
}
/**
Trace MSR after read operation.
@param Index The Register index of the MSR.
@param Value Point to the data has been be read from the MSR.
**/
VOID
EFIAPI
FilterAfterMsrRead (
IN UINT32 Index,
IN UINT64 *Value
)
{
return;
}
/**
Filter MSR before write operation.
It will return the flag to decide whether require write real MSR.
It can be used for emulation environment.
@param Index The Register index of the MSR.
@param Value Point to the data want to be written to the MSR.
@retval TRUE Need to excute the MSR write.
@retval FALSE Skip the MSR write.
**/
BOOLEAN
EFIAPI
FilterBeforeMsrWrite (
IN UINT32 Index,
IN UINT64 *Value
)
{
return TRUE;
}
/**
Trace MSR after write operation.
@param Index The Register index of the MSR.
@param Value Point to the data has been be written to the MSR.
**/
VOID
EFIAPI
FilterAfterMsrWrite (
IN UINT32 Index,
IN UINT64 *Value
)
{
return;
}

View File

@ -0,0 +1,23 @@
## @file
# Null instance of RegisterFilterLib.
#
# Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = FilterLibNull
MODULE_UNI_FILE = FilterLibNull.uni
FILE_GUID = 9F555194-A410-4AD6-B3FC-53F6E10FA793
MODULE_TYPE = BASE
VERSION_STRING = 1.0
LIBRARY_CLASS = RegisterFilterLib
[Sources]
RegisterFilterLibNull.c
[Packages]
MdePkg/MdePkg.dec

View File

@ -0,0 +1,13 @@
// /** @file
// Null instance of RegisterFilterLib.
//
// Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
//
// SPDX-License-Identifier: BSD-2-Clause-Patent
//
// **/
#string STR_MODULE_ABSTRACT #language en-US "Null instance of RegisterFilterLib."
#string STR_MODULE_DESCRIPTION #language en-US "Null instance of RegisterFilterLib."

15
MdePkg/MdeLibs.dsc.inc Normal file
View File

@ -0,0 +1,15 @@
## @file
# Mde DSC include file for [LibraryClasses*] section of all Architectures.
#
# This file can be included to the [LibraryClasses*] section(s) of a platform DSC file
# by using "!include MdePkg/MdeLibs.dsc.inc" to specify the library instances
# of some EDKII basic/common library classes.
#
# Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[LibraryClasses]
RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf

@ -1 +1 @@
Subproject commit b0aac62accc46de3297b2fa3b50e34f0d03460bd
Subproject commit 93feac4ed96bad9bb54a817e24426241e1df1d5f

View File

@ -121,10 +121,10 @@ static int MapKeyData2AppleKey(EFI_KEY_DATA* KeyData, APPLE_KEY_CODE* pKey, UINT
*pKey = 0x7051;
return 1;
case 0x03: // left arrow
*pKey = 0x7050;
*pKey = 0x704F;
return 1;
case 0x04: // right arrow
*pKey = 0x704F;
*pKey = 0x7050;
return 1;
}
return 0;

View File

@ -433,7 +433,7 @@ SmbiosPrintStructure (
} else {
DisplayProcessorFamily (Struct->Type4->ProcessorFamily, Option);
}
PRINT_PENDING_STRING (Struct, Type4, ProcessorManufacture);
PRINT_PENDING_STRING (Struct, Type4, ProcessorManufacturer);
PRINT_BIT_FIELD (Struct, Type4, ProcessorId, 8);
PRINT_PENDING_STRING (Struct, Type4, ProcessorVersion);
DisplayProcessorVoltage (*(UINT8 *) &(Struct->Type4->Voltage), Option);

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +1,4 @@
/Gcc92-Debug/
/Clang-Debug/
/Clang-Debug/
/build/
/DerivedData/

View File

@ -839,6 +839,7 @@
"wcsncmp=wcsncmp_fixed",
"wcsstr=wcsstr_fixed",
NO_DEBUG_TRACE,
OC_TARGET_DEBUG,
);
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
@ -967,6 +968,7 @@
"wcsncmp=wcsncmp_fixed",
"wcsstr=wcsstr_fixed",
NO_DEBUG_TRACE,
OC_TARGET_DEBUG,
);
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;

View File

@ -1708,6 +1708,8 @@
<false/>
<key>DummyPowerManagement</key>
<false/>
<key>ExtendBTFeatureFlags</key>
<false/>
<key>ExternalDiskIcons</key>
<false/>
<key>IncreasePciBarSize</key>

View File

@ -57,11 +57,7 @@ extern "C" int main(int argc, const char * argv[])
#ifdef JIEF_DEBUG
path = "config-nowarning-noerror.plist";
path = "config-test2.plist";
//path = "/JiefLand/5.Devel/Clover/user config/Matgen84/EFI_github/CLOVER/config.plist";
//path = "/JiefLand/5.Devel/Clover/user config/BS.plist";
//path = "/JiefLand/5.Devel/Clover/user config/maclinuxG4/config.plist";
//path = "/JiefLand/5.Devel/Clover/user config/MICKHAEL/EFI_Github/CLOVER/config.plist";
path = "/JiefLand/5.Devel/Clover/user config/MacKonsti/2021-05-17/config-test.plist";
path = "/Volumes/CL_EFI_VMDK/EFI/CLOVER/config.plist";
#endif
if ( !path ) {

View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1120"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9AB309452694BEE700428609"
BuildableName = "libCloverX64 SecureBoot.a"
BlueprintName = "CloverX64 SecureBoot"
ReferencedContainer = "container:CloverX64.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9AB309452694BEE700428609"
BuildableName = "libCloverX64 SecureBoot.a"
BlueprintName = "CloverX64 SecureBoot"
ReferencedContainer = "container:CloverX64.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -1985,7 +1985,7 @@ EFI_STATUS PatchACPI(IN REFIT_VOLUME *Volume, const MacOsVersion& OSVersion)
//Slice: the idea was from past
// first priority DSDT.aml from the root of booted volume. It allows to keep different DSDT for different systems
// second priority is DSDT from OEM folder
// third priority is /EFI/CLOVER/ACPI/patched/DSDT*.aml choosen from GUI.
// third priority is {Clover folder}/ACPI/patched/DSDT*.aml choosen from GUI.
XStringW PathDsdt = SWPrintf("\\%ls", gSettings.ACPI.DSDT.DsdtName.wc_str());
if (EFI_ERROR(Status) && FileExists(Volume->RootDir, PathDsdt)) {

View File

@ -271,13 +271,24 @@ SetVariablesForOSX(LOADER_ENTRY *Entry)
sizeof(gSettings.Smbios.FirmwareFeatures),
&gSettings.Smbios.FirmwareFeatures);
// Download-Fritz: Should be added to SMBIOS or at least to some other config section
AddNvramVariable(L"FirmwareFeaturesMask",
SetNvramVariable(L"FirmwareFeaturesMask",
&gEfiAppleNvramGuid,
Attributes,
sizeof(gSettings.Smbios.FirmwareFeaturesMask),
&gSettings.Smbios.FirmwareFeaturesMask);
SetNvramVariable(L"ExtendedFirmwareFeatures",
&gEfiAppleNvramGuid,
Attributes,
sizeof(gSettings.Smbios.ExtendedFirmwareFeatures),
&gSettings.Smbios.ExtendedFirmwareFeatures);
SetNvramVariable(L"ExtendedFirmwareFeaturesMask",
&gEfiAppleNvramGuid,
Attributes,
sizeof(gSettings.Smbios.ExtendedFirmwareFeaturesMask),
&gSettings.Smbios.ExtendedFirmwareFeaturesMask);
// HW_MLB and HW_ROM are also around on some Macs with the same values as MLB and ROM
AddNvramXString8(L"HW_BID", &gEfiAppleNvramGuid, Attributes, gSettings.Smbios.BoardNumber);

View File

@ -89,10 +89,8 @@ EFI_EDID_DISCOVERED_PROTOCOL *EdidDiscovered;
XStringWArray ThemeNameArray;
UINTN ConfigsNum;
CHAR16 *ConfigsList[20];
UINTN DsdtsNum = 0;
CHAR16 *DsdtsList[20];
XStringWArray ConfigsList;
XStringWArray DsdtsList;
XObjArray<HDA_OUTPUTS> AudioList;
// firmware
@ -370,7 +368,7 @@ void afterGetUserSettings(SETTINGS_DATA& settingsData)
for ( size_t idx = 0 ; idx < settingsData.ACPI.ACPIDropTablesArray.size() ; ++idx)
{
ACPI_DROP_TABLE *DropTable = GlobalConfig.ACPIDropTables;
DBG(" - [%02zd]: Drop table : %08X, %16llx : ", idx, settingsData.ACPI.ACPIDropTablesArray[idx].Signature, settingsData.ACPI.ACPIDropTablesArray[idx].TableId);
DBG(" - [%02zd]: Drop table : %.4s, %16llx : ", idx, (const char*)&settingsData.ACPI.ACPIDropTablesArray[idx].Signature, settingsData.ACPI.ACPIDropTablesArray[idx].TableId);
bool Dropped = FALSE;
while (DropTable) {
if (((settingsData.ACPI.ACPIDropTablesArray[idx].Signature == DropTable->Signature) &&

View File

@ -154,7 +154,10 @@ class ACPI_DROP_TABLE
{
public:
ACPI_DROP_TABLE *Next;
UINT32 Signature;
union {
UINT32 Signature = 0;
char SignatureAs4Chars[4];
};
UINT32 Length;
UINT64 TableId;
INPUT_ITEM MenuItem = INPUT_ITEM();
@ -811,7 +814,10 @@ public:
class ACPIDropTablesClass
{
public:
UINT32 Signature = 0;
union {
UINT32 Signature = 0;
char SignatureAs4Chars[4];
};
UINT64 TableId = 0;
UINT32 TabLength = 0;
bool OtherOS = 0;
@ -1259,7 +1265,6 @@ public:
undefinable_bool _EnableC6 = undefinable_bool();
undefinable_bool _EnableC4 = undefinable_bool();
undefinable_bool _EnableC2 = undefinable_bool();
undefinable_uint16 _C3Latency = undefinable_uint16();
#if __cplusplus > 201703L
bool operator == (const CPUClass&) const = default;
@ -1281,7 +1286,6 @@ public:
if ( !(_EnableC6 == other._EnableC6) ) return false;
if ( !(_EnableC4 == other._EnableC4) ) return false;
if ( !(_EnableC2 == other._EnableC2) ) return false;
if ( !(_C3Latency == other._C3Latency) ) return false;
return true;
}
void takeValueFrom(const ConfigPlistClass::CPU_Class& configPlist)
@ -1301,7 +1305,6 @@ public:
_EnableC6 = configPlist.dget_EnableC6();
_EnableC4 = configPlist.dget_EnableC4();
_EnableC2 = configPlist.dget_EnableC2();
_C3Latency = configPlist.dget_C3Latency();
}
};
@ -2078,6 +2081,7 @@ printf("%s", "");
bool DisableLinkeditJettison = false;
// bool DisableRtcChecksum = false;
bool DummyPowerManagement = false;
bool ExtendBTFeatureFlags = false;
bool ExternalDiskIcons = false;
bool IncreasePciBarSize = false;
// bool LapicKernelPanic = false;
@ -2096,6 +2100,7 @@ printf("%s", "");
if ( !(DisableIoMapper == other.DisableIoMapper) ) return false;
if ( !(DisableLinkeditJettison == other.DisableLinkeditJettison) ) return false;
if ( !(DummyPowerManagement == other.DummyPowerManagement) ) return false;
if ( !(ExtendBTFeatureFlags == other.ExtendBTFeatureFlags) ) return false;
if ( !(ExternalDiskIcons == other.ExternalDiskIcons) ) return false;
if ( !(IncreasePciBarSize == other.IncreasePciBarSize) ) return false;
if ( !(PowerTimeoutKernelPanic == other.PowerTimeoutKernelPanic) ) return false;
@ -2110,6 +2115,7 @@ printf("%s", "");
DisableIoMapper = configPlist.dgetDisableIoMapper();
DisableLinkeditJettison = configPlist.dgetDisableLinkeditJettison();
DummyPowerManagement = configPlist.dgetDummyPowerManagement();
ExtendBTFeatureFlags = configPlist.dgetExtendBTFeatureFlags();
ExternalDiskIcons = configPlist.dgetExternalDiskIcons();
IncreasePciBarSize = configPlist.dgetIncreasePciBarSize();
PowerTimeoutKernelPanic = configPlist.dgetPowerTimeoutKernelPanic();
@ -2462,6 +2468,8 @@ printf("%s", "");
UINT32 FirmwareFeatures = UINT32();
UINT32 FirmwareFeaturesMask = UINT32();
UINT64 ExtendedFirmwareFeatures = UINT64();
UINT64 ExtendedFirmwareFeaturesMask = UINT64();
RamSlotInfoArrayClass RamSlotInfoArray = RamSlotInfoArrayClass();
SlotDeviceArrayClass SlotDevices = SlotDeviceArrayClass();
@ -2509,6 +2517,8 @@ printf("%s", "");
if ( !(FirmwareFeatures == other.FirmwareFeatures) ) return false;
if ( !(FirmwareFeaturesMask == other.FirmwareFeaturesMask) ) return false;
if ( !(ExtendedFirmwareFeatures == other.ExtendedFirmwareFeatures) ) return false;
if ( !(ExtendedFirmwareFeaturesMask == other.ExtendedFirmwareFeaturesMask) ) return false;
if ( !RamSlotInfoArray.isEqual(other.RamSlotInfoArray) ) return false;
if ( !SlotDevices.isEqual(other.SlotDevices) ) return false;
@ -2554,9 +2564,11 @@ printf("%s", "");
gPlatformFeature = configPlist.dgetgPlatformFeature();
// PatchTableType11
NoRomInfo = configPlist.dgetNoRomInfo();
//SMBIOS TYPE128
FirmwareFeatures = configPlist.dgetFirmwareFeatures();
FirmwareFeaturesMask = configPlist.dgetFirmwareFeaturesMask();
ExtendedFirmwareFeatures = configPlist.dgetExtendedFirmwareFeatures();
ExtendedFirmwareFeaturesMask = configPlist.dgetExtendedFirmwareFeaturesMask();
RamSlotInfoArray.takeValueFrom(configPlist.Memory);
SlotDevices.takeValueFrom(configPlist.Slots);
}
@ -2683,10 +2695,6 @@ printf("%s", "");
if ( CPU._EnableC2.isDefined() ) return CPU._EnableC2.value();
return ACPI.SSDT._EnableC2;
}
bool getC3Latency() const {
// if ( CPU._C3Latency.isDefined() ) return CPU._C3Latency.value();
return ACPI.SSDT._C3Latency;
}
};
@ -2740,10 +2748,8 @@ public:
extern XObjArray<HDA_OUTPUTS> AudioList;
extern XStringWArray ThemeNameArray;
extern CHAR16* ConfigsList[20];
extern CHAR16* DsdtsList[20];
extern UINTN DsdtsNum;
extern UINTN ConfigsNum;
extern XStringWArray ConfigsList;
extern XStringWArray DsdtsList;
//extern INTN ScrollButtonsHeight;
//extern INTN ScrollBarDecorationsHeight;
//extern INTN ScrollScrollDecorationsHeight;

View File

@ -134,6 +134,8 @@ void SmbiosFillPatchingValues(bool _SetTable132, uint8_t pEnabledCores, uint16_t
smbiosInjectedSetting.gPlatformFeature = globalSettings.Smbios.gPlatformFeature;
smbiosInjectedSetting.FirmwareFeatures = globalSettings.Smbios.FirmwareFeatures;
smbiosInjectedSetting.FirmwareFeaturesMask = globalSettings.Smbios.FirmwareFeaturesMask;
smbiosInjectedSetting.ExtendedFirmwareFeatures = globalSettings.Smbios.ExtendedFirmwareFeatures;
smbiosInjectedSetting.ExtendedFirmwareFeaturesMask = globalSettings.Smbios.ExtendedFirmwareFeaturesMask;
smbiosInjectedSetting.Attribute = globalSettings.Smbios.Attribute;
smbiosInjectedSetting.KPDELLSMBIOS = globalSettings.KernelAndKextPatches.KPDELLSMBIOS;

View File

@ -1658,14 +1658,14 @@ void FillOCCpuInfo(OC_CPU_INFO* CpuInfo)
CpuInfo->CpuidExtSigEcx.Uint32 = (UINT32)gCPUStructure.CPUID[CPUID_81][ECX];
CpuInfo->CpuidExtSigEdx.Uint32 = (UINT32)gCPUStructure.CPUID[CPUID_81][EDX];
CpuInfo->Brand = (UINT8)CpuInfo->CpuidVerEbx.Bits.BrandIndex;
CpuInfo->MaxDiv = (UINT8)gCPUStructure.SubDivider;
// CpuInfo->MaxDiv = (UINT8)gCPUStructure.SubDivider;
//there is a fault in OC as it can't handle non-integer values. Clover does by *10.
CpuInfo->MinBusRatio = (UINT8)(gCPUStructure.MinRatio / 10);
CpuInfo->MaxBusRatio = (UINT8)(gCPUStructure.MaxRatio / 10);
CpuInfo->TurboBusRatio1 = (UINT8)(gCPUStructure.Turbo1 /10);
CpuInfo->TurboBusRatio2 = (UINT8)(gCPUStructure.Turbo2 /10);
CpuInfo->TurboBusRatio3 = (UINT8)(gCPUStructure.Turbo3 /10);
CpuInfo->TurboBusRatio4 = (UINT8)(gCPUStructure.Turbo4 /10);
// CpuInfo->MinBusRatio = (UINT8)(gCPUStructure.MinRatio / 10);
// CpuInfo->MaxBusRatio = (UINT8)(gCPUStructure.MaxRatio / 10);
// CpuInfo->TurboBusRatio1 = (UINT8)(gCPUStructure.Turbo1 /10);
// CpuInfo->TurboBusRatio2 = (UINT8)(gCPUStructure.Turbo2 /10);
// CpuInfo->TurboBusRatio3 = (UINT8)(gCPUStructure.Turbo3 /10);
// CpuInfo->TurboBusRatio4 = (UINT8)(gCPUStructure.Turbo4 /10);
CpuInfo->PackageCount = 1; //number of started cores. Intel always start with one core.
CpuInfo->CoreCount = gCPUStructure.Cores;
CpuInfo->ThreadCount = gCPUStructure.Threads;

View File

@ -593,7 +593,7 @@ uint32_t GetFwFeatures(MACHINE_TYPES Model)
return 0xE00DE137;
break;
case MacMini81:
return 0xFD8FF466;
return 0xFD8FF467;
break;
case MacBookAir61:
case MacBookAir62:
@ -623,30 +623,30 @@ uint32_t GetFwFeatures(MACHINE_TYPES Model)
case iMac181:
case iMac182:
case iMac183:
return 0xFC0FE176;
return 0xFC0FE177;
break;
case MacBook91:
case MacBook101:
case MacBookPro133:
case MacBookPro143:
return 0xFC0FE17E;
return 0xFC0FE17F;
break;
case iMacPro11:
return 0xFD8FF53F;
break;
case MacBookAir91:
return 0xFD8FF42E;
return 0xFD8FF42F;
break;
case iMac191:
case iMac192:
case iMac201:
case iMac202:
return 0xFD8FF576;
return 0xFD8FF577;
break;
case MacBookPro162:
case MacBookPro163:
case MacBookPro164:
return 0xFDAFF066;
return 0xFDAFF067;
break;
// Verified list from Users
case MacBookAir31:
@ -671,7 +671,7 @@ uint32_t GetFwFeatures(MACHINE_TYPES Model)
return 0xE80FE137;
break;
case MacPro61:
return 0xE80FE176;
return 0xE80FE177;
break;
case MacPro71:
return 0xFD8FF53F;
@ -707,6 +707,56 @@ uint32_t GetFwFeatures(MACHINE_TYPES Model)
}
}
uint64_t GetExtFwFeatures(MACHINE_TYPES Model)
{
// FirmwareFeatures for 12+
switch ( Model )
{
case MacBookPro131:
case MacBookPro132:
case MacBookPro141:
case MacBookPro142:
case iMac171:
case iMac181:
case iMac182:
case iMac183:
return 0x8FC0FE177ull;
break;
case MacBook91:
case MacBook101:
case MacBookPro133:
case MacBookPro143:
return 0x8FC0FE17Eull;
break;
case MacBookPro121:
case MacBookPro151:
case MacBookPro152:
case MacBookPro153:
case MacBookPro154:
case MacBookPro161:
case MacBookAir81:
case MacBookAir82:
case iMac161:
case iMac162:
return 0x8FC0FE137ull;
break;
case MacBook61:
case MacBook71:
case MacBook81:
return 0x8FC0FE13Full;
break;
default:
return (uint64_t)GetFwFeatures(Model); //unknown - use oem SMBIOS value to be default
break;
}
}
uint64_t GetExtFwFeaturesMask(MACHINE_TYPES Model)
{
return (uint64_t)GetFwFeaturesMaskFromModel(Model) + 0xFF00000000ull;
}
bool GetMobile(MACHINE_TYPES Model)
{
// Mobile: the battery tab in Energy Saver
@ -1196,6 +1246,8 @@ void SetDMISettingsForModel(MACHINE_TYPES Model, SETTINGS_DATA* settingsData, RE
settingsData->Smbios.ChassisAssetTag = ApplePlatformData[Model].chassisAsset;
settingsData->Smbios.FirmwareFeatures = GetFwFeatures(Model);
settingsData->Smbios.FirmwareFeaturesMask = GetFwFeaturesMaskFromModel(Model);
settingsData->Smbios.ExtendedFirmwareFeatures = GetExtFwFeatures(Model);
settingsData->Smbios.ExtendedFirmwareFeaturesMask = GetExtFwFeaturesMask(Model);
settingsData->Smbios.gPlatformFeature = GetPlatformFeature(Model);
if ((Model > MacPro31) && (Model < MacPro71)) {
settingsData->Smbios.BoardType = BaseBoardTypeProcessorMemoryModule; //0xB;

View File

@ -201,6 +201,8 @@ XString8 GetReleaseDate (MACHINE_TYPES Model);
uint8_t GetChassisTypeFromModel(MACHINE_TYPES Model);
uint32_t GetFwFeaturesMaskFromModel(MACHINE_TYPES Model);
uint32_t GetFwFeatures(MACHINE_TYPES Model);
uint64_t GetExtFwFeatures(MACHINE_TYPES Model);
uint64_t GetExtFwFeaturesMask(MACHINE_TYPES Model);
bool GetMobile(MACHINE_TYPES Model);
UINT64 GetPlatformFeature(MACHINE_TYPES Model);
void getRBr(MACHINE_TYPES Model, UINT32 CPUModel, bool isMobile, char RBr[8]);

View File

@ -144,7 +144,7 @@ SMBIOS_TABLE_STRING SMBIOS_TABLE_TYPE3_STR_IDX[] = {
SMBIOS_TABLE_STRING SMBIOS_TABLE_TYPE4_STR_IDX[] = {
smbios_offsetof(SMBIOS_TABLE_TYPE4, Socket),
smbios_offsetof(SMBIOS_TABLE_TYPE4, ProcessorManufacture),
smbios_offsetof(SMBIOS_TABLE_TYPE4, ProcessorManufacturer),
smbios_offsetof(SMBIOS_TABLE_TYPE4, ProcessorVersion),
smbios_offsetof(SMBIOS_TABLE_TYPE4, SerialNumber),
smbios_offsetof(SMBIOS_TABLE_TYPE4, AssetTag),
@ -983,7 +983,7 @@ DBG("newSmbiosTable.Type4->ProcessorFamily=%d\n", newSmbiosTable.Type4->Processo
DBG("newSmbiosTable.Type4->ProcessorFamily2=%d\n", newSmbiosTable.Type4->ProcessorFamily2);
DBG("newSmbiosTable.Type4->ProcessorId.FeatureFlags=%d\n", *(UINT32*)&newSmbiosTable.Type4->ProcessorId.FeatureFlags);
DBG("newSmbiosTable.Type4->ProcessorId.Signatur=%d\n", *(UINT32*)&newSmbiosTable.Type4->ProcessorId.Signature);
DBG("newSmbiosTable.Type4->ProcessorManufacture=%d\n", newSmbiosTable.Type4->ProcessorManufacture);
DBG("newSmbiosTable.Type4->ProcessorManufacturer=%d\n", newSmbiosTable.Type4->ProcessorManufacturer);
DBG("newSmbiosTable.Type4->ProcessorType=%d\n", newSmbiosTable.Type4->ProcessorType);
DBG("newSmbiosTable.Type4->ProcessorUpgrade=%d\n", newSmbiosTable.Type4->ProcessorUpgrade);
DBG("newSmbiosTable.Type4->ProcessorVersion=%d\n", newSmbiosTable.Type4->ProcessorVersion);
@ -1982,6 +1982,8 @@ void PatchTableType128(const SmbiosInjectedSettings& smbiosSettings)
// set firmware-features mask
newSmbiosTable.Type128->FirmwareFeaturesMask = smbiosSettings.FirmwareFeaturesMask;
newSmbiosTable.Type128->ExtendedFirmwareFeatures = (uint32_t)(smbiosSettings.ExtendedFirmwareFeatures >> 32);
newSmbiosTable.Type128->ExtendedFirmwareFeaturesMask = (uint32_t)(smbiosSettings.ExtendedFirmwareFeaturesMask >> 32);
/**
* TODO: I have an idea that region should be the same as Efivar.bin
* @author Slice

View File

@ -201,6 +201,8 @@ class SmbiosInjectedSettings
uint64_t gPlatformFeature = 0;
uint32_t FirmwareFeatures = 0;
uint32_t FirmwareFeaturesMask = 0;
uint64_t ExtendedFirmwareFeatures = 0;
uint64_t ExtendedFirmwareFeaturesMask = 0;
int8_t Attribute = 0;
bool KPDELLSMBIOS = 0;

View File

@ -79,7 +79,7 @@ static EFI_FILE_PROTOCOL* gLogFile = NULL;
int g_OpeningLogFile = 0;
// Avoid debug looping. To be able to call DBG from inside function that DBG calls, we need to suspend callback to avoid a loop.
// Avoid debug looping. TO be able to call DBG from inside function that DBG calls, we need to suspend callback to avoid a loop.
// Just instanciante this, the destructor will restore the callback.
class SuspendMemLogCallback
{

View File

@ -666,6 +666,10 @@ void ConfigManager::FillSmbiosWithDefaultValue(MACHINE_TYPES Model, const Smbios
if ( smbiosDictClass.getChassisAssetTag().isDefined() ) gSettings.Smbios.ChassisAssetTag = smbiosDictClass.getChassisAssetTag().value();
if ( smbiosDictClass.getFirmwareFeatures().isDefined() ) gSettings.Smbios.FirmwareFeatures = smbiosDictClass.getFirmwareFeatures().value();
if ( smbiosDictClass.getFirmwareFeaturesMask().isDefined() ) gSettings.Smbios.FirmwareFeaturesMask = smbiosDictClass.getFirmwareFeaturesMask().value();
//ExtendedFirmwareFeatures
if ( smbiosDictClass.getExtendedFirmwareFeatures().isDefined() ) gSettings.Smbios.ExtendedFirmwareFeatures = smbiosDictClass.getExtendedFirmwareFeatures().value();
if ( smbiosDictClass.getExtendedFirmwareFeaturesMask().isDefined() ) gSettings.Smbios.ExtendedFirmwareFeaturesMask = smbiosDictClass.getExtendedFirmwareFeaturesMask().value();
if ( smbiosDictClass.getPlatformFeature().isDefined() ) gSettings.Smbios.gPlatformFeature = smbiosDictClass.getPlatformFeature().value();
if ( smbiosDictClass.getBoardType().isDefined() ) gSettings.Smbios.BoardType = smbiosDictClass.getBoardType().value();
if ( smbiosDictClass.getChassisType().isDefined() ) gSettings.Smbios.ChassisType = smbiosDictClass.getChassisType().value();

View File

@ -26,7 +26,16 @@ protected:
return true;
}
};
class LatencyClass : public XmlUInt16
{
using super = XmlUInt16;
public:
virtual bool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, bool generateErrors) override {
RETURN_IF_FALSE( super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) );
return xmlLiteParser->addWarning(generateErrors, S8Printf("Latency is replaced by ACPI/SSDT/C3Latency, value ignored. tag '%s:%d'.", xmlPath.c_str(), keyPos.getLine()));
}
};
XmlUInt16 QPI = XmlUInt16();
FrequencyMHzClass FrequencyMHz = FrequencyMHzClass();
XmlUInt16 Type = XmlUInt16();
@ -36,7 +45,7 @@ protected:
XmlBool C6 = XmlBool();
XmlBool C4 = XmlBool();
XmlBool C2 = XmlBool();
XmlUInt16 Latency = XmlUInt16();
LatencyClass Latency = LatencyClass();
XmlUInt8 SavingMode = XmlUInt8();
XmlBool HWPEnable = XmlBool();
XmlUInt32 HWPValue = XmlUInt32();

View File

@ -59,6 +59,7 @@ public:
XmlBool DisableIoMapper = XmlBool();
XmlBool DisableLinkeditJettison = XmlBool();
XmlBool DummyPowerManagement = XmlBool();
XmlBool ExtendBTFeatureFlags = XmlBool();
XmlBool ExternalDiskIcons = XmlBool();
XmlBool IncreasePciBarSize = XmlBool();
XmlBool PowerTimeoutKernelPanic = XmlBool();
@ -70,6 +71,7 @@ public:
bool dgetDisableIoMapper() const { return DisableIoMapper.isDefined() ? DisableIoMapper.value() : DisableIoMapper.nullValue; };
bool dgetDisableLinkeditJettison() const { return DisableLinkeditJettison.isDefined() ? DisableLinkeditJettison.value() : DisableLinkeditJettison.nullValue; };
bool dgetDummyPowerManagement() const { return DummyPowerManagement.isDefined() ? DummyPowerManagement.value() : DummyPowerManagement.nullValue; };
bool dgetExtendBTFeatureFlags() const { return ExtendBTFeatureFlags.isDefined() ? ExtendBTFeatureFlags.value() : ExtendBTFeatureFlags.nullValue; };
bool dgetExternalDiskIcons() const { return ExternalDiskIcons.isDefined() ? ExternalDiskIcons.value() : ExternalDiskIcons.nullValue; };
bool dgetIncreasePciBarSize() const { return IncreasePciBarSize.isDefined() ? IncreasePciBarSize.value() : IncreasePciBarSize.nullValue; };
bool dgetPowerTimeoutKernelPanic() const { return PowerTimeoutKernelPanic.isDefined() ? PowerTimeoutKernelPanic.value() : PowerTimeoutKernelPanic.nullValue; };
@ -130,7 +132,7 @@ public:
OcKernelQuirks_Class OcKernelQuirks;
OcBooterQuirks_Class OcBooterQuirks;
XmlDictField m_fields[30] = {
XmlDictField m_fields[31] = {
{"AvoidRuntimeDefrag", OcBooterQuirks.AvoidRuntimeDefrag},
{"DevirtualiseMmio", OcBooterQuirks.DevirtualiseMmio},
{"DisableSingleUser", OcBooterQuirks.DisableSingleUser},
@ -156,6 +158,7 @@ public:
{"DisableIoMapper", OcKernelQuirks.DisableIoMapper},
{"DisableLinkeditJettison", OcKernelQuirks.DisableLinkeditJettison},
{"DummyPowerManagement", OcKernelQuirks.DummyPowerManagement},
{"ExtendBTFeatureFlags", OcKernelQuirks.ExtendBTFeatureFlags},
{"ExternalDiskIcons", OcKernelQuirks.ExternalDiskIcons},
{"IncreasePciBarSize", OcKernelQuirks.IncreasePciBarSize},
{"PowerTimeoutKernelPanic", OcKernelQuirks.PowerTimeoutKernelPanic},

View File

@ -367,11 +367,13 @@ public:
XmlUInt32 FirmwareFeatures = XmlUInt32(); // gFwFeatures
XmlUInt32 FirmwareFeaturesMask = XmlUInt32();
XmlUInt64 ExtendedFirmwareFeatures = XmlUInt64(); // gFwFeatures
XmlUInt64 ExtendedFirmwareFeaturesMask = XmlUInt64();
public:
MemoryDictClass Memory = MemoryDictClass();
SlotDeviceArrayClass Slots = SlotDeviceArrayClass();
XmlDictField m_fields[29] = {
XmlDictField m_fields[31] = { //31
{"Trust", Trust},
{"MemoryRank", MemoryRank},
{"Memory", Memory},
@ -383,6 +385,8 @@ public:
{"EfiVersion", EfiVersion},
{"FirmwareFeatures", FirmwareFeatures},
{"FirmwareFeaturesMask", FirmwareFeaturesMask},
{"ExtendedFirmwareFeatures", ExtendedFirmwareFeatures},
{"ExtendedFirmwareFeaturesMask", ExtendedFirmwareFeaturesMask},
{"PlatformFeature", PlatformFeature},
{"BiosVendor", BiosVendor},
{"Manufacturer", Manufacturer},
@ -449,6 +453,8 @@ public:
const decltype(EfiVersion)& getEfiVersion() const { return EfiVersion; }
const decltype(FirmwareFeatures)& getFirmwareFeatures() const { return FirmwareFeatures; }
const decltype(FirmwareFeaturesMask)& getFirmwareFeaturesMask() const { return FirmwareFeaturesMask; }
const decltype(ExtendedFirmwareFeatures)& getExtendedFirmwareFeatures() const { return ExtendedFirmwareFeatures; }
const decltype(ExtendedFirmwareFeaturesMask)& getExtendedFirmwareFeaturesMask() const { return ExtendedFirmwareFeaturesMask; }
const decltype(PlatformFeature)& getPlatformFeature() const { return PlatformFeature; }
const decltype(BiosVendor)& getBiosVendor() const { return BiosVendor; }
const decltype(Manufacturer)& getManufacturer() const { return Manufacturer; }
@ -627,6 +633,14 @@ public:
decltype(FirmwareFeaturesMask)::ValueType dgetFirmwareFeaturesMask() const {
if ( FirmwareFeaturesMask.isDefined() ) return FirmwareFeaturesMask.value();
return GetFwFeaturesMaskFromModel(dgetModel());
};
decltype(ExtendedFirmwareFeatures)::ValueType dgetExtendedFirmwareFeatures() const {
if ( ExtendedFirmwareFeatures.isDefined() ) return ExtendedFirmwareFeatures.value();
return GetExtFwFeatures(dgetModel());
};
decltype(ExtendedFirmwareFeaturesMask)::ValueType dgetExtendedFirmwareFeaturesMask() const {
if ( ExtendedFirmwareFeaturesMask.isDefined() ) return ExtendedFirmwareFeaturesMask.value();
return GetExtFwFeaturesMask(dgetModel());
}
};

View File

@ -155,6 +155,8 @@ EFI_STATUS Self::_initialize()
if ( m_SelfSimpleVolume == NULL ) log_technical_bug("Cannot get m_SelfSimpleVolume");
if ( m_SelfVolumeRootDir == NULL ) log_technical_bug("Cannot get m_SelfVolumeRootDir");
if ( m_CloverDirFullPath.isEmpty() ) log_technical_bug("Cannot get m_CloverDirFullPath");
m_CloverDirFullPath4Display = m_CloverDirFullPath;
m_CloverDirFullPath4Display.replaceAll('\\', '/');
if ( m_efiFileName.isEmpty() ) log_technical_bug("Cannot get m_efiFileName");
if ( m_CloverDir == NULL ) panic("Cannot open getSelfRootDir()"); // We have to panic, nothing would work without m_CloverDir

View File

@ -37,6 +37,7 @@ protected:
EFI_DEVICE_PATH* m_CloverDirFullDevicePath {}; // full path, including device, of the folder containing this efi.
EFI_FILE* m_CloverDir {}; // opened folder containing this efi
XStringW m_CloverDirFullPath {}; // full path of folder containing this efi.
XStringW m_CloverDirFullPath4Display {}; // prettier for diplay
bool m_ThemesDirExists {};
EFI_FILE *m_ThemesDir {};
@ -77,6 +78,7 @@ public:
const EFI_DEVICE_PATH& getCloverDirFullDevicePath() { checkInitialized(); return *m_CloverDirFullDevicePath; }
const EFI_FILE& getCloverDir() { checkInitialized(); return *m_CloverDir; }
const XStringW& getCloverDirFullPath() { checkInitialized(); return m_CloverDirFullPath; }
const XStringW& getCloverDirFullPath4Display() { checkInitialized(); return m_CloverDirFullPath4Display; }
bool themesDirExists() { checkInitialized(); return m_ThemesDirExists; }
const EFI_FILE& getThemesDir() { checkInitialized(); return *m_ThemesDir; }

View File

@ -212,7 +212,11 @@ public:
template<typename XStringClass1, enable_if(is___String(XStringClass1))>
void insertAtPos(const XStringClass1 &aString, size_t pos) { array.InsertRef(new remove_const(XStringClass1)(aString), pos, true); }
template<typename CharType, enable_if(is_char(CharType))>
void AddReference(CharType* newElement, bool FreeIt) { array.AddReference(new XStringClass_(newElement), FreeIt); }
void AddReference(XStringClass* newElement, bool FreeIt) { array.AddReference(newElement, FreeIt); }
void insertReferenceAtPos(XStringClass* newElement, size_t pos, bool FreeIt) { array.InsertRef(newElement, pos, FreeIt); }
template<typename IntegralType, enable_if(is_integral(IntegralType))>

View File

@ -22,8 +22,10 @@ extern "C" {
#include <Library/OcDevicePathLib.h>
#include <Library/OcFileLib.h>
#include <Library/OcCpuLib.h> // OC_CPU_INFO
#include <Library/OcMainLib.h> // OcMiscEarlyInit
//#include <Protocol/OcBootstrap.h> // OC_BOOTSTRAP_PROTOCOL
#include <Library/OcBootManagementLib/BootManagementInternal.h>
#include <Library/OcAfterBootCompatLib/BootCompatInternal.h>
#include <Guid/AppleApfsInfo.h>
@ -34,14 +36,6 @@ extern OC_CPU_INFO mOpenCoreCpuInfo;
//extern OC_RSA_PUBLIC_KEY* mOpenCoreVaultKey;
//extern EFI_HANDLE mLoadHandle;
EFI_STATUS
EFIAPI
OcStartImage_2 (
IN OC_BOOT_ENTRY *Chosen,
IN EFI_HANDLE ImageHandle,
OUT UINTN *ExitDataSize,
OUT CHAR16 **ExitData OPTIONAL
);
EFI_STATUS
EFIAPI
@ -109,20 +103,41 @@ OcMain (
} // extern "C"
#endif
#define OC_STRING_ASSIGN_N(ocString, value, len) do { \
if( len >= sizeof(ocString.Value) ) { \
memset(ocString.Value, 0, sizeof(ocString.Value)); \
ocString.DynValue = (__typeof__(ocString.DynValue))malloc(len); \
memcpy(ocString.DynValue, value, len); \
ocString.MaxSize = (UINT32)len; \
ocString.Size = (UINT32)len; /* unsafe cast */ \
}else{ \
ocString.DynValue = NULL; \
memcpy(ocString.Value, value, len); \
ocString.MaxSize = sizeof(ocString.Value); \
ocString.Size = (UINT32)len; /* unsafe cast */ \
} \
} while (0)
// This was a macro.
// But there is a catch : if parameter value depends on ocString.DynValue, DynValue is wiped before value is evaluated.
// Solution could have been an intermediary variable.
inline void OC_DATA_ASSIGN_N(OC_DATA& ocString, const unsigned char* value, size_t len) {
if( len >= sizeof(ocString.Value) ) {
memset(ocString.Value, 0, sizeof(ocString.Value));
ocString.DynValue = (__typeof__(ocString.DynValue))malloc(len);
memcpy(ocString.DynValue, value, len);
ocString.MaxSize = (UINT32)len;
ocString.Size = (UINT32)len; /* unsafe cast */
}else{
ocString.DynValue = NULL;
memcpy(ocString.Value, value, len);
ocString.MaxSize = sizeof(ocString.Value);
ocString.Size = (UINT32)len; /* unsafe cast */
}
}
// This was a macro.
// But there is a catch : if parameter value depends on ocString.DynValue, DynValue is wiped before value is evaluated.
// Solution could have been an intermediary variable.
inline void OC_STRING_ASSIGN_N(OC_STRING& ocString, const char* value, size_t len) {
if( len >= sizeof(ocString.Value) ) {
memset(ocString.Value, 0, sizeof(ocString.Value));
ocString.DynValue = (__typeof__(ocString.DynValue))malloc(len);
memcpy(ocString.DynValue, value, len);
ocString.MaxSize = (UINT32)len;
ocString.Size = (UINT32)len; /* unsafe cast */
}else{
ocString.DynValue = NULL;
memcpy(ocString.Value, value, len);
ocString.MaxSize = sizeof(ocString.Value);
ocString.Size = (UINT32)len; /* unsafe cast */
}
}
#define OC_STRING_ASSIGN(ocString, value) OC_STRING_ASSIGN_N(ocString, value, strlen(value)+1)

View File

@ -134,10 +134,6 @@ extern void HelpRefit(void);
extern void AboutRefit(void);
//extern BOOLEAN BooterPatch(IN UINT8 *BooterData, IN UINT64 BooterSize, LOADER_ENTRY *Entry);
extern UINTN ConfigsNum;
extern CHAR16 *ConfigsList[];
extern UINTN DsdtsNum;
extern CHAR16 *DsdtsList[];
extern EFI_AUDIO_IO_PROTOCOL *AudioIo;
extern EFI_DXE_SERVICES *gDS;
@ -620,7 +616,7 @@ static XStringW getDriversPath()
#endif
}
#ifdef DEBUG
#ifdef JIEF_DEBUG
void debugStartImageWithOC()
{
MsgLog("debugStartImageWithOC\n");
@ -629,13 +625,17 @@ void debugStartImageWithOC()
EFI_LOADED_IMAGE* OcLoadedImage;
EFI_STATUS Status = gBS->HandleProtocol(gImageHandle, &gEfiLoadedImageProtocolGuid, (void **) &OcLoadedImage);
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL* FileSystem = LocateFileSystem(OcLoadedImage->DeviceHandle, OcLoadedImage->FilePath);
Status = OcStorageInitFromFs(&mOpenCoreStorage, FileSystem, self.getCloverDirFullPath().wc_str(), NULL);
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL* FileSystem = OcLocateFileSystem(OcLoadedImage->DeviceHandle, OcLoadedImage->FilePath);
Status = OcStorageInitFromFs(&mOpenCoreStorage, FileSystem, NULL, NULL, self.getCloverDirFullPath().wc_str(), NULL);
Status = ClOcReadConfigurationFile(&mOpenCoreStorage, L"config-oc.plist", &mOpenCoreConfiguration);
if ( EFI_ERROR(Status) ) panic("ClOcReadConfigurationFile");
mOpenCoreConfiguration.Misc.Debug.Target = 0;
OC_STRING_ASSIGN(mOpenCoreConfiguration.Misc.Boot.PickerMode, "Builtin");
OC_STRING_ASSIGN(mOpenCoreConfiguration.Misc.Security.DmgLoading, "Any");
mOpenCoreConfiguration.Uefi.Quirks.IgnoreInvalidFlexRatio = 0;
mOpenCoreConfiguration.Uefi.Quirks.TscSyncTimeout = 0;
OcMain(&mOpenCoreStorage, NULL);
@ -735,14 +735,14 @@ void LOADER_ENTRY::DelegateKernelPatches()
mOpenCoreConfiguration.Kernel.Patch.Values[kextPatchIdx]->Count = (UINT32)kextPatch.Count;
mOpenCoreConfiguration.Kernel.Patch.Values[kextPatchIdx]->Enabled = 1;
OC_STRING_ASSIGN_N(mOpenCoreConfiguration.Kernel.Patch.Values[kextPatchIdx]->Find, kextPatch.Find.data(), kextPatch.Find.size());
OC_DATA_ASSIGN_N(mOpenCoreConfiguration.Kernel.Patch.Values[kextPatchIdx]->Find, kextPatch.Find.data(), kextPatch.Find.size());
OC_STRING_ASSIGN(mOpenCoreConfiguration.Kernel.Patch.Values[kextPatchIdx]->Identifier, kextPatch.getName().c_str());
mOpenCoreConfiguration.Kernel.Patch.Values[kextPatchIdx]->Limit = (UINT32)kextPatch.SearchLen;
OC_STRING_ASSIGN_N(mOpenCoreConfiguration.Kernel.Patch.Values[kextPatchIdx]->Mask, kextPatch.MaskFind.vdata(), kextPatch.MaskFind.size());
OC_DATA_ASSIGN_N(mOpenCoreConfiguration.Kernel.Patch.Values[kextPatchIdx]->Mask, kextPatch.MaskFind.data(), kextPatch.MaskFind.size());
OC_STRING_ASSIGN(mOpenCoreConfiguration.Kernel.Patch.Values[kextPatchIdx]->MaxKernel, ""); // it has been filtered, so we don't need to set Min and MaxKernel
OC_STRING_ASSIGN(mOpenCoreConfiguration.Kernel.Patch.Values[kextPatchIdx]->MinKernel, "");
OC_STRING_ASSIGN_N(mOpenCoreConfiguration.Kernel.Patch.Values[kextPatchIdx]->Replace, kextPatch.Replace.vdata(), kextPatch.Replace.size());
OC_STRING_ASSIGN_N(mOpenCoreConfiguration.Kernel.Patch.Values[kextPatchIdx]->ReplaceMask, kextPatch.MaskReplace.vdata(), kextPatch.MaskReplace.size());
OC_DATA_ASSIGN_N(mOpenCoreConfiguration.Kernel.Patch.Values[kextPatchIdx]->Replace, kextPatch.Replace.data(), kextPatch.Replace.size());
OC_DATA_ASSIGN_N(mOpenCoreConfiguration.Kernel.Patch.Values[kextPatchIdx]->ReplaceMask, kextPatch.MaskReplace.data(), kextPatch.MaskReplace.size());
mOpenCoreConfiguration.Kernel.Patch.Values[kextPatchIdx]->Skip = (UINT32)kextPatch.Skip;
#ifdef JIEF_DEBUG
if ( kextPatch.Label == "algrey - cpuid_set_info - ryzen cores and logicals count - part 3 - 10.14"_XS8 ) {
@ -788,18 +788,8 @@ void LOADER_ENTRY::StartLoader()
}
//Free memory
for (size_t i = 0; i < ConfigsNum; i++) {
if (ConfigsList[i]) {
FreePool(ConfigsList[i]);
ConfigsList[i] = NULL;
}
}
for (size_t i = 0; i < DsdtsNum; i++) {
if (DsdtsList[i]) {
FreePool(DsdtsList[i]);
DsdtsList[i] = NULL;
}
}
ConfigsList.setEmpty();
DsdtsList.setEmpty();
OptionMenu.FreeMenu();
//there is a place to free memory
// GuiAnime
@ -861,8 +851,8 @@ void LOADER_ENTRY::StartLoader()
EFI_LOADED_IMAGE* OcLoadedImage;
Status = gBS->HandleProtocol(gImageHandle, &gEfiLoadedImageProtocolGuid, (VOID **) &OcLoadedImage);
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL* FileSystem = LocateFileSystem(OcLoadedImage->DeviceHandle, OcLoadedImage->FilePath);
Status = OcStorageInitFromFs(&mOpenCoreStorage, FileSystem, self.getCloverDirFullPath().wc_str(), NULL);
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL* FileSystem = OcLocateFileSystem(OcLoadedImage->DeviceHandle, OcLoadedImage->FilePath);
Status = OcStorageInitFromFs(&mOpenCoreStorage, FileSystem, NULL, NULL, self.getCloverDirFullPath().wc_str(), NULL);
/*
* Define READ_FROM_OC to have mOpenCoreConfiguration initialized from config-oc.plist
@ -883,7 +873,7 @@ void LOADER_ENTRY::StartLoader()
!defined(USE_OC_SECTION_Nvram) && !defined(USE_OC_SECTION_PlatformInfo) && !defined(USE_OC_SECTION_Uefi)
memset(&mOpenCoreConfiguration, 0, sizeof(mOpenCoreConfiguration));
DBG("config-oc.plist isn't use at all\n");
DBG("config-oc.plist isn't used at all\n");
#else
Status = ClOcReadConfigurationFile(&mOpenCoreStorage, L"config-oc.plist", &mOpenCoreConfiguration);
@ -916,6 +906,14 @@ void LOADER_ENTRY::StartLoader()
OC_KERNEL_ADD_ENTRY* entry = mOpenCoreConfiguration.Kernel.Add.Values[i];
OC_STRING_ASSIGN(entry->BundlePath, S8Printf("Kexts\\%s", OC_BLOB_GET(&entry->BundlePath)).c_str());
}
// DBG("mOpenCoreConfiguration.Kernel.Add.Count=%d\n", mOpenCoreConfiguration.Kernel.Add.Count);
// for ( size_t i = 0 ; i < mOpenCoreConfiguration.Kernel.Add.Count ; i++ )
// {
// DBG("mOpenCoreConfiguration.Kernel.Add.Values[%zd]->Identifier=%s\n", i, OC_BLOB_GET(&mOpenCoreConfiguration.Kernel.Add.Values[i]->Identifier));
// DBG("mOpenCoreConfiguration.Kernel.Add.Values[%zd]->BundlePath=%s\n", i, OC_BLOB_GET(&mOpenCoreConfiguration.Kernel.Add.Values[i]->BundlePath));
// DBG("mOpenCoreConfiguration.Kernel.Add.Values[%zd]->PlistPath=%s\n", i, OC_BLOB_GET(&mOpenCoreConfiguration.Kernel.Add.Values[i]->PlistPath));
// }
#endif
#ifndef USE_OC_SECTION_Misc
memset(&mOpenCoreConfiguration.Misc, 0, sizeof(mOpenCoreConfiguration.Misc));
@ -1055,7 +1053,8 @@ void LOADER_ENTRY::StartLoader()
mOpenCoreConfiguration.Kernel.Quirks.DisableIoMapper = gSettings.Quirks.OcKernelQuirks.DisableIoMapper;
mOpenCoreConfiguration.Kernel.Quirks.DisableLinkeditJettison = gSettings.Quirks.OcKernelQuirks.DisableLinkeditJettison;
mOpenCoreConfiguration.Kernel.Quirks.DisableRtcChecksum = gSettings.KernelAndKextPatches.KPAppleRTC;
mOpenCoreConfiguration.Kernel.Quirks.DummyPowerManagement = gSettings.Quirks.OcKernelQuirks.DummyPowerManagement;
mOpenCoreConfiguration.Kernel.Emulate.DummyPowerManagement = gSettings.Quirks.OcKernelQuirks.DummyPowerManagement;
mOpenCoreConfiguration.Kernel.Quirks.ExtendBTFeatureFlags = gSettings.Quirks.OcKernelQuirks.ExtendBTFeatureFlags;
mOpenCoreConfiguration.Kernel.Quirks.ExternalDiskIcons = gSettings.Quirks.OcKernelQuirks.ExternalDiskIcons;
mOpenCoreConfiguration.Kernel.Quirks.IncreasePciBarSize = gSettings.Quirks.OcKernelQuirks.IncreasePciBarSize;
mOpenCoreConfiguration.Kernel.Quirks.LapicKernelPanic = gSettings.KernelAndKextPatches.KPKernelLapic;
@ -1152,9 +1151,9 @@ void LOADER_ENTRY::StartLoader()
OC_STRING_ASSIGN(mOpenCoreConfiguration.Kernel.Add.Values[kextIdx]->ExecutablePath, S8Printf("Contents\\MacOS\\%ls", KextEntry.FileName.subString(0, KextEntry.FileName.rindexOf(".")).wc_str()).c_str());
}
XStringW infoPlistPath = SWPrintf("%s\\Contents\\Info.plist", OC_BLOB_GET(&mOpenCoreConfiguration.Kernel.Add.Values[kextIdx]->BundlePath));
if ( FileExists(&self.getCloverDir(), infoPlistPath) ) {
if (FileExists(&self.getCloverDir(), infoPlistPath)) {
OC_STRING_ASSIGN(mOpenCoreConfiguration.Kernel.Add.Values[kextIdx]->PlistPath, "Contents/Info.plist"); // TODO : is always Contents/Info.plist ?
}else{
} else {
DBG("Cannot find kext info.plist at '%ls'\n", infoPlistPath.wc_str());
}
#endif
@ -1178,25 +1177,6 @@ void LOADER_ENTRY::StartLoader()
OC_STRING_ASSIGN(mOpenCoreConfiguration.Uefi.Output.Resolution, XString8(gSettings.GUI.ScreenResolution).c_str());
// if OC is NOT initialized with OcMain, we need the following
// if (OcOSInfoInstallProtocol (false) == NULL) {
// DEBUG ((DEBUG_ERROR, "OC: Failed to install os info protocol\n"));
// }
// if (OcAppleRtcRamInstallProtocol (false) == NULL) {
// DEBUG ((DEBUG_ERROR, "OC: Failed to install rtc ram protocol\n"));
// }
//// Uncomment OcMiscBoot to run the OC bootpicker
// OcMiscBoot (
// &mOpenCoreStorage,
// &mOpenCoreConfiguration,
// NULL,
// OcStartImage_2,
// mOpenCoreConfiguration.Uefi.Quirks.RequestBootVarRouting,
// mLoadHandle
// );
if ( OpenRuntimeEfiName.notEmpty() ) {
XStringW FileName = SWPrintf("%ls\\%ls\\%ls", self.getCloverDirFullPath().wc_str(), getDriversPath().wc_str(), OpenRuntimeEfiName.wc_str());
EFI_HANDLE DriverHandle;
@ -1204,6 +1184,29 @@ void LOADER_ENTRY::StartLoader()
if ( !EFI_ERROR(Status) ) {
Status = gBS->StartImage(DriverHandle, 0, 0);
DBG("Start '%ls' : Status %s\n", OpenRuntimeEfiName.wc_str(), efiStrError(Status));
if ( !EFI_ERROR(Status) )
{
OC_FIRMWARE_RUNTIME_PROTOCOL *FwRuntime;
Status = gBS->LocateProtocol (
&gOcFirmwareRuntimeProtocolGuid,
NULL,
(VOID **) &FwRuntime
);
if (!EFI_ERROR (Status)) {
if (FwRuntime->Revision == OC_FIRMWARE_RUNTIME_REVISION) {
} else {
DEBUG ((
DEBUG_ERROR,
"OCABC: Incompatible OpenRuntime r%u, require r%u\n",
(UINT32) FwRuntime->Revision,
(UINT32) OC_FIRMWARE_RUNTIME_REVISION
));
panic("Incompatible OpenRuntime r%llu, require r%u\n", FwRuntime->Revision, OC_FIRMWARE_RUNTIME_REVISION);
}
}
}
}else{
panic("Error when loading '%ls' : Status %s.\n", OpenRuntimeEfiName.wc_str(), efiStrError(Status));
}
@ -1212,18 +1215,6 @@ void LOADER_ENTRY::StartLoader()
}
OcMain(&mOpenCoreStorage, NULL);
// {
// gCurrentConfig = &gMainConfig;
// RedirectRuntimeServices();
// EFI_HANDLE Handle = NULL;
// Status = gBS->InstallMultipleProtocolInterfaces (
// &Handle,
// &gOcFirmwareRuntimeProtocolGuid,
// &mOcFirmwareRuntimeProtocol,
// NULL
// );
// DBG("Install gOcFirmwareRuntimeProtocolGuid : Status %s\n", efiStrError(Status));
// }
XStringW DevicePathAsString = DevicePathToXStringW(DevicePath);
if ( DevicePathAsString.rindexOf(".dmg") == MAX_XSIZE )
@ -1241,6 +1232,7 @@ void LOADER_ENTRY::StartLoader()
DBG("LoadImage at '%ls' failed. Status = %s\n", DevicePathAsString.wc_str(), efiStrError(Status));
return;
}
DBG("ImageHandle = %llx\n", uintptr_t(ImageHandle));
}else
{
// NOTE : OpenCore ignore the name of the dmg.
@ -1379,7 +1371,7 @@ void LOADER_ENTRY::StartLoader()
if ( macOSVersion >= MacOsVersion("10.11"_XS8) ) {
if (OSFLAG_ISSET(Flags, OSFLAG_NOSIP)) {
gSettings.RtVariables.CsrActiveConfig = (UINT32)0xB7F;
gSettings.RtVariables.CsrActiveConfig = (UINT32)0xB6F;
gSettings.RtVariables.BooterConfig = 0x28;
}
// ReadSIPCfg();
@ -1418,7 +1410,15 @@ void LOADER_ENTRY::StartLoader()
SmbiosFillPatchingValues(GlobalConfig.SetTable132, GlobalConfig.EnabledCores, g_SmbiosDiscoveredSettings.RamSlotCount, gConf.SlotDeviceArray, gSettings, gCPUStructure, &g_SmbiosInjectedSettings);
PatchSmbios(g_SmbiosInjectedSettings);
// DBG("PatchACPI\n");
#ifdef USE_OC_SECTION_Acpi
// If we use the ACPI section form config-oc.plist, let's also delegate the acpi patching to OC
#else
PatchACPI(Volume, macOSVersion);
#endif
#ifdef JIEF_DEBUG
//SaveOemTables();
#endif
//
// // If KPDebug is true boot in verbose mode to see the debug messages
// if (KernelAndKextPatches.KPDebug) {
@ -1629,7 +1629,7 @@ void LOADER_ENTRY::StartLoader()
LoadedImage->LoadOptionsSize = (UINT32)LoadOptionsAsXStringW.sizeInBytesIncludingTerminator();
DBG("Kernel quirks\n");
DBG("ACPCL %d AXCL %d AXEM %d AXFB %d CSG %d DIM %d DLJ %d DRC %d DPM %d EDI %d IPBS %d LKP %d PNKD %d PTKP %d TPD %d XPL %d\n",
DBG("ACPCL %d AXCL %d AXEM %d AXFB %d CSG %d DIM %d DLJ %d DRC %d DPM %d EBTFF %d EDI %d IPBS %d LKP %d PNKD %d PTKP %d TPD %d XPL %d\n",
mOpenCoreConfiguration.Kernel.Quirks.AppleCpuPmCfgLock,
mOpenCoreConfiguration.Kernel.Quirks.AppleXcpmCfgLock,
mOpenCoreConfiguration.Kernel.Quirks.AppleXcpmExtraMsrs,
@ -1638,7 +1638,8 @@ void LOADER_ENTRY::StartLoader()
mOpenCoreConfiguration.Kernel.Quirks.DisableIoMapper,
mOpenCoreConfiguration.Kernel.Quirks.DisableLinkeditJettison,
mOpenCoreConfiguration.Kernel.Quirks.DisableRtcChecksum,
mOpenCoreConfiguration.Kernel.Quirks.DummyPowerManagement,
mOpenCoreConfiguration.Kernel.Emulate.DummyPowerManagement,
mOpenCoreConfiguration.Kernel.Quirks.ExtendBTFeatureFlags,
mOpenCoreConfiguration.Kernel.Quirks.ExternalDiskIcons,
mOpenCoreConfiguration.Kernel.Quirks.IncreasePciBarSize,
mOpenCoreConfiguration.Kernel.Quirks.LapicKernelPanic,
@ -1853,7 +1854,18 @@ static void ScanDriverDir(IN CONST CHAR16 *Path, OUT EFI_HANDLE **DriversToConne
continue;
}
if ( LStringW(DirEntry->FileName).containsIC("OpenRuntime") ) {
OpenRuntimeEfiName.takeValueFrom(DirEntry->FileName);
if ( LStringW(DirEntry->FileName).isEqualIC("OpenRuntime-v12.efi") && LString8(OPEN_CORE_VERSION).isEqual("0.7.3") ) {
OpenRuntimeEfiName.takeValueFrom(DirEntry->FileName);
}else
if ( LStringW(DirEntry->FileName).isEqualIC("OpenRuntime-v11.efi") && LString8(OPEN_CORE_VERSION).isEqual("0.6.5") ) {
OpenRuntimeEfiName.takeValueFrom(DirEntry->FileName);
}else
if ( LStringW(DirEntry->FileName).isEqualIC("OpenRuntime-v11.efi") && LString8(OPEN_CORE_VERSION).isEqual("0.6.1") ) {
OpenRuntimeEfiName.takeValueFrom(DirEntry->FileName);
}else
if ( OpenRuntimeEfiName.isEmpty() ) {
OpenRuntimeEfiName.takeValueFrom(DirEntry->FileName);
}
continue;
}
{
@ -2438,9 +2450,8 @@ GetListOfConfigs()
{
REFIT_DIR_ITER DirIter;
EFI_FILE_INFO *DirEntry;
INTN NameLen;
ConfigsNum = 0;
ConfigsList.setEmpty();
OldChosenConfig = 0;
DirIterOpen(&selfOem.getConfigDir(), NULL, &DirIter);
@ -2450,12 +2461,15 @@ GetListOfConfigs()
continue;
}
if (StriCmp(DirEntry->FileName, L"config.plist") == 0) {
OldChosenConfig = ConfigsNum;
OldChosenConfig = ConfigsList.size(); // DirEntry->FileName is not yet inserted into ConfigsList. So its index will be ConfigsList.size()
}
size_t NameLen = wcslen(DirEntry->FileName) - 6; //without ".plist"
if ( NameLen <= MAX_INTN ) {
ConfigsList.AddReference(SWPrintf("%.*ls", (int)NameLen, DirEntry->FileName).forgetDataWithoutFreeing(), true); // this avoid to reallocate and copy memory
DBG("- %ls\n", DirEntry->FileName);
}else{
DBG("- bug!, NameLen > MAX_INTN");
}
NameLen = StrLen(DirEntry->FileName) - 6; //without ".plist"
ConfigsList[ConfigsNum] = (CHAR16*)AllocateCopyPool(NameLen * sizeof(CHAR16) + 2, DirEntry->FileName);
ConfigsList[ConfigsNum++][NameLen] = L'\0';
DBG("- %ls\n", DirEntry->FileName);
}
DirIterClose(&DirIter);
}
@ -2465,16 +2479,8 @@ GetListOfDsdts()
{
REFIT_DIR_ITER DirIter;
EFI_FILE_INFO *DirEntry;
INTN NameLen;
if (DsdtsNum > 0) {
for (UINTN i = 0; i < DsdtsNum; i++) {
if (DsdtsList[DsdtsNum] != NULL) {
FreePool(DsdtsList[DsdtsNum]);
}
}
}
DsdtsNum = 0;
DsdtsList.setEmpty();
OldChosenDsdt = 0xFFFF;
DirIterOpen(&selfOem.getConfigDir(), L"ACPI\\patched", &DirIter);
@ -2484,11 +2490,10 @@ GetListOfDsdts()
continue;
}
if ( gSettings.ACPI.DSDT.DsdtName.isEqualIC(DirEntry->FileName) ) {
OldChosenDsdt = DsdtsNum;
OldChosenDsdt = DsdtsList.size(); // DirEntry->FileName is not yet inserted into DsdtsList. So its index will be DsdtsList.size()
}
NameLen = StrLen(DirEntry->FileName); //with ".aml"
DsdtsList[DsdtsNum] = (CHAR16*)AllocateCopyPool(NameLen * sizeof(CHAR16) + 2, DirEntry->FileName); // if changing, notice freepool above
DsdtsList[DsdtsNum++][NameLen] = L'\0';
size_t NameLen = wcslen(DirEntry->FileName); //with ".aml"
DsdtsList.AddReference(SWPrintf("%.*ls", (int)NameLen, DirEntry->FileName).forgetDataWithoutFreeing(), true); // this avoid to reallocate and copy memory
DBG("- %ls\n", DirEntry->FileName);
}
DirIterClose(&DirIter);
@ -2877,7 +2882,6 @@ RefitMain (IN EFI_HANDLE ImageHandle,
DBG("SimpleTextEx Status=%s\n", efiStrError(Status));
gConf.InitialisePlatform();
// DBG("5: GlobalConfig.C3Latency=%x\n", GlobalConfig.C3Latency);
#ifdef JIEF_DEBUG
DumpNvram();
@ -2959,8 +2963,6 @@ RefitMain (IN EFI_HANDLE ImageHandle,
GetListOfThemes();
GetListOfConfigs();
}
// DBG("0: GlobalConfig.C3Latency=%x\n", gSettings.ACPI.SSDT._C3Latency);
// DBG("0: gSettings.CPU.SavingMode=%x\n", gSettings.CPU.SavingMode);
// ThemeX.FillByEmbedded(); //init XTheme before EarlyUserSettings
{
void *Value = NULL;
@ -3169,7 +3171,7 @@ RefitMain (IN EFI_HANDLE ImageHandle,
//now it is a time to set RtVariables
SetVariablesFromNvram();
XString8Array TmpArgs = Split<XString8Array>(gSettings.Boot.BootArgs, " ");
XString8Array TmpArgs = Split<XString8Array>(gSettings.Boot.BootArgs, " ");
DBG("after NVRAM boot-args=%s\n", gSettings.Boot.BootArgs.c_str());
GlobalConfig.OptionsBits = EncodeOptions(TmpArgs);
// DBG("initial OptionsBits %X\n", GlobalConfig.OptionsBits);
@ -3520,7 +3522,7 @@ panic("not done yet");
(UINT16*)&BootNum
);
if (!EFI_ERROR(Status)) {
DBG("Entry %lld assigned option %04llX\n", EntryIndex, BootNum);
DBG("Entry %lld assigned option %04llX\n", EntryIndex, BootNum);
Entry->BootNum = BootNum;
}
FreePool(OptionalData);

View File

@ -451,6 +451,11 @@ void FillInputs(BOOLEAN New)
InputItems[InputItemsCount].ItemType = BoolValue; //124
InputItems[InputItemsCount++].BValue = gSettings.ACPI.FixHeaders;
InputItems[InputItemsCount].ItemType = Hex; //125
InputItems[InputItemsCount++].SValue.SWPrintf("0x%016llX", gSettings.Smbios.ExtendedFirmwareFeatures);
InputItems[InputItemsCount].ItemType = Hex; //126
InputItems[InputItemsCount++].SValue.SWPrintf("0x%016llX", gSettings.Smbios.ExtendedFirmwareFeaturesMask);
//menu for drop table
@ -1006,7 +1011,7 @@ void ApplyInputs(void)
if (OldChosenDsdt == 0xFFFF) {
gSettings.ACPI.DSDT.DsdtName = L"BIOS.aml"_XSW;
} else {
gSettings.ACPI.DSDT.DsdtName.SWPrintf("%ls", DsdtsList[OldChosenDsdt]);
gSettings.ACPI.DSDT.DsdtName = DsdtsList[OldChosenDsdt];
}
}
i++; //117
@ -1074,7 +1079,16 @@ void ApplyInputs(void)
gSettings.ACPI.FixHeaders = InputItems[i].BValue;
DBG("applied gSettings.ACPI.FixHeaders=%s\n", gSettings.ACPI.FixHeaders ? "Y" : "N" );
}
i++; //125
if (InputItems[i].Valid) {
gSettings.Smbios.ExtendedFirmwareFeatures = StrHexToUint64(InputItems[i].SValue.wc_str());
DBG("applied ExtendedFirmwareFeatures=0x%llX\n", gSettings.Smbios.ExtendedFirmwareFeatures);
}
i++; //126
if (InputItems[i].Valid) {
gSettings.Smbios.ExtendedFirmwareFeaturesMask = StrHexToUint64(InputItems[i].SValue.wc_str());
DBG("applied ExtendedFirmwareFeaturesMask=0x%llX\n", gSettings.Smbios.ExtendedFirmwareFeaturesMask);
}
if (NeedSave) {
ApplySettings();
@ -1157,13 +1171,13 @@ void HelpRefit(void)
HelpMenu.AddMenuInfo_f("F1 - Помощь по горячим клавишам");
HelpMenu.AddMenuInfo_f("F2 - Сохранить отчет в preboot.log (только если FAT32)");
HelpMenu.AddMenuInfo_f("F3 - Показать скрытые значки в меню");
HelpMenu.AddMenuInfo_f("F4 - Родной DSDT сохранить в EFI/CLOVER/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F5 - Патченный DSDT сохранить в EFI/CLOVER/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F6 - Сохранить ВидеоБиос в EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F4 - Родной DSDT сохранить в %ls/ACPI/origin/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F5 - Патченный DSDT сохранить в %ls/ACPI/origin/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F6 - Сохранить ВидеоБиос в %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F7 - Проверить звук на выбранном выходе");
HelpMenu.AddMenuInfo_f("F8 - Сделать дамп звуковых устройств в EFI/CLOVER/misc/");
HelpMenu.AddMenuInfo_f("F8 - Сделать дамп звуковых устройств в %ls/misc/", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F9 - Изменить разрешение экрана на одно из возможных");
HelpMenu.AddMenuInfo_f("F10 - Снимок экрана в папку EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F10 - Снимок экрана в папку %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F11 - Reset NVRAM");
HelpMenu.AddMenuInfo_f("F12 - Извлечь указанный DVD");
HelpMenu.AddMenuInfo_f("Пробел - Дополнительное меню запуска выбранного тома");
@ -1179,13 +1193,13 @@ void HelpRefit(void)
HelpMenu.AddMenuInfo_f("F1 - Ця довідка");
HelpMenu.AddMenuInfo_f("F2 - Зберегти preboot.log (тiльки FAT32)");
HelpMenu.AddMenuInfo_f("F3 - Відображати приховані розділи");
HelpMenu.AddMenuInfo_f("F4 - Зберегти OEM DSDT в EFI/CLOVER/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F5 - Зберегти патчений DSDT в EFI/CLOVER/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F4 - Зберегти OEM DSDT в %ls/ACPI/origin/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F5 - Зберегти патчений DSDT в %ls/ACPI/origin/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F7 - Check sound on selected output");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into EFI/CLOVER/misc/");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into %ls/misc/", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F9 - Switch screen resoluton to next possible mode");
HelpMenu.AddMenuInfo_f("F6 - Зберегти VideoBios в EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F10 - Зберегти знімок екрану в EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F6 - Зберегти VideoBios в %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F10 - Зберегти знімок екрану в %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F11 - Reset NVRAM");
HelpMenu.AddMenuInfo_f("F12 - Відкрити обраний диск (DVD)");
HelpMenu.AddMenuInfo_f("Пробіл - докладніше про обраний пункт меню");
@ -1201,13 +1215,13 @@ void HelpRefit(void)
HelpMenu.AddMenuInfo_f("F1 - Esta Ayuda");
HelpMenu.AddMenuInfo_f("F2 - Guardar preboot.log (Solo FAT32)");
HelpMenu.AddMenuInfo_f("F3 - Show hidden entries");
HelpMenu.AddMenuInfo_f("F4 - Guardar DSDT oem en EFI/CLOVER/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F5 - Guardar DSDT parcheado en EFI/CLOVER/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F6 - Guardar VideoBios en EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F4 - Guardar DSDT oem en %ls/ACPI/origin/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F5 - Guardar DSDT parcheado en %ls/ACPI/origin/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F6 - Guardar VideoBios en %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F7 - Check sound on selected output");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into EFI/CLOVER/misc/");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into %ls/misc/", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F9 - Switch screen resoluton to next possible mode");
HelpMenu.AddMenuInfo_f("F10 - Guardar Captura de pantalla en EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F10 - Guardar Captura de pantalla en %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F11 - Reset NVRAM");
HelpMenu.AddMenuInfo_f("F12 - Expulsar volumen seleccionado (DVD)");
HelpMenu.AddMenuInfo_f("Espacio - Detalles acerca selected menu entry");
@ -1224,13 +1238,13 @@ void HelpRefit(void)
HelpMenu.AddMenuInfo_f("F1 - Esta ajuda");
HelpMenu.AddMenuInfo_f("F2 - Salva preboot.log (somente FAT32)");
HelpMenu.AddMenuInfo_f("F3 - Show hidden entries");
HelpMenu.AddMenuInfo_f("F4 - Salva oem DSDT em EFI/CLOVER/ACPI/origin/ (somente FAT32)");
HelpMenu.AddMenuInfo_f("F5 - Salva DSDT corrigido em EFI/CLOVER/ACPI/origin/ (somente FAT32)");
HelpMenu.AddMenuInfo_f("F6 - Salva VideoBios em EFI/CLOVER/misc/ (somente FAT32)");
HelpMenu.AddMenuInfo_f("F4 - Salva oem DSDT em %ls/ACPI/origin/ (somente FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F5 - Salva DSDT corrigido em %ls/ACPI/origin/ (somente FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F6 - Salva VideoBios em %ls/misc/ (somente FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F7 - Check sound on selected output");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into EFI/CLOVER/misc/");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into %ls/misc/", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F9 - Switch screen resoluton to next possible mode");
HelpMenu.AddMenuInfo_f("F10 - Salva screenshot em EFI/CLOVER/misc/ (somente FAT32)");
HelpMenu.AddMenuInfo_f("F10 - Salva screenshot em %ls/misc/ (somente FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F11 - Reset NVRAM");
HelpMenu.AddMenuInfo_f("F12 - Ejeta o volume selecionado (DVD)");
HelpMenu.AddMenuInfo_f("Espaco - Detalhes sobre a opcao do menu selecionada");
@ -1246,13 +1260,13 @@ void HelpRefit(void)
HelpMenu.AddMenuInfo_f("F1 - Aiuto");
HelpMenu.AddMenuInfo_f("F2 - Salva il preboot.log (solo su FAT32)");
HelpMenu.AddMenuInfo_f("F3 - Mostra volumi nascosti");
HelpMenu.AddMenuInfo_f("F4 - Salva il DSDT oem in EFI/CLOVER/ACPI/origin/ (solo suFAT32)");
HelpMenu.AddMenuInfo_f("F5 - Salva il patched DSDT in EFI/CLOVER/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F6 - Salva il VideoBios in EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F4 - Salva il DSDT oem in %ls/ACPI/origin/ (solo suFAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F5 - Salva il patched DSDT in %ls/ACPI/origin/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F6 - Salva il VideoBios in %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F7 - Controlla il suono sull'uscita selezionata");
HelpMenu.AddMenuInfo_f("F8 - Scarica le uscite audio in EFI/CLOVER/misc/");
HelpMenu.AddMenuInfo_f("F8 - Scarica le uscite audio in %ls/misc/", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F9 - Cambia la risoluzione dello schermo alla prossima disponibile");
HelpMenu.AddMenuInfo_f("F10 - Salva screenshot in EFI/CLOVER/misc/ (solo su FAT32)");
HelpMenu.AddMenuInfo_f("F10 - Salva screenshot in %ls/misc/ (solo su FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F11 - Resetta NVRAM");
HelpMenu.AddMenuInfo_f("F12 - Espelli il volume selezionato (DVD)");
HelpMenu.AddMenuInfo_f("Spazio - Dettagli sul menu selezionato");
@ -1268,13 +1282,13 @@ void HelpRefit(void)
HelpMenu.AddMenuInfo_f("F1 - Diese Hilfe");
HelpMenu.AddMenuInfo_f("F2 - Sichere preboot.log (nur mit FAT32)");
HelpMenu.AddMenuInfo_f("F3 - Show hidden entries");
HelpMenu.AddMenuInfo_f("F4 - Sichere OEM DSDT in EFI/CLOVER/ACPI/origin/ (nur mit FAT32)");
HelpMenu.AddMenuInfo_f("F5 - Sichere gepatchtes DSDT in EFI/CLOVER/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F6 - Sichere VideoBios in EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F4 - Sichere OEM DSDT in %ls/ACPI/origin/ (nur mit FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F5 - Sichere gepatchtes DSDT in %ls/ACPI/origin/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F6 - Sichere VideoBios in %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F7 - Check sound on selected output");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into EFI/CLOVER/misc/");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into %ls/misc/", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F9 - Switch screen resoluton to next possible mode");
HelpMenu.AddMenuInfo_f("F10 - Sichere Bildschirmfoto in EFI/CLOVER/misc/ (nur mit FAT32)");
HelpMenu.AddMenuInfo_f("F10 - Sichere Bildschirmfoto in %ls/misc/ (nur mit FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F11 - Reset NVRAM");
HelpMenu.AddMenuInfo_f("F12 - Volume auswerfen (DVD)");
HelpMenu.AddMenuInfo_f("Leertaste - Details über den gewählten Menue Eintrag");
@ -1290,13 +1304,13 @@ void HelpRefit(void)
HelpMenu.AddMenuInfo_f("F1 - Onderdeel hulp");
HelpMenu.AddMenuInfo_f("F2 - preboot.log opslaan (Alleen FAT32)");
HelpMenu.AddMenuInfo_f("F3 - Verborgen opties weergeven");
HelpMenu.AddMenuInfo_f("F4 - Opslaan oem DSDT in EFI/CLOVER/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F5 - Opslaan gepatchte DSDT in EFI/CLOVER/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F6 - Opslaan VideoBios in EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F4 - Opslaan oem DSDT in %ls/ACPI/origin/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F5 - Opslaan gepatchte DSDT in %ls/ACPI/origin/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F6 - Opslaan VideoBios in %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F7 - Controleer geluid op geselecteerde uitgang");
HelpMenu.AddMenuInfo_f("F8 - Opslaan audio uitgangen in EFI/CLOVER/misc/");
HelpMenu.AddMenuInfo_f("F8 - Opslaan audio uitgangen in %ls/misc/", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F9 - Wijzig schermresolutie naar eerstvolgende mogelijke modus");
HelpMenu.AddMenuInfo_f("F10 - Opslaan schermafdruk in EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F10 - Opslaan schermafdruk in %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F11 - Reset NVRAM");
HelpMenu.AddMenuInfo_f("F12 - Uitwerpen geselecteerd volume (DVD)");
HelpMenu.AddMenuInfo_f("Spatie - Details over geselecteerd menuoptie");
@ -1312,13 +1326,13 @@ void HelpRefit(void)
HelpMenu.AddMenuInfo_f("F1 - Aide");
HelpMenu.AddMenuInfo_f("F2 - Enregistrer preboot.log (FAT32 only)");
HelpMenu.AddMenuInfo_f("F3 - Show hidden entries");
HelpMenu.AddMenuInfo_f("F4 - Enregistrer oem DSDT dans EFI/CLOVER/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F5 - Enregistrer DSDT modifié dans EFI/CLOVER/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F6 - Enregistrer VideoBios dans EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F4 - Enregistrer oem DSDT dans %ls/ACPI/origin/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F5 - Enregistrer DSDT modifié dans %ls/ACPI/origin/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F6 - Enregistrer VideoBios dans %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F7 - Check sound on selected output");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into EFI/CLOVER/misc/");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into %ls/misc/", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F9 - Switch screen resoluton to next possible mode");
HelpMenu.AddMenuInfo_f("F10 - Enregistrer la capture d'écran dans EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F10 - Enregistrer la capture d'écran dans %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F11 - Reset NVRAM");
HelpMenu.AddMenuInfo_f("F12 - Ejecter le volume (DVD)");
HelpMenu.AddMenuInfo_f("Space - Détails a propos du menu selectionné");
@ -1332,15 +1346,15 @@ void HelpRefit(void)
case indonesian:
HelpMenu.AddMenuInfo_f("ESC - Keluar submenu, Refresh main menu");
HelpMenu.AddMenuInfo_f("F1 - Help");
HelpMenu.AddMenuInfo_f("F2 - Simpan preboot.log ke EFI/CLOVER/ACPI/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F2 - Simpan preboot.log ke %ls/ACPI/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F3 - Show hidden entries");
HelpMenu.AddMenuInfo_f("F4 - Simpan oem DSDT ke EFI/CLOVER/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F5 - Simpan patched DSDT ke EFI/CLOVER/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F6 - Simpan VideoBios ke EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F4 - Simpan oem DSDT ke %ls/ACPI/origin/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F5 - Simpan patched DSDT ke %ls/ACPI/origin/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F6 - Simpan VideoBios ke %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F7 - Check sound on selected output");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into EFI/CLOVER/misc/");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into %ls/misc/", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F9 - Switch screen resoluton to next possible mode");
HelpMenu.AddMenuInfo_f("F10 - Simpan screenshot ke EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F10 - Simpan screenshot ke %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F11 - Reset NVRAM");
HelpMenu.AddMenuInfo_f("F12 - Eject volume (DVD)");
HelpMenu.AddMenuInfo_f("Spasi - Detail dari menu yang dipilih");
@ -1356,13 +1370,13 @@ void HelpRefit(void)
HelpMenu.AddMenuInfo_f("F1 - Pomoc");
HelpMenu.AddMenuInfo_f("F2 - Zapis preboot.log (tylko FAT32)");
HelpMenu.AddMenuInfo_f("F3 - Show hidden entries");
HelpMenu.AddMenuInfo_f("F4 - Zapis DSDT do EFI/CLOVER/ACPI/origin/ (tylko FAT32)");
HelpMenu.AddMenuInfo_f("F5 - Zapis poprawionego DSDT do EFI/CLOVER/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F6 - Zapis BIOSu k. graficznej do EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F4 - Zapis DSDT do %ls/ACPI/origin/ (tylko FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F5 - Zapis poprawionego DSDT do %ls/ACPI/origin/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F6 - Zapis BIOSu k. graficznej do %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F7 - Check sound on selected output");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into EFI/CLOVER/misc/");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into %ls/misc/", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F9 - Switch screen resoluton to next possible mode");
HelpMenu.AddMenuInfo_f("F10 - Zapis zrzutu ekranu do EFI/CLOVER/misc/ (tylko FAT32)");
HelpMenu.AddMenuInfo_f("F10 - Zapis zrzutu ekranu do %ls/misc/ (tylko FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F11 - Reset NVRAM");
HelpMenu.AddMenuInfo_f("F12 - Wysuniecie zaznaczonego dysku (tylko dla DVD)");
HelpMenu.AddMenuInfo_f("Spacja - Informacje nt. dostepnych opcji dla zaznaczonego dysku");
@ -1378,13 +1392,13 @@ void HelpRefit(void)
HelpMenu.AddMenuInfo_f("F1 - Ovaj izbornik");
HelpMenu.AddMenuInfo_f("F2 - Spremi preboot.log (samo na FAT32)");
HelpMenu.AddMenuInfo_f("F3 - Show hidden entries");
HelpMenu.AddMenuInfo_f("F4 - Spremi oem DSDT u EFI/CLOVER/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F5 - Spremi patched DSDT into EFI/CLOVER/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F6 - Spremi VideoBios into EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F4 - Spremi oem DSDT u %ls/ACPI/origin/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F5 - Spremi patched DSDT into %ls/ACPI/origin/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F6 - Spremi VideoBios into %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F7 - Check sound on selected output");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into EFI/CLOVER/misc/");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into %ls/misc/", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F9 - Switch screen resoluton to next possible mode");
HelpMenu.AddMenuInfo_f("F10 - Spremi screenshot into EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F10 - Spremi screenshot into %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F11 - Reset NVRAM");
HelpMenu.AddMenuInfo_f("F12 - Izbaci izabrai (DVD)");
HelpMenu.AddMenuInfo_f("Space - Detalji o odabranom sistemu");
@ -1400,13 +1414,13 @@ void HelpRefit(void)
HelpMenu.AddMenuInfo_f("F1 - Tato Nápověda");
HelpMenu.AddMenuInfo_f("F2 - Uložit preboot.log (FAT32 only)");
HelpMenu.AddMenuInfo_f("F3 - Show hidden entries");
HelpMenu.AddMenuInfo_f("F4 - Uložit oem DSDT do EFI/CLOVER/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F5 - Uložit patchnuté DSDT do EFI/CLOVER/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F6 - Uložit VideoBios do EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F4 - Uložit oem DSDT do %ls/ACPI/origin/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F5 - Uložit patchnuté DSDT do %ls/ACPI/origin/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F6 - Uložit VideoBios do %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F7 - Check sound on selected output");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into EFI/CLOVER/misc/");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into %ls/misc/", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F9 - Switch screen resoluton to next possible mode");
HelpMenu.AddMenuInfo_f("F10 - Uložit snímek obrazovky do EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F10 - Uložit snímek obrazovky do %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F11 - Reset NVRAM");
HelpMenu.AddMenuInfo_f("F12 - Vysunout vybranou mechaniku (DVD)");
HelpMenu.AddMenuInfo_f("Mezerník - Podrobnosti o vybraném disku");
@ -1422,13 +1436,13 @@ void HelpRefit(void)
HelpMenu.AddMenuInfo_f("F1 - 이 도움말");
HelpMenu.AddMenuInfo_f("F2 - preboot.log를 저장합니다. (FAT32방식에만 해당됨)");
HelpMenu.AddMenuInfo_f("F3 - Show hidden entries");
HelpMenu.AddMenuInfo_f("F4 - oem DSDT를 EFI/CLOVER/ACPI/origin/에 저장합니다. (FAT32)");
HelpMenu.AddMenuInfo_f("F5 - 패치된 DSDT를 EFI/CLOVER/ACPI/origin/에 저장합니다. (FAT32)");
HelpMenu.AddMenuInfo_f("F6 - VideoBios를 EFI/CLOVER/misc/에 저장합니다. (FAT32)");
HelpMenu.AddMenuInfo_f("F4 - oem DSDT를 %ls/ACPI/origin/에 저장합니다. (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F5 - 패치된 DSDT를 %ls/ACPI/origin/에 저장합니다. (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F6 - VideoBios를 %ls/misc/에 저장합니다. (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F7 - 선택한 출력에서 사운드 확인");
HelpMenu.AddMenuInfo_f("F8 - 오디오 코덱덤프를 EFI/CLOVER/misc/에 저장합니다.");
HelpMenu.AddMenuInfo_f("F8 - 오디오 코덱덤프를 %ls/misc/에 저장합니다.", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F9 - Switch screen resoluton to next possible mode");
HelpMenu.AddMenuInfo_f("F10 - 스크린샷을 EFI/CLOVER/misc/에 저장합니다. (FAT32)");
HelpMenu.AddMenuInfo_f("F10 - 스크린샷을 %ls/misc/에 저장합니다. (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F11 - NVRAM 초기화");
HelpMenu.AddMenuInfo_f("F12 - 선택한 볼륨을 제거합니다. (DVD)");
HelpMenu.AddMenuInfo_f("Space - 선택한 메뉴의 상세 설명");
@ -1447,7 +1461,7 @@ void HelpRefit(void)
HelpMenu.AddMenuInfo_f("F5 - Salvare DSDT modificat in EFI/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F6 - Salvare VideoBios in EFI/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F7 - Check sound on selected output");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into EFI/CLOVER/misc/");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into %ls/misc/", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F9 - Switch screen resoluton to next possible mode");
HelpMenu.AddMenuInfo_f("F10 - Salvare screenshot in EFI/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F11 - Reset NVRAM");
@ -1463,13 +1477,13 @@ void HelpRefit(void)
case chinese:
HelpMenu.AddMenuInfo_f("ESC - 离开子菜单, 刷新主菜单");
HelpMenu.AddMenuInfo_f("F1 - 帮助");
HelpMenu.AddMenuInfo_f("F2 - 保存 preboot.log 到 EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F2 - 保存 preboot.log 到 %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F3 - 显示隐藏的启动项");
HelpMenu.AddMenuInfo_f("F4 - 保存原始的 DSDT 到 EFI/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F5 - 保存修正后的 DSDT 到 EFI/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F6 - 保存 VideoBios 到 EFI/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F7 - 检查选中输出设备的声音");
HelpMenu.AddMenuInfo_f("F8 - 生成声卡输出转储到 EFI/CLOVER/misc/");
HelpMenu.AddMenuInfo_f("F8 - 生成声卡输出转储到 %ls/misc/", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F9 - 调整屏幕分辨率为下一个可用的模式");
HelpMenu.AddMenuInfo_f("F10 - 保存截图到 EFI/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F11 - 重置 NVRAM");
@ -1486,15 +1500,15 @@ void HelpRefit(void)
default:
HelpMenu.AddMenuInfo_f("ESC - Escape from submenu, Refresh main menu");
HelpMenu.AddMenuInfo_f("F1 - This help");
HelpMenu.AddMenuInfo_f("F2 - Save preboot.log into EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F2 - Save preboot.log into %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F3 - Show hidden entries");
HelpMenu.AddMenuInfo_f("F4 - Save oem DSDT into EFI/CLOVER/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F5 - Save patched DSDT into EFI/CLOVER/ACPI/origin/ (FAT32)");
HelpMenu.AddMenuInfo_f("F6 - Save VideoBios into EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F4 - Save oem DSDT into %ls/ACPI/origin/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F5 - Save patched DSDT into %ls/ACPI/origin/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F6 - Save VideoBios into %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F7 - Check sound on selected output");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into EFI/CLOVER/misc/");
HelpMenu.AddMenuInfo_f("F8 - Make audio outputs dump into %ls/misc/", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F9 - Switch screen resoluton to next possible mode");
HelpMenu.AddMenuInfo_f("F10 - Save screenshot into EFI/CLOVER/misc/ (FAT32)");
HelpMenu.AddMenuInfo_f("F10 - Save screenshot into %ls/misc/ (FAT32)", self.getCloverDirFullPath4Display().wc_str());
HelpMenu.AddMenuInfo_f("F11 - Reset NVRAM");
HelpMenu.AddMenuInfo_f("F12 - Eject selected volume (DVD)");
HelpMenu.AddMenuInfo_f("Space - Details about selected menu entry");
@ -2025,6 +2039,8 @@ REFIT_ABSTRACT_MENU_ENTRY* SubMenuSmbios()
SubScreen->AddMenuItemInput(87, "ROM Release Date:", TRUE);
SubScreen->AddMenuItemInput(62, "FirmwareFeatures:", TRUE);
SubScreen->AddMenuItemInput(63, "FirmwareFeaturesMask:", TRUE);
SubScreen->AddMenuItemInput(125, "ExtendedFirmwareFeatures:", TRUE);
SubScreen->AddMenuItemInput(126, "ExtendedFirmwareFeaturesMask:", TRUE);
SubScreen->AddMenuItemInput(17, "PlatformFeature:", TRUE);
SubScreen->AddMenuItemInput(117, "EFI Version:", TRUE);
@ -2118,7 +2134,7 @@ REFIT_ABSTRACT_MENU_ENTRY* SubMenuDsdts()
SubScreen->AddMenuInfoLine_f("Select a DSDT file:");
SubScreen->AddMenuItemSwitch(116, "BIOS.aml", FALSE);
for (i = 0; i < DsdtsNum; i++) {
for (i = 0; i < DsdtsList.size(); i++) {
InputBootArgs = new REFIT_MENU_SWITCH;
InputBootArgs->Title.takeValueFrom(DsdtsList[i]);
// InputBootArgs->Tag = TAG_SWITCH_OLD;
@ -2527,9 +2543,9 @@ REFIT_ABSTRACT_MENU_ENTRY* SubMenuConfigs()
SubScreen->AddMenuInfoLine_f("Select a config file:");
for (i = 0; i < ConfigsNum; i++) {
for (i = 0; i < ConfigsList.size(); i++) {
InputBootArgs = new REFIT_MENU_SWITCH;
InputBootArgs->Title.takeValueFrom(ConfigsList[i]);
InputBootArgs->Title = ConfigsList[i];
// InputBootArgs->Tag = TAG_SWITCH_OLD;
InputBootArgs->Row = i;
InputBootArgs->Item = &InputItems[90];