Index: branches/iFabio/Chameleon/i386/libsaio/spd.c
===================================================================
--- branches/iFabio/Chameleon/i386/libsaio/spd.c (revision 306)
+++ branches/iFabio/Chameleon/i386/libsaio/spd.c (revision 307)
@@ -344,8 +344,9 @@
slot->SerialNo);
#if DEBUG_SPD
+ // prevously located on mem.c; temporarily on platform.c now
dumpPhysAddr("spd content: ", slot->spd, spd_size);
- getc();
+ getchar();
#endif
}
Index: branches/iFabio/Chameleon/i386/libsaio/platform.c
===================================================================
--- branches/iFabio/Chameleon/i386/libsaio/platform.c (revision 306)
+++ branches/iFabio/Chameleon/i386/libsaio/platform.c (revision 307)
@@ -26,6 +26,50 @@
PlatformInfo_t Platform;
pci_dt_t * dram_controller_dev = NULL;
+//Azi: temporarily placing this here; from removed mem.c, needed by DEBUG_PLATFORM
+// check if replaceable by other or completely remove?? whatever...
+#define DC(c) (c >= 0x20 && c < 0x7f ? (char) c : '.')
+#define STEP 16
+void dumpPhysAddr(const char * title, void * a, int len)
+{
+ int i,j;
+ u_int8_t* ad = (u_int8_t*) a;
+ char buffer[80];
+ char str[16];
+
+ if(ad==NULL) return;
+
+ printf("%s addr=0x%08x len=%04d\n",title ? title : "Dump of ", a, len);
+ printf("Ofs-00-01-02-03-04-05-06-07-08-09-0A-0B-0C-0D-0E-0F ASCII\n");
+ i = (len/STEP)*STEP;
+ for (j=0; j < i; j+=STEP)
+ {
+ printf("%02x: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c\n",
+ j,
+ ad[j], ad[j+1], ad[j+2], ad[j+3] , ad[j+4], ad[j+5], ad[j+6], ad[j+7],
+ ad[j+8], ad[j+9], ad[j+10], ad[j+11] , ad[j+12], ad[j+13], ad[j+14], ad[j+15],
+ DC(ad[j]), DC(ad[j+1]), DC(ad[j+2]), DC(ad[j+3]) , DC(ad[j+4]), DC(ad[j+5]), DC(ad[j+6]), DC(ad[j+7]),
+ DC(ad[j+8]), DC(ad[j+9]), DC(ad[j+10]), DC(ad[j+11]) , DC(ad[j+12]), DC(ad[j+13]), DC(ad[j+14]), DC(ad[j+15])
+ );
+ }
+
+ if (len%STEP==0) return;
+ sprintf(buffer,"%02x:", i);
+ for (j=0; j < STEP; j++) {
+ if (j<(len%STEP))
+ sprintf(str, " %02x", ad[i+j]);
+ else
+ strcpy(str, " " );
+ strncat(buffer, str, sizeof(buffer));
+ }
+ strncat(buffer," ", sizeof(buffer));
+ for (j=0; j < (len%STEP); j++) {
+ sprintf(str, "%c", DC(ad[i+j]));
+ strncat(buffer, str, sizeof(buffer));
+ }
+ printf("%s\n",buffer);
+}
+
/** Return if a CPU feature specified by feature is activated (true) or not (false) */
bool platformCPUFeature(uint32_t feature)
{
Index: branches/iFabio/Chameleon/i386/libsaio/pci_setup.c
===================================================================
--- branches/iFabio/Chameleon/i386/libsaio/pci_setup.c (revision 306)
+++ branches/iFabio/Chameleon/i386/libsaio/pci_setup.c (revision 307)
@@ -18,9 +18,7 @@
char *devicepath;
bool do_eth_devprop, do_gfx_devprop, do_enable_hpet;
pci_dt_t *current = pci_dt;
-
do_eth_devprop = do_gfx_devprop = do_enable_hpet = false;
-
getBoolForKey(kEthernetBuiltIn, &do_eth_devprop, &bootInfo->bootConfig);
getBoolForKey(kGraphicsEnabler, &do_gfx_devprop, &bootInfo->bootConfig);
getBoolForKey(kForceHPET, &do_enable_hpet, &bootInfo->bootConfig);
@@ -28,19 +26,18 @@
while (current)
{
devicepath = get_pci_dev_path(current);
-
switch (current->class_id)
{
case PCI_CLASS_BRIDGE_HOST:
if (current->dev.addr == PCIADDR(0, 0, 0))
dram_controller_dev = current;
break;
-
+
case PCI_CLASS_NETWORK_ETHERNET:
if (do_eth_devprop)
set_eth_builtin(current);
break;
-
+
case PCI_CLASS_DISPLAY_VGA:
if (do_gfx_devprop)
switch (current->vendor_id)
@@ -48,13 +45,13 @@
case PCI_VENDOR_ID_ATI:
setup_ati_devprop(current);
break;
-
+
case PCI_VENDOR_ID_INTEL:
/* message to be removed once support for these cards is added */
verbose("Intel VGA Controller [%04x:%04x] :: %s (currently NOT SUPPORTED)\n",
current->vendor_id, current->device_id, devicepath);
break;
-
+
case PCI_VENDOR_ID_NVIDIA:
setup_nvidia_devprop(current);
break;
Index: branches/iFabio/Chameleon/i386/boot2/Makefile
===================================================================
--- branches/iFabio/Chameleon/i386/boot2/Makefile (revision 306)
+++ branches/iFabio/Chameleon/i386/boot2/Makefile (revision 307)
@@ -124,16 +124,11 @@
-o $(OBJROOT)/Symbols_LINKER_ONLY.dylib
-
-
-
endif
@make embed_symbols # this is done in a sub process after boot.sys exists so the strings are populated correctly
@${RM} $(SYMROOT)/boot2.sys
-
-
@( size=`ls -l $(SYMROOT)/boot | awk '{ print $$5}'` ; \
if expr "$$size" ">" "$(MAXBOOTSIZE)" > /dev/null ;\
then \
Index: branches/iFabio/Chameleon/i386/boot2/modules.c
===================================================================
--- branches/iFabio/Chameleon/i386/boot2/modules.c (revision 306)
+++ branches/iFabio/Chameleon/i386/boot2/modules.c (revision 307)
@@ -53,7 +53,7 @@
if(symbols_module_start != (void*)0xFFFFFFFF)
{
// Module system was compiled in (Symbols.dylib addr known)
- module_start = parse_mach(module_data, &load_module, &add_symbol);
+ module_start = parse_mach(module_data, &load_module, &add_symbol, NULL);
if(module_start && module_start != (void*)0xFFFFFFFF)
{
@@ -69,7 +69,7 @@
else
{
module_data -= 0x10; // XCODE 4 HACK
- module_start = parse_mach(module_data, &load_module, &add_symbol);
+ module_start = parse_mach(module_data, &load_module, &add_symbol, NULL);
if(module_start && module_start != (void*)0xFFFFFFFF)
{
@@ -166,7 +166,7 @@
if (moduleSize && read(fh, module_base, moduleSize) == moduleSize)
{
// Module loaded into memory, parse it
- module_start = parse_mach(module_base, &load_module, &add_symbol);
+ module_start = parse_mach(module_base, &load_module, &add_symbol, NULL);
if(module_start && module_start != (void*)0xFFFFFFFF)
{
@@ -308,7 +308,11 @@
* NOTE: If the module is unable to load ot completeion, the modules
* symbols will still be available.
*/
-void* parse_mach(void* binary, int(*dylib_loader)(char*), long long(*symbol_handler)(char*, long long, char))
+void* parse_mach(void* binary,
+ int(*dylib_loader)(char*),
+ long long(*symbol_handler)(char*, long long, char),
+ void (*section_handler)(char* section, char* segment, long long offset, long long address)
+)
{
char is64 = false;
void (*module_start)(void) = NULL;
@@ -377,62 +381,60 @@
break;
case LC_SEGMENT: // 32bit macho
- segCommand = binary + binaryIndex;
-
- if(strcmp("__TEXT", segCommand->segname) == 0)
- {
- UInt32 sectionIndex;
-
- sectionIndex = sizeof(struct segment_command);
-
- struct section *sect;
-
- while(sectionIndex < segCommand->cmdsize)
- {
- sect = binary + binaryIndex + sectionIndex;
-
- sectionIndex += sizeof(struct section);
-
-
- if(strcmp("__text", sect->sectname) == 0)
- {
- // __TEXT,__text found, save the offset and address for when looking for the calls.
- textSection = sect->offset;
- textAddress = sect->addr;
- break;
- }
- }
- }
-
+ {
+ segCommand = binary + binaryIndex;
+
+ UInt32 sectionIndex;
+
+ sectionIndex = sizeof(struct segment_command);
+
+ struct section *sect;
+
+ while(sectionIndex < segCommand->cmdsize)
+ {
+ sect = binary + binaryIndex + sectionIndex;
+
+ sectionIndex += sizeof(struct section);
+
+ if(section_handler) section_handler(sect->sectname, segCommand->segname, sect->offset, sect->addr);
+
+
+
+ if((strcmp("__TEXT", segCommand->segname) == 0) && (strcmp("__text", sect->sectname) == 0))
+ {
+ // __TEXT,__text found, save the offset and address for when looking for the calls.
+ textSection = sect->offset;
+ textAddress = sect->addr;
+ }
+ }
+ }
break;
case LC_SEGMENT_64: // 64bit macho's
- segCommand64 = binary + binaryIndex;
- if(strcmp("__TEXT", segCommand64->segname) == 0)
- {
- UInt32 sectionIndex;
-
- sectionIndex = sizeof(struct segment_command_64);
-
- struct section_64 *sect;
-
- while(sectionIndex < segCommand64->cmdsize)
- {
- sect = binary + binaryIndex + sectionIndex;
-
- sectionIndex += sizeof(struct section_64);
-
-
- if(strcmp("__text", sect->sectname) == 0)
- {
- // __TEXT,__text found, save the offset and address for when looking for the calls.
- textSection = sect->offset;
- textAddress = sect->addr;
-
- break;
- }
- }
- }
-
+ {
+ segCommand64 = binary + binaryIndex;
+ UInt32 sectionIndex;
+
+ sectionIndex = sizeof(struct segment_command_64);
+
+ struct section_64 *sect;
+
+ while(sectionIndex < segCommand64->cmdsize)
+ {
+ sect = binary + binaryIndex + sectionIndex;
+
+ sectionIndex += sizeof(struct section_64);
+
+ if(section_handler) section_handler(sect->sectname, segCommand->segname, sect->offset, sect->addr);
+
+
+ if((strcmp("__TEXT", segCommand->segname) == 0) && (strcmp("__text", sect->sectname) == 0))
+ {
+ // __TEXT,__text found, save the offset and address for when looking for the calls.
+ textSection = sect->offset;
+ textAddress = sect->addr;
+ }
+ }
+ }
break;
Index: branches/iFabio/Chameleon/i386/boot2/modules.h
===================================================================
--- branches/iFabio/Chameleon/i386/boot2/modules.h (revision 306)
+++ branches/iFabio/Chameleon/i386/boot2/modules.h (revision 307)
@@ -41,12 +41,12 @@
struct moduleHook_t* next;
} moduleHook_t;
-typedef struct modulesList_t
+typedef struct moduleList_t //Azi: modules or module? see modules/include/modules
{
char* name;
// UInt32 version;
// UInt32 compat;
- struct modulesList_t* next;
+ struct moduleList_t* next;
} moduleList_t;
@@ -77,7 +77,9 @@
/********************************************************************************/
void* parse_mach(void* binary,
int(*dylib_loader)(char*),
- long long(*symbol_handler)(char*, long long, char));
+ long long(*symbol_handler)(char*, long long, char),
+ void (*section_handler)(char* section, char* segment, long long offset, long long address)
+ );
unsigned int handle_symtable(UInt32 base,
struct symtab_command* symtabCommand,
long long(*symbol_handler)(char*, long long, char),
Index: branches/iFabio/Chameleon/i386/modules/Resolution/915resolution.c
===================================================================
--- branches/iFabio/Chameleon/i386/modules/Resolution/915resolution.c (revision 306)
+++ branches/iFabio/Chameleon/i386/modules/Resolution/915resolution.c (revision 307)
@@ -182,7 +182,7 @@
if((id & 0x0000FFFF) == 0x00008086) // Intel chipset
{
//printf("Unknown chipset 0x%llX, please email id to meklort@gmail.com", id);
- //getc();
+ //getchar();
type = CT_UNKNOWN_INTEL;
//type = CT_UNKNOWN;
@@ -860,4 +860,4 @@
// }
}
-#endif // _RESOLUTION_H_
\ No newline at end of file
+#endif // _RESOLUTION_H_
Index: branches/iFabio/Chameleon/i386/modules/NVIDIAGraphicsEnabler/nvidia.c
===================================================================
--- branches/iFabio/Chameleon/i386/modules/NVIDIAGraphicsEnabler/nvidia.c (revision 306)
+++ branches/iFabio/Chameleon/i386/modules/NVIDIAGraphicsEnabler/nvidia.c (revision 307)
@@ -245,7 +245,7 @@
{ 0x10DE0408, "GeForce 9650M GS" },
{ 0x10DE0409, "GeForce 8700M GT" },
{ 0x10DE040A, "Quadro FX 370" },
- { 0x10DE040B, "Quadro NVS 320M" },
+ { 0x10DE040B, "Quadro NVS 320M" }, //Azi: 320M
{ 0x10DE040C, "Quadro FX 570M" },
{ 0x10DE040D, "Quadro FX 1600M" },
{ 0x10DE040E, "Quadro FX 570" },
@@ -402,7 +402,7 @@
{ 0x10DE0DE2, "GeForce GT 420" },
{ 0x10DE0DEB, "GeForce GT 555M" },
{ 0x10DE0DEE, "GeForce GT 415M" },
- { 0x10DE0DF0, "GeForce GT 425M" },
+ { 0x10DE0DF0, "GeForce GT 425M" }, //Azi: ?? GT 450M
{ 0x10DE0DF1, "GeForce GT 420M" },
{ 0x10DE0DF2, "GeForce GT 435M" },
{ 0x10DE0DF3, "GeForce GT 420M" },
Index: branches/iFabio/Chameleon/i386/modules/IntelGraphicsEnabler/gma.c
===================================================================
--- branches/iFabio/Chameleon/i386/modules/IntelGraphicsEnabler/gma.c (revision 306)
+++ branches/iFabio/Chameleon/i386/modules/IntelGraphicsEnabler/gma.c (revision 307)
@@ -99,7 +99,7 @@
{
printf("Failed initializing dev-prop string dev-entry, press any key...\n");
- getc();
+ getchar();
return false;
}
@@ -142,7 +142,7 @@
if(!stringdata)
{
printf("no stringdata press a key...\n");
- getc();
+ getchar();
return false;
}
Index: branches/iFabio/Chameleon/i386/modules/ATiGraphicsEnabler/ati.c
===================================================================
--- branches/iFabio/Chameleon/i386/modules/ATiGraphicsEnabler/ati.c (revision 306)
+++ branches/iFabio/Chameleon/i386/modules/ATiGraphicsEnabler/ati.c (revision 307)
@@ -643,22 +643,22 @@
devicepath = get_pci_dev_path(ati_dev);
cmd = pci_config_read8(ati_dev->dev.addr, 4);
- verbose("old pci command - %x\n", cmd);
+ verbose("old pci command - %x\n", cmd); //Azi: 7
if (cmd == 0) {
pci_config_write8(ati_dev->dev.addr, 4, 6);
cmd = pci_config_read8(ati_dev->dev.addr, 4);
verbose("new pci command - %x\n", cmd);
}
- model = get_ati_model((ati_dev->vendor_id << 16) | ati_dev->device_id);
- framebuffer = get_ati_fb((ati_dev->vendor_id << 16) | ati_dev->device_id);
+ model = get_ati_model((ati_dev->vendor_id << 16) | ati_dev->device_id); //Azi: Unknown
+ framebuffer = get_ati_fb((ati_dev->vendor_id << 16) | ati_dev->device_id); //Azi: Megalodon
if (!string) {
string = devprop_create_string();
}
device = devprop_add_device(string, devicepath);
if (!device) {
printf("Failed initializing dev-prop string dev-entry, press any key...\n");
- getc();
+ getchar();
return false;
}
@@ -668,20 +668,21 @@
} else {
boot_display = 0;
}
- verbose("boot display - %x\n", boot_display);
- devprop_add_value(device, "@0,AAPL,boot-display", (uint8_t*)&boot_display, 4);
+ verbose("boot display - %x\n", boot_display); //Azi: 1... thus, POSTed!
+ devprop_add_value(device, "@0,AAPL,boot-display", (uint8_t*)&boot_display, 4); //Azi: Ok!
if ((framebuffer[0] == 'M' && framebuffer[1] == 'o' && framebuffer[2] == 't') ||
(framebuffer[0] == 'S' && framebuffer[1] == 'h' && framebuffer[2] == 'r') ||
(framebuffer[0] == 'P' && framebuffer[1] == 'e' && framebuffer[2] == 'r')) //faster than strcmp ;)
- devprop_add_ati_template_4xxx(device);
+ //Azi: if framebuffer = Motmot or Shrike (none!) or Peregrine
+ devprop_add_ati_template_4xxx(device); //Azi: 4000 series (or 4800 ??)
else {
- devprop_add_ati_template(device);
+ devprop_add_ati_template(device); //Azi: my scene!!!***
vram_size = getvramsizekb(ati_dev) * 1024;
if ((vram_size > 0x80000000) || (vram_size == 0)) {
vram_size = 0x10000000; //vram reported wrong, defaulting to 256 mb
}
- devprop_add_value(device, "VRAM,totalsize", (uint8_t*)&vram_size, 4);
+ devprop_add_value(device, "VRAM,totalsize", (uint8_t*)&vram_size, 4); //Azi: 0x20000000
ati_vram_memsize_0.data[6] = (vram_size >> 16) & 0xFF; //4,5 are 0x00 anyway
ati_vram_memsize_0.data[7] = (vram_size >> 24) & 0xFF;
ati_vram_memsize_1.data[6] = (vram_size >> 16) & 0xFF; //4,5 are 0x00 anyway
@@ -690,12 +691,13 @@
DP_ADD_TEMP_VAL_DATA(device, ati_vram_memsize_1);
devprop_add_iopciconfigspace(device, ati_dev);
}
- devprop_add_value(device, "model", (uint8_t*)model, (strlen(model) + 1));
- devprop_add_value(device, "ATY,DeviceID", (uint8_t*)&ati_dev->device_id, 2);
+ devprop_add_value(device, "model", (uint8_t*)model, (strlen(model) + 1)); //Azi: Unknown
+ devprop_add_value(device, "ATY,DeviceID", (uint8_t*)&ati_dev->device_id, 2); //Azi: Ok! 8171 = (7181)
//fb setup
sprintf(tmp, "Slot-%x",devices_number);
- devprop_add_value(device, "AAPL,slot-name", (uint8_t*)tmp, strlen(tmp) + 1);
+ devprop_add_value(device, "AAPL,slot-name", (uint8_t*)tmp, strlen(tmp) + 1); //Azi: OK! Slot-1
+ // don't think my card is on slot 1 ??... 0 ??
devices_number++;
sprintf(tmp, ati_compatible_0[1], framebuffer);
@@ -705,10 +707,10 @@
devprop_add_value(device, (char *) ati_compatible_1[0], (uint8_t *)tmp, strlen(tmp) + 1);
sprintf(tmp, ati_device_type[1], framebuffer);
- devprop_add_value(device, (char *) ati_device_type[0], (uint8_t *)tmp, strlen(tmp) + 1);
+ devprop_add_value(device, (char *) ati_device_type[0], (uint8_t *)tmp, strlen(tmp) + 1); //Azi: OK!
sprintf(tmp, ati_name[1], framebuffer);
- devprop_add_value(device, (char *) ati_name[0], (uint8_t *)tmp, strlen(tmp) + 1);
+ devprop_add_value(device, (char *) ati_name[0], (uint8_t *)tmp, strlen(tmp) + 1); //Azi: display ??
sprintf(tmp, ati_name_0[1], framebuffer);
devprop_add_value(device, (char *) ati_name_0[0], (uint8_t *)tmp, strlen(tmp) + 1);
@@ -716,67 +718,108 @@
sprintf(tmp, ati_name_1[1], framebuffer);
devprop_add_value(device, (char *) ati_name_1[0], (uint8_t *)tmp, strlen(tmp) + 1);
+ //Azi: Assemble default path for a custom rom...
sprintf(tmp, "bt(0,0)/Extra/%04x_%04x.rom", (uint16_t)ati_dev->vendor_id, (uint16_t)ati_dev->device_id);
+
+ //Azi: if user enabled use of custom rom...
if (getBoolForKey(kUseAtiROMKey, &doit, &bootInfo->bootConfig) && doit) {
- verbose("looking for ati video bios file %s\n", tmp);
+ verbose("Looking for custom ATI rom %s...\n", tmp);
rom = malloc(0x20000);
rom_size = load_ati_bios_file(tmp, rom, 0x20000);
- if (rom_size > 0) {
- verbose("Using ATI Video BIOS File %s (%d Bytes)\n", tmp, rom_size);
+
+ //Azi: if rom exists
+ if (rom_size > 0)
+ {
+ verbose("Using custom rom %s (%d Bytes)\n", tmp, rom_size);
if (rom_size > 0x10000) {
- rom_size = 0x10000; //we dont need rest anyway;
+ rom_size = 0x10000; // we dont need the rest anyway;
+//Azi: verbose("Trimmed %s to %d Bytes\n", tmp, rom_size);
}
- } else {
- printf("ERROR: unable to open ATI Video BIOS File %s\n", tmp);
}
+ else
+ {
+ printf("ERROR: unable to open custom ATI rom %s.\n", tmp);
+ }
}
- if (rom_size == 0) {
- if (boot_display) { // no custom rom
- bios = NULL; // try to dump from legacy space, otherwise can result in 100% fan speed
- } else {
+
+ if (rom_size == 0) //Azi: rom_size is still 0, user didn't enabled use of custom rom...
+ { //Azi: if card posted...
+ if (boot_display) { // no custom rom
+ bios = NULL; // try to dump from legacy space, otherwise can result in 100% fan speed
+// bios = readAtomBIOS(ati_dev); //Azi: Wrong BIOS signature... returns 0 = NULL :-//
+ }
+ else
+ {
// readAtomBios result in bug on some cards (100% fan speed and black screen),
- // not using it for posted card, reading from legacy space instead
+ // not using it for posted card, reading from legacy space instead - Azi: reminder***
bios = readAtomBIOS(ati_dev);
}
- } else {
- bios = rom; //going custom rom way
- verbose("Using rom %s\n", tmp);
}
- if (bios == NULL) {
+ else //Azi: rom_size is diff from 0, user enabled use of custom rom...
+ {
+ bios = rom; //going custom rom way //Azi: shouldn't this be bios = rom_size??*****
+ verbose("Using rom %s\n", tmp); //Azi: print just the path
+ }
+
+ if (bios == NULL) //Azi: card was posted (boot_display = 1)
+ {
bios = (uint8_t *)0x000C0000;
toFree = false;
- verbose("Not going to use bios image file\n");
- } else {
+ verbose("Card posted, not going to use custom bios?? rom.\n"); //Azi: what file? custom rom??
+ }
+ else //Azi: anything but NULL, card wasn't posted (boot_display = 0), bios = readAtomBIOS(ati_dev), bios = rom_size... whatever :P ufff...
+ {
toFree = true;
}
- if (bios[0] == 0x55 && bios[1] == 0xaa) {
+ if (bios[0] == 0x55 && bios[1] == 0xaa) //Azi: check bios for 0xAA55 sig
+ {
verbose("Found bios image\n");
bios_size = bios[2] * 512;
rom_pci_header = (option_rom_pci_header_t*)(bios + bios[24] + bios[25]*256);
+ //Azi: Wrong pci header signature 558a1275 but still works!**** check later...
+ // ‘rom_header’ is used uninitialized in this function...
+// rom_pci_header = (option_rom_pci_header_t *)((uint8_t *)rom_header + rom_header->pci_header_offset);
- if (rom_pci_header->signature == 0x52494350) {
+ if (rom_pci_header->signature == 0x52494350) //Azi: ati pci header sig
+ {
if (rom_pci_header->device_id != ati_dev->device_id) {
verbose("Bios image (%x) doesnt match card (%x), ignoring\n", rom_pci_header->device_id, ati_dev->device_id);
- } else {
- if (toFree)
+ }
+ else
+ {
+ if (toFree) //Azi: card wasn't posted (boot_display = 0)
{
+ //Azi: mmio, Memory-mapped I/O - Kabyl's smbios patcher stuff reminder.
verbose("Adding binimage to card %x from mmio space with size %x\n", ati_dev->device_id, bios_size);
- } else {
+ }
+ else //Azi: card was posted (boot_display = 1)
+ {
+ //Azi: check "legacy space/mmio" stuff again!!!***
verbose("Adding binimage to card %x from legacy space with size %x\n", ati_dev->device_id, bios_size);
}
+ //Azi: not all Mac's have this..!!
devprop_add_value(device, "ATY,bin_image", bios, bios_size);
}
- } else {
+ }
+ else
+ {
+ // ATY,bin_image is not added... not all Mac's have this..!!
verbose("Wrong pci header signature %x\n", rom_pci_header->signature);
}
- } else {
- verbose("Bios image not found at %x, content %x %x\n", bios, bios[0], bios[1]);
}
- if (toFree) {
+ else
+ {
+ verbose("Bios image not found at %x, content %x %x\n", bios, bios[0], bios[1]);
+ }
+
+ if (toFree) //Azi: card wasn't posted (boot_display = 0)
+ {
free(bios);
}
+
+ //Azi: see ati.c AMDge; i have no problems here with xcode 4 compilation ???
stringdata = malloc(sizeof(uint8_t) * string->length);
memcpy(stringdata, (uint8_t*)devprop_generate_string(string), string->length);
stringlength = string->length;
Index: branches/iFabio/Chameleon/i386/modules/AMDGraphicsEnabler/ati.c
===================================================================
--- branches/iFabio/Chameleon/i386/modules/AMDGraphicsEnabler/ati.c (revision 306)
+++ branches/iFabio/Chameleon/i386/modules/AMDGraphicsEnabler/ati.c (revision 307)
@@ -541,6 +541,7 @@
uint8_t *rom;
uint32_t rom_size;
uint32_t vram_size;
+ const char *cfg_name;
uint8_t ports;
uint32_t flags;
bool posted;
@@ -1102,7 +1103,6 @@
static bool init_card(pci_dt_t *pci_dev)
{
- const char *fb_name;
char name[24];
char name_parent[24];
int i;
@@ -1166,25 +1166,25 @@
atN = 0;
- fb_name = getStringForKey(kAtiConfig, &bootInfo->bootConfig);
- if (!fb_name)
+ card->cfg_name = getStringForKey(kAtiConfig, &bootInfo->bootConfig);
+ if (!card->cfg_name)
{
- fb_name = card_configs[card->info->cfg_name].name;
+ card->cfg_name = card_configs[card->info->cfg_name].name;
card->ports = card_configs[card->info->cfg_name].ports;
}
else
{
for (i = 0; i < kCfgEnd; i++)
- if (strcmp(fb_name, card_configs[i].name) == 0)
+ if (strcmp(card->cfg_name, card_configs[i].name) == 0)
card->ports = card_configs[i].ports;
}
- sprintf(name, "ATY,%s", fb_name);
+ sprintf(name, "ATY,%s", card->cfg_name);
aty_name.type = kStr;
aty_name.size = strlen(name) + 1;
aty_name.data = (uint8_t *)name;
- sprintf(name_parent, "ATY,%sParent", fb_name);
+ sprintf(name_parent, "ATY,%sParent", card->cfg_name);
aty_nameparent.type = kStr;
aty_nameparent.size = strlen(name_parent) + 1;
aty_nameparent.data = (uint8_t *)name_parent;
@@ -1231,7 +1231,7 @@
verbose("ATI %s %s %dMB (%s) [%04x:%04x] (subsys [%04x:%04x]):: %s\n",
chip_family_name[card->info->chip_family], card->info->model_name,
- (uint32_t)(card->vram_size / (1024 * 1024)), card_configs[card->info->cfg_name].name,
+ (uint32_t)(card->vram_size / (1024 * 1024)), card->cfg_name,
ati_dev->vendor_id, ati_dev->device_id,
ati_dev->subsys_id.subsys.vendor_id, ati_dev->subsys_id.subsys.device_id,
devicepath);
Index: branches/iFabio/Chameleon/i386/libsa/printf.c
===================================================================
--- branches/iFabio/Chameleon/i386/libsa/printf.c (revision 306)
+++ branches/iFabio/Chameleon/i386/libsa/printf.c (revision 307)
@@ -28,7 +28,8 @@
#include "libsa.h"
-struct putc_info {
+struct putc_info //Azi: same as below
+{
char * str;
char * last_str;
};
Index: branches/iFabio/Chameleon/package/Kexts/AHCIPortInjector.kext/Contents/Info.plist
===================================================================
--- branches/iFabio/Chameleon/package/Kexts/AHCIPortInjector.kext/Contents/Info.plist (revision 306)
+++ branches/iFabio/Chameleon/package/Kexts/AHCIPortInjector.kext/Contents/Info.plist (revision 307)
@@ -375,6 +375,23 @@
Vendor Name
Intel
+ MCP79BAHCI
+
+ CFBundleIdentifier
+ com.apple.driver.AppleAHCIPort
+ Chipset Name
+ MCP79 AHCI
+ IOClass
+ AppleMCP79AHCI
+ IOPCIPrimaryMatch
+ 0x0ab810de
+ IOProbeScore
+ 2000
+ IOProviderClass
+ IOPCIDevice
+ Vendor Name
+ NVidia
+
OSBundleRequired
Local-Root