Chameleon

Chameleon Commit Details

Date:2017-03-24 20:38:30 (3 years 2 months ago)
Author:ErmaC
Commit:2861
Parents: 2860
Message:sync with Enoch Branch
Changes:
M/trunk/doc/BootHelp.txt
M/trunk/i386/libsaio/memvendors.h
M/trunk/i386/libsaio/msdos.c
M/trunk/i386/libsaio/spd.c
M/trunk/i386/libsaio/fake_efi.c
M/trunk/i386/libsaio/nvidia.c
M/trunk/i386/libsaio/nvidia.h

File differences

trunk/i386/libsaio/spd.c
8585
8686
8787
88
88
8989
9090
9191
......
137137
138138
139139
140
140
141141
142142
143143
......
190190
191191
192192
193
193
194194
195195
196196
......
232232
233233
234234
235
235
236236
237237
238238
......
253253
254254
255255
256
256
257257
258258
259259
/** Read one byte from the intel i2c, used for reading SPD on intel chipsets only. */
unsigned char smb_read_byte_intel(uint32_t base, uint8_t adr, uint8_t cmd)
static unsigned char smb_read_byte_intel(uint32_t base, uint8_t adr, uint8_t cmd)
{
int l1, h1, l2, h2;
unsigned long long t;
// Get Vendor Name from spd, 2 cases handled DDR3 and DDR2,
// have different formats, always return a valid ptr.
const char *getVendorName(RamSlotInfo_t *slot, uint32_t base, int slot_num)
static const char *getVendorName(RamSlotInfo_t *slot, uint32_t base, int slot_num)
{
uint8_t bank = 0;
uint8_t code = 0;
}
/* Get Default Memory Module Speed (no overclocking handled) */
int getDDRspeedMhz(const char * spd)
static int getDDRspeedMhz(const char * spd)
{
if ((spd[SPD_MEMORY_TYPE] == SPD_MEMORY_TYPE_SDRAM_DDR2) || (spd[SPD_MEMORY_TYPE] == SPD_MEMORY_TYPE_SDRAM_DDR))
#define SLST(a) ((uint8_t)(spd[a] & 0x0f))
/* Get DDR3 or DDR2 serial number, 0 most of the times, always return a valid ptr */
const char *getDDRSerial(const char *spd)
static const char *getDDRSerial(const char *spd)
{
static char asciiSerial[17];
}
/* Get DDR3 or DDR2 Part Number, always return a valid ptr */
const char *getDDRPartNum(char *spd, uint32_t base, int slot)
static const char *getDDRPartNum(char *spd, uint32_t base, int slot)
{
int i, start = 0, index = 0;
char c;
trunk/i386/libsaio/memvendors.h
887887
888888
889889
890
890891
891892
892893
{ 6, 0xf2, "Muscle Power"},
{ 6, 0x73, "Energy Micro"},
{ 6, 0xf4, "Innofidei"},
{ 0x85, 0x9B, "Crucial Technology"},
{ 9, 0xff, ""}
};
trunk/i386/libsaio/nvidia.c
19241924
19251925
19261926
1927
1927
19281928
19291929
1930
1930
19311931
19321932
19331933
......
19371937
19381938
19391939
1940
1940
19411941
19421942
19431943
......
19541954
19551955
19561956
1957
1957
19581958
19591959
19601960
19611961
1962
1962
19631963
19641964
1965
1965
19661966
19671967
19681968
......
21432143
21442144
21452145
2146
2146
21472147
21482148
21492149
{
if (nvidia_card_generic[i].device == device_id)
{
return nvidia_card_generic[i].name;
return nvidia_card_generic[i].name_model;
}
}
return nvidia_card_generic[0].name;
return nvidia_card_generic[0].name_model;
}
// Then check the exceptions table
{
if ((nvidia_card_exceptions[i].device == device_id) && (nvidia_card_exceptions[i].subdev == subsys_id))
{
return nvidia_card_exceptions[i].name;
return nvidia_card_exceptions[i].name_model;
}
}
}
if (nvidia_card_vendors[j].device == (subsys_id & 0xffff0000))
{
snprintf(generic_name, 128, "%s %s", // sizeof(generic_name), "%s %s",
nvidia_card_vendors[j].name, nvidia_card_generic[i].name);
nvidia_card_vendors[j].name_model, nvidia_card_generic[i].name_model);
return &generic_name[0];
}
}
}
return nvidia_card_generic[i].name;
return nvidia_card_generic[i].name_model;
}
}
return nvidia_card_generic[0].name;
return nvidia_card_generic[0].name_model;
}
static int devprop_add_nvidia_template(DevPropDevice *device)
break;
}
DBG("mem_detected %ld\n", vram_size);
DBG("mem_detected %ldMb\n", (vram_size >> 20));
return vram_size;
}
trunk/i386/libsaio/nvidia.h
5555
5656
5757
58
58
5959
6060
6161
6262
6363
6464
65
65
6666
6767
6868
struct nvidia_pci_info_t;
typedef struct {
uint32_t device; // VendorID + DeviceID
char *name;
char *name_model;
} nvidia_pci_info_t;
struct nvidia_card_info_t;
typedef struct {
uint32_t device; // VendorID + DeviceID
uint32_t subdev; // SubdeviceID + SubvendorID
char *name;
char *name_model;
//bool kEnableHDMIAudio //HDMi
//VRAM
} nvidia_card_info_t;
trunk/i386/libsaio/msdos.c
807807
808808
809809
810
810
811811
812812
813813
}
// Calculate a fake timestamp using modification date and time values.
*time = ((dirp->deMDate & 0x7FFF) << 16) + dirp->deMTime;
*time = (dirp->deMDate & 0x7FFF) << (16 + dirp->deMTime);
if (infoValid)
{
trunk/i386/libsaio/fake_efi.c
473473
474474
475475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
476496
477497
478498
......
672692
673693
674694
675
695
676696
677
697
698
678699
679700
680701
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 };
// Pike R. Alpha
static EFI_UINT8 const BOOT_DEVICE_PATH[] =
{
0x02, 0x01, 0x0C, 0x00, 0xD0, 0x41, 0x08, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x06, 0x00,
0x02, 0x1F, 0x03, 0x12, 0x0A, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x2A, 0x00,
0x02, 0x00, 0x00, 0x00, 0x28, 0x40, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x0B, 0x63, 0x34,
0x00, 0x00, 0x00, 0x00, 0x65, 0x8C, 0x53, 0x3F, 0x1B, 0xCA, 0x83, 0x38, 0xA9, 0xD0, 0xF0, 0x46,
0x19, 0x14, 0x8E, 0x31, 0x02, 0x02, 0x7F, 0xFF, 0x04, 0x00
};
// Pike R. Alpha
static EFI_UINT8 const BOOT_FILE_PATH[] =
{
0x04, 0x04, 0x50, 0x00, 0x5c, 0x00, 0x53, 0x00, 0x79, 0x00, 0x73, 0x00, 0x74, 0x00, 0x65, 0x00,
0x6d, 0x00, 0x5c, 0x00, 0x4c, 0x00, 0x69, 0x00, 0x62, 0x00, 0x72, 0x00, 0x61, 0x00, 0x72, 0x00,
0x79, 0x00, 0x5c, 0x00, 0x43, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x65, 0x00, 0x53, 0x00, 0x65, 0x00,
0x72, 0x00, 0x76, 0x00, 0x69, 0x00, 0x63, 0x00, 0x65, 0x00, 0x73, 0x00, 0x5c, 0x00, 0x62, 0x00,
0x6f, 0x00, 0x6f, 0x00, 0x74, 0x00, 0x2e, 0x00, 0x65, 0x00, 0x66, 0x00, 0x69, 0x00, 0x00, 0x00,
0x7f, 0xff, 0x04, 0x00
};
/*
* Get an smbios option string option to convert to EFI_CHAR16 string
*/
// Adding the default kernel name (mach_kernel) for kextcache.
DT__AddProperty(chosenNode, "boot-file", sizeof(bootInfo->bootFile), bootInfo->bootFile);
//DT__AddProperty(chosenNode, "boot-device-path", bootDPsize, gBootDP);
DT__AddProperty(chosenNode, "boot-file-path", sizeof(BOOT_FILE_PATH), (EFI_UINT8 *) &BOOT_FILE_PATH);
//DT__AddProperty(chosenNode, "boot-file-path", bootFPsize, gBootFP);
// Adding the root path for kextcache.
DT__AddProperty(chosenNode, "boot-device-path", sizeof(BOOT_DEVICE_PATH), (EFI_UINT8 *) &BOOT_DEVICE_PATH);
DT__AddProperty(chosenNode, "boot-kernelcache-adler32", sizeof(unsigned long), &adler32);
trunk/doc/BootHelp.txt
165165
166166
167167
168
169
170
171
172
173
174
175
176
177168
178169
179170
if smbios.plist doesn't exist, factory
values are kept.
KERNELPlist=<file> Use an alternate kernel.plist file
(default path: /Extra/Kernel.plist
bt(0,0)/Extra/kernel.plist).
KEXTPlist=<file> Use an alternate kext.plist file
(default path: /Extra/Kext.plist
bt(0,0)/Extra/kext.plist).
"Scan Single Drive" Scan the drive only where the booter got loaded from.
=Yes|No Fix rescan issues when using a DVD reader in AHCI mode.
Rescan=Yes Enable CD-ROM rescan mode.

Archive Download the corresponding diff file

Revision: 2861