Chameleon

Chameleon Commit Details

Date:2015-03-15 22:55:12 (9 years 1 month ago)
Author:ErmaC
Commit:2639
Parents: 2638
Message:Add machine-signature (credits to Bungo)
Changes:
M/trunk/i386/libsaio/acpi.h
M/trunk/i386/libsaio/acpi_patcher.c
M/trunk/i386/libsaio/fake_efi.c
M/trunk/i386/libsaio/platform.h
M/trunk/CHANGES

File differences

trunk/i386/libsaio/acpi_patcher.c
330330
331331
332332
333
334
335
336
337
338
339
340
341
342
343
344
333345
334346
335347
}
// Bungo: Save Hardware Signature (machine-signature)
if ((fadt_mod->FIRMWARE_CTRL > 0) && (fadt_mod->FIRMWARE_CTRL < 0xFFFFFFFF) && (((struct acpi_2_facs *)fadt_mod->FIRMWARE_CTRL)->Length >= 64))
{
Platform.HWSignature = ((struct acpi_2_facs *)fadt_mod->FIRMWARE_CTRL)->HWSignature;
DBG("\tHardware Signature=0x%08X: using.\n", Platform.HWSignature);
}
else
{
Platform.HWSignature = 0;
DBG("\tFixing Hardware Signature=0x%08X.\n", Platform.HWSignature);
}
// Patch DSDT address if we have loaded DSDT.aml
if (new_dsdt)
{
trunk/i386/libsaio/acpi.h
159159
160160
161161
162
163
164
165
166
167
168
169
170
171
172
173
174
162175
uint8_tnotimp2[96];
} __attribute__((packed));
struct acpi_2_facs
{
charSignature[4];
uint32_tLength;
uint32_t HWSignature;
uint32_t FWWakingVector32;
uint32_t GlobalLock;
uint32_t Flags;
uint64_t FWWakingVector64;
uint8_t Version;
uint8_t Reserved[31];
} __attribute__((packed));
#endif /* !__LIBSAIO_ACPI_H */
trunk/i386/libsaio/platform.h
414414
415415
416416
417
417
418418
419419
420420
uint8_tType;// system-type: 1=Desktop, 2=Portable, 3=Workstation... according ACPI2.0 (FACP: PM_Profile)
uint8_t*UUID;// system-id (SMBIOS Table 1: system uuid)
//uint32_tHWSignature;// machine-signature (FACS: Hardware Signature)
uint32_tHWSignature;// machine-signature (FACS: Hardware Signature)
} PlatformInfo_t;
extern PlatformInfo_t Platform;
trunk/i386/libsaio/fake_efi.c
450450
451451
452452
453
453454
454
455
455456
456457
457458
......
720721
721722
722723
723
724
724725
725726
726727
static const char MODEL_PROP[] = "Model";
static const char BOARDID_PROP[] = "board-id";
static const char DEV_PATH_SUP[] = "DevicePathsSupported";
static const char MACHINE_SIG_PROP[] = "machine-signature";
static EFI_UINT32 DevPathSup = 1;
static EFI_UINT32 MachineSig = 0; //Bungo
/*
* Get an smbios option string option to convert to EFI_CHAR16 string
*/
//DT__AddProperty(chosenNode, "boot-kernelcache-adler32", sizeof(adler32), adler32);
DT__AddProperty(chosenNode, "machine-signature", sizeof(EFI_UINT32), (EFI_UINT32 *)&MachineSig);
DT__AddProperty(chosenNode, MACHINE_SIG_PROP, sizeof(Platform.HWSignature), (EFI_UINT32 *)&Platform.HWSignature);
if (MacOSVerCurrent >= MacOSVer2Int("10.10"))
{
trunk/CHANGES
1
12
23
34
- Bungo : Added "machine-signature"
- Zenith432 : Protect timing code in scan_cpu() from interrupts, use bios for sleep()
- Zenith432 : Fix setupChosenNode, Tweak asm.s
- Zenith432 : Change identity snprintf to strncpy + misc printf issues

Archive Download the corresponding diff file

Revision: 2639