Chameleon

Chameleon Commit Details

Date:2015-03-15 23:15:14 (4 years 4 months ago)
Author:ErmaC
Commit:2640
Parents: 2639
Message:Add StartupPowerEvents and tweak for fake_efi.c (credits to Pike R. Alpha)
Changes:
M/trunk/i386/libsaio/fake_efi.c

File differences

trunk/i386/libsaio/fake_efi.c
450450
451451
452452
453
453454
454
455
456
457
455458
456459
457460
......
618621
619622
620623
621
622
623624
625
626
627
628
629
630
631
632
633
634
624635
625636
626637
......
644655
645656
646657
647
658
648659
660
661
649662
650663
651664
static const char MODEL_PROP[] = "Model";
static const char BOARDID_PROP[] = "board-id";
static const char DEV_PATH_SUP[] = "DevicePathsSupported";
static const char START_POWER_EV[] = "StartupPowerEvents";
static const char MACHINE_SIG_PROP[] = "machine-signature";
static EFI_UINT32 DevPathSup = 1;
static EFI_UINT8 const DEVICE_PATHS_SUPPORTED[] = { 0x01, 0x00, 0x00, 0x00 };
static EFI_UINT8 const STARTUP_POWER_EVENTS[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
static EFI_UINT8 const COMPAT_MODE[] = { 0x01, 0x00, 0x00, 0x00 };
/*
* Get an smbios option string option to convert to EFI_CHAR16 string
// New node: /efi/kernel-compatibility
Node *efiKernelComNode = DT__AddChild(node, "kernel-compatibility");
len = 1;
DT__AddProperty(efiKernelComNode, "x86_64", sizeof(uint32_t), (EFI_UINT32 *)&len);
if (MacOSVerCurrent >= MacOSVer2Int("10.9"))
{
DT__AddProperty(efiKernelComNode, "x86_64", sizeof(COMPAT_MODE), (EFI_UINT8 *) &COMPAT_MODE);
}
else
{
DT__AddProperty(efiKernelComNode, "i386", sizeof(COMPAT_MODE), (EFI_UINT8 *) &COMPAT_MODE);
DT__AddProperty(efiKernelComNode, "x86_64", sizeof(COMPAT_MODE), (EFI_UINT8 *) &COMPAT_MODE);
}
// Now fill in the /efi/platform Node
Node *efiPlatformNode = DT__AddChild(node, "platform");
DT__AddProperty(efiPlatformNode, CPU_Frequency_prop, sizeof(uint64_t), &Platform.CPU.CPUFrequency);
}
DT__AddProperty(efiPlatformNode,DEV_PATH_SUP, sizeof(EFI_UINT32), &DevPathSup);
DT__AddProperty(efiPlatformNode,START_POWER_EV, sizeof(STARTUP_POWER_EVENTS), (EFI_UINT8 *) &STARTUP_POWER_EVENTS);
DT__AddProperty(efiPlatformNode,DEV_PATH_SUP, sizeof(DEVICE_PATHS_SUPPORTED), (EFI_UINT8 *) &DEVICE_PATHS_SUPPORTED);
// Bungo
/* Export system-id. Can be disabled with SystemId=No in com.apple.Boot.plist
if ((ret=getSystemID()))

Archive Download the corresponding diff file

Revision: 2640