Skip to content

Commit 2b9363b

Browse files
committed
Revert "uefi: Call Apple set_os protocol to keep iGPU alive on dual-GPU Macs"
This reverts commit c871e24.
1 parent c54d7a2 commit 2b9363b

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

common/entry.s3.c

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -31,48 +31,6 @@ void stage3_common(void);
3131
extern symbol __slide, __image_base, __image_end;
3232
extern symbol _start;
3333

34-
#if defined (__x86_64__)
35-
static void apple_set_os(void) {
36-
if (gST->FirmwareVendor == NULL) {
37-
return;
38-
}
39-
40-
static const CHAR16 apple[] = L"Apple";
41-
for (size_t i = 0; i < SIZEOF_ARRAY(apple) - 1; i++) {
42-
if (gST->FirmwareVendor[i] != apple[i]) {
43-
return;
44-
}
45-
}
46-
47-
EFI_GUID apple_set_os_guid = {
48-
0xc5c5da95, 0x7d5c, 0x45e6,
49-
{ 0xb2, 0xf1, 0x3f, 0xd5, 0x2b, 0xb1, 0x00, 0x77 }
50-
};
51-
52-
struct apple_set_os_iface {
53-
uint64_t version;
54-
EFI_STATUS (EFIAPI *set_os_version)(const char *version);
55-
EFI_STATUS (EFIAPI *set_os_vendor)(const char *vendor);
56-
} *set_os = NULL;
57-
58-
EFI_STATUS status = gBS->LocateProtocol(
59-
&apple_set_os_guid, NULL, (void **)&set_os);
60-
if (status || set_os == NULL) {
61-
return;
62-
}
63-
64-
if (set_os->version >= 2) {
65-
set_os->set_os_vendor("Apple Inc.");
66-
}
67-
if (set_os->version > 0) {
68-
set_os->set_os_version("Mac OS X 10.9");
69-
}
70-
71-
printv("apple: Set OS version via Apple set_os protocol (version %u)\n",
72-
(uint32_t)set_os->version);
73-
}
74-
#endif
75-
7634
noreturn void uefi_entry(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) {
7735
gST = SystemTable;
7836
gBS = SystemTable->BootServices;
@@ -118,10 +76,6 @@ noreturn void uefi_entry(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
11876

11977
term_fallback();
12078

121-
#if defined (__x86_64__)
122-
apple_set_os();
123-
#endif
124-
12579
status = gBS->SetWatchdogTimer(0, 0x10000, 0, NULL);
12680
if (status) {
12781
print("WARNING: Failed to disable watchdog timer!\n");

0 commit comments

Comments
 (0)