Chameleon

Chameleon Commit Details

Date:2014-01-27 16:36:10 (5 years 5 months ago)
Author:ErmaC
Commit:2352
Parents: 2351
Message:Add back from old commit ( http://forge.voodooprojects.org/p/chameleon/source/commit/759/ )DevicePathsSupported
Changes:
M/trunk/i386/libsaio/fake_efi.c

File differences

trunk/i386/libsaio/fake_efi.c
443443
444444
445445
446
446
447
447448
448449
449450
......
567568
568569
569570
570
571
571
572572
573
574
575
573
576574
577575
578576
......
585583
586584
587585
588
589
586
590587
591588
592589
593590
594591
595592
596
597
598
593
599594
600595
601596
......
610605
611606
612607
613
614
608
615609
616610
617611
618612
619
620
613
621614
622615
623616
624
625
617
626618
627619
628620
621
622
629623
630624
631625
static const char SYSTEM_TYPE_PROP[] = "system-type";
static const char MODEL_PROP[] = "Model";
static const char BOARDID_PROP[] = "board-id";
static const char DEV_PATH_SUP[] = "DevicePathsSupported";
static uint32_t DevPathSup = 1;
/*
* Get an smbios option string option to convert to EFI_CHAR16 string
*/
// too so we might as well create it so we have a pointer for it too.
node = DT__AddChild(node, "efi");
if (archCpuType == CPU_TYPE_I386)
{
if (archCpuType == CPU_TYPE_I386) {
DT__AddProperty(node, FIRMWARE_ABI_PROP, sizeof(FIRMWARE_ABI_32_PROP_VALUE), (char*)FIRMWARE_ABI_32_PROP_VALUE);
}
else
{
} else {
DT__AddProperty(node, FIRMWARE_ABI_PROP, sizeof(FIRMWARE_ABI_64_PROP_VALUE), (char*)FIRMWARE_ABI_64_PROP_VALUE);
}
// is set up. That is, name and table properties
Node *runtimeServicesNode = DT__AddChild(node, "runtime-services");
if (archCpuType == CPU_TYPE_I386)
{
if (archCpuType == CPU_TYPE_I386) {
// The value of the table property is the 32-bit physical address for the RuntimeServices table.
// Since the EFI system table already has a pointer to it, we simply use the address of that pointer
// for the pointer to the property data. Warning.. DT finalization calls free on that but we're not
// the only thing to use a non-malloc'd pointer for something in the DT
DT__AddProperty(runtimeServicesNode, "table", sizeof(uint64_t), &gST32->RuntimeServices);
}
else
{
} else {
DT__AddProperty(runtimeServicesNode, "table", sizeof(uint64_t), &gST64->RuntimeServices);
}
// the value in the fsbFrequency global and not an malloc'd pointer
// because the DT_AddProperty function does not copy its args.
if (Platform.CPU.FSBFrequency != 0)
{
if (Platform.CPU.FSBFrequency != 0) {
DT__AddProperty(efiPlatformNode, FSB_Frequency_prop, sizeof(uint64_t), &Platform.CPU.FSBFrequency);
}
// Export TSC and CPU frequencies for use by the kernel or KEXTs
if (Platform.CPU.TSCFrequency != 0)
{
if (Platform.CPU.TSCFrequency != 0) {
DT__AddProperty(efiPlatformNode, TSC_Frequency_prop, sizeof(uint64_t), &Platform.CPU.TSCFrequency);
}
if (Platform.CPU.CPUFrequency != 0)
{
if (Platform.CPU.CPUFrequency != 0) {
DT__AddProperty(efiPlatformNode, CPU_Frequency_prop, sizeof(uint64_t), &Platform.CPU.CPUFrequency);
}
DT__AddProperty(efiPlatformNode,DEV_PATH_SUP, sizeof(uint32_t), &DevPathSup);
// 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: 2352