resolve conflicts

Signed-off-by: SergeySlice <isakov-sl@bk.ru>
This commit is contained in:
SergeySlice 2019-12-31 20:46:52 +03:00
commit e168d7c74f
5 changed files with 55 additions and 56 deletions

View File

@ -46,49 +46,49 @@ EFI_BOOT_SERVICES mBootServices = {
0, // CRC32
0 // Reserved
},
(EFI_RAISE_TPL) CoreRaiseTpl, // RaiseTPL
(EFI_RESTORE_TPL) CoreRestoreTpl, // RestoreTPL
(EFI_ALLOCATE_PAGES) CoreAllocatePages, // AllocatePages
(EFI_FREE_PAGES) CoreFreePages, // FreePages
(EFI_RAISE_TPL) CoreRaiseTpl, // RaiseTPL 18
(EFI_RESTORE_TPL) CoreRestoreTpl, // RestoreTPL 20
(EFI_ALLOCATE_PAGES) CoreAllocatePages, // AllocatePages 28
(EFI_FREE_PAGES) CoreFreePages, // FreePages 30
(EFI_GET_MEMORY_MAP) CoreGetMemoryMap, // GetMemoryMap
(EFI_ALLOCATE_POOL) CoreAllocatePool, // AllocatePool
(EFI_FREE_POOL) CoreFreePool, // FreePool
(EFI_CREATE_EVENT) CoreCreateEvent, // CreateEvent
(EFI_SET_TIMER) CoreSetTimer, // SetTimer
(EFI_WAIT_FOR_EVENT) CoreWaitForEvent, // WaitForEvent
(EFI_ALLOCATE_POOL) CoreAllocatePool, // AllocatePool 40
(EFI_FREE_POOL) CoreFreePool, // FreePool 48
(EFI_CREATE_EVENT) CoreCreateEvent, // CreateEvent 50
(EFI_SET_TIMER) CoreSetTimer, // SetTimer 58
(EFI_WAIT_FOR_EVENT) CoreWaitForEvent, // WaitForEvent 60
(EFI_SIGNAL_EVENT) CoreSignalEvent, // SignalEvent
(EFI_CLOSE_EVENT) CoreCloseEvent, // CloseEvent
(EFI_CLOSE_EVENT) CoreCloseEvent, // CloseEvent 70
(EFI_CHECK_EVENT) CoreCheckEvent, // CheckEvent
(EFI_INSTALL_PROTOCOL_INTERFACE) CoreInstallProtocolInterface, // InstallProtocolInterface
(EFI_INSTALL_PROTOCOL_INTERFACE) CoreInstallProtocolInterface, // InstallProtocolInterface 80
(EFI_REINSTALL_PROTOCOL_INTERFACE) CoreReinstallProtocolInterface, // ReinstallProtocolInterface
(EFI_UNINSTALL_PROTOCOL_INTERFACE) CoreUninstallProtocolInterface, // UninstallProtocolInterface
(EFI_HANDLE_PROTOCOL) CoreHandleProtocol, // HandleProtocol
(EFI_UNINSTALL_PROTOCOL_INTERFACE) CoreUninstallProtocolInterface, // UninstallProtocolInterface 90
(EFI_HANDLE_PROTOCOL) CoreHandleProtocol, // HandleProtocol 98
(VOID *) NULL, // Reserved
(EFI_REGISTER_PROTOCOL_NOTIFY) CoreRegisterProtocolNotify, // RegisterProtocolNotify
(EFI_LOCATE_HANDLE) CoreLocateHandle, // LocateHandle
(EFI_LOCATE_HANDLE) CoreLocateHandle, // LocateHandle B0
(EFI_LOCATE_DEVICE_PATH) CoreLocateDevicePath, // LocateDevicePath
(EFI_INSTALL_CONFIGURATION_TABLE) CoreInstallConfigurationTable, // InstallConfigurationTable
(EFI_INSTALL_CONFIGURATION_TABLE) CoreInstallConfigurationTable, // InstallConfigurationTable C0
(EFI_IMAGE_LOAD) CoreLoadImage, // LoadImage
(EFI_IMAGE_START) CoreStartImage, // StartImage
(EFI_IMAGE_START) CoreStartImage, // StartImage D0
(EFI_EXIT) CoreExit, // Exit
(EFI_IMAGE_UNLOAD) CoreUnloadImage, // UnloadImage
(EFI_IMAGE_UNLOAD) CoreUnloadImage, // UnloadImage E0
(EFI_EXIT_BOOT_SERVICES) CoreExitBootServices, // ExitBootServices
(EFI_GET_NEXT_MONOTONIC_COUNT) CoreEfiNotAvailableYetArg1, // GetNextMonotonicCount
(EFI_GET_NEXT_MONOTONIC_COUNT) CoreEfiNotAvailableYetArg1, // GetNextMonotonicCount F0
(EFI_STALL) CoreStall, // Stall
(EFI_SET_WATCHDOG_TIMER) CoreSetWatchdogTimer, // SetWatchdogTimer
(EFI_SET_WATCHDOG_TIMER) CoreSetWatchdogTimer, // SetWatchdogTimer 100
(EFI_CONNECT_CONTROLLER) CoreConnectController, // ConnectController
(EFI_DISCONNECT_CONTROLLER) CoreDisconnectController, // DisconnectController
(EFI_DISCONNECT_CONTROLLER) CoreDisconnectController, // DisconnectController 110
(EFI_OPEN_PROTOCOL) CoreOpenProtocol, // OpenProtocol
(EFI_CLOSE_PROTOCOL) CoreCloseProtocol, // CloseProtocol
(EFI_CLOSE_PROTOCOL) CoreCloseProtocol, // CloseProtocol 120
(EFI_OPEN_PROTOCOL_INFORMATION) CoreOpenProtocolInformation, // OpenProtocolInformation
(EFI_PROTOCOLS_PER_HANDLE) CoreProtocolsPerHandle, // ProtocolsPerHandle
(EFI_PROTOCOLS_PER_HANDLE) CoreProtocolsPerHandle, // ProtocolsPerHandle 130
(EFI_LOCATE_HANDLE_BUFFER) CoreLocateHandleBuffer, // LocateHandleBuffer
(EFI_LOCATE_PROTOCOL) CoreLocateProtocol, // LocateProtocol
(EFI_LOCATE_PROTOCOL) CoreLocateProtocol, // LocateProtocol 140
(EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES) CoreInstallMultipleProtocolInterfaces, // InstallMultipleProtocolInterfaces
(EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES) CoreUninstallMultipleProtocolInterfaces, // UninstallMultipleProtocolInterfaces
(EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES) CoreUninstallMultipleProtocolInterfaces, // UninstallMultipleProtocolInterfaces 150
(EFI_CALCULATE_CRC32) CoreEfiNotAvailableYetArg3, // CalculateCrc32
(EFI_COPY_MEM) CopyMem, // CopyMem
(EFI_SET_MEM) SetMem, // SetMem
(EFI_COPY_MEM) CopyMem, // CopyMem 160
(EFI_SET_MEM) SetMem, // SetMem 168
(EFI_CREATE_EVENT_EX) CoreCreateEventEx // CreateEventEx
};

View File

@ -137,10 +137,10 @@ EFI_STATUS
struct _APPLE_GETVAR_PROTOCOL {
UINT64 Sign;
APPLE_GETVAR_PROTOCOL_GET_PROPERTY_VALUE GetPropertyValue;
APPLE_GETVAR_PROTOCOL_SET_PROPERTY SetProperty;
APPLE_GETVAR_PROTOCOL_REMOVE_PROPERTY RemoveProperty;
APPLE_GETVAR_PROTOCOL_GET_DEVICE_PROPS GetPropertyBuffer;
APPLE_GETVAR_PROTOCOL_GET_PROPERTY_VALUE GetPropertyValue; //8
APPLE_GETVAR_PROTOCOL_SET_PROPERTY SetProperty; //0x10
APPLE_GETVAR_PROTOCOL_REMOVE_PROPERTY RemoveProperty; //0x18
APPLE_GETVAR_PROTOCOL_GET_DEVICE_PROPS GetPropertyBuffer;//0x20
};

View File

@ -576,6 +576,7 @@ EFI_STATUS LoadKexts(IN LOADER_ENTRY *Entry)
}
/*
* Adler32 from Chameleon
*/
@ -804,17 +805,6 @@ EFI_STATUS InjectKexts(/*IN EFI_MEMORY_DESCRIPTOR *Desc*/ IN UINT32 deviceTreeP,
return EFI_INVALID_PARAMETER;
}
UINT64 os_version = AsciiOSVersionToUint64(Entry->OSVersion);
if (os_version < AsciiOSVersionToUint64("10.6")) {
DBG_RT(Entry, "no kernel patch for Tiger/Leopard; try to patch mkext\n");
if (is_mkext_v1(Entry, drvPtr)) {
patch_mkext_v1(Entry, drvPtr);
return EFI_SUCCESS;
}
}
// make space for memory map entries
platformEntry->NumProperties -= 2;
offset = sizeof(DeviceTreeNodeProperty) + ((DeviceTreeNodeProperty*) infoPtr)->Length;

View File

@ -89,6 +89,16 @@ EFI_HANDLE ConsoleInHandle;
EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL* SimpleTextEx;
EFI_KEY_DATA KeyData;
CHAR8* AudioOutputNames[] = {
"LineOut",
"Speaker",
"Headphones",
"SPDIF",
"Garniture",
"HDMI",
"Other"
};
extern VOID HelpRefit(VOID);
extern VOID AboutRefit(VOID);
extern BOOLEAN BooterPatch(IN UINT8 *BooterData, IN UINT64 BooterSize, LOADER_ENTRY *Entry);
@ -101,6 +111,7 @@ extern UINTN DsdtsNum;
extern CHAR16 *DsdtsList[];
extern UINTN AudioNum;
extern HDA_OUTPUTS AudioList[20];
extern CHAR8 *AudioOutputNames[];
extern EFI_AUDIO_IO_PROTOCOL *AudioIo;
@ -2485,11 +2496,18 @@ RefitMain (IN EFI_HANDLE ImageHandle,
PutNvramPlistToRtVars();
}
}
// log Audio devices in boot-log. Thisis for clients like Clover.app
GetOutputs();
for (i = 0; i < AudioNum; i++) {
if (AudioList[i].Name) {
// Never change this log, otherwise clients will stop interprete the output.
MsgLog("Found Audio Device %s (%a) at index %d\n", AudioList[i].Name, AudioOutputNames[AudioList[i].Device], i);
}
}
if (!GlobalConfig.FastBoot) {
CHAR16 *TmpArgs;
GetOutputs();
if (gThemeNeedInit) {
InitTheme(TRUE, &Now);
gThemeNeedInit = FALSE;

View File

@ -74,6 +74,7 @@ extern UINTN DsdtsNum;
extern CHAR16 *DsdtsList[];
extern UINTN AudioNum;
extern HDA_OUTPUTS AudioList[20];
extern CHAR8 *AudioOutputNames[];
extern CHAR8 *NonDetected;
extern BOOLEAN GetLegacyLanAddress;
extern UINT8 gLanMac[4][6]; // their MAC addresses
@ -237,16 +238,6 @@ CHAR16* ArgOptional[NUM_OPT] = {
L"nvda_drv=1" //19
};
CHAR8* OutputNames[] = {
"LineOut",
"Speaker",
"Headphones",
"SPDIF",
"Garniture",
"HDMI",
"Other"
};
UINTN RunGenericMenu(IN REFIT_MENU_SCREEN *Screen, IN MENU_STYLE_FUNC StyleFunc, IN OUT INTN *DefaultEntryIndex, OUT REFIT_MENU_ENTRY **ChosenEntry);
@ -1298,7 +1289,7 @@ VOID ApplyInputs(VOID)
if (InputItems[i].Valid) {
EFI_DEVICE_PATH_PROTOCOL* DevicePath = NULL;
UINT8 TmpIndex = OldChosenAudio & 0xFF;
DBG("Chosen output %d:%s_%a\n", OldChosenAudio, AudioList[OldChosenAudio].Name, OutputNames[OldChosenAudio]);
DBG("Chosen output %d:%s_%a\n", OldChosenAudio, AudioList[OldChosenAudio].Name, AudioOutputNames[OldChosenAudio]);
DevicePath = DevicePathFromHandle(AudioList[OldChosenAudio].Handle);
if (DevicePath != NULL) {
@ -5148,7 +5139,7 @@ REFIT_MENU_ENTRY *SubMenuAudioPort()
for (i = 0; i < AudioNum; i++) {
InputBootArgs = (__typeof__(InputBootArgs))AllocateZeroPool(sizeof(REFIT_INPUT_DIALOG));
InputBootArgs->Entry.Title = PoolPrint(L"%s_%a", AudioList[i].Name, OutputNames[AudioList[i].Device]);
InputBootArgs->Entry.Title = PoolPrint(L"%s_%a", AudioList[i].Name, AudioOutputNames[AudioList[i].Device]);
InputBootArgs->Entry.Tag = TAG_SWITCH;
InputBootArgs->Entry.Row = i;
InputBootArgs->Item = &InputItems[119];