Index: branches/slice/trunkM/i386/libsaio/Makefile =================================================================== --- branches/slice/trunkM/i386/libsaio/Makefile (revision 1178) +++ branches/slice/trunkM/i386/libsaio/Makefile (revision 1179) @@ -38,7 +38,7 @@ fake_efi.o ext2fs.o \ hpet.o dram_controllers.o spd.o usb.o pci_setup.o \ device_inject.o nvidia.o ati.o gma.o pci_root.o \ - convert.o aml_generator.o console.o + convert.o aml_generator.o console.o exfat.o LIBS = libsaio.a LIBS := $(addprefix $(SYMROOT)/, $(LIBS)) Index: branches/slice/trunkM/i386/libsaio/gma.c =================================================================== --- branches/slice/trunkM/i386/libsaio/gma.c (revision 1178) +++ branches/slice/trunkM/i386/libsaio/gma.c (revision 1179) @@ -16,34 +16,35 @@ #endif #if DEBUG_GMA -#define DBG(x...) printf(x) +#define DBG(x...) verbose(x) #else #define DBG(x...) #endif - - -uint8_t GMAX3100_vals[22][4] = { - { 0x01,0x00,0x00,0x00 }, - { 0x01,0x00,0x00,0x00 }, - { 0x01,0x00,0x00,0x00 }, - { 0x00,0x00,0x00,0x08 }, - { 0x64,0x00,0x00,0x00 }, - { 0x00,0x00,0x00,0x08 }, - { 0x01,0x00,0x00,0x00 }, - { 0x20,0x00,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x01,0x00,0x00,0x00 }, - { 0x20,0x03,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x08,0x52,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x01,0x00,0x00,0x00 }, - { 0x01,0x00,0x00,0x00 }, - { 0x3B,0x00,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 } +//Slice - correct all values, still not sure +uint8_t GMAX3100_vals[23][4] = { + { 0x01,0x00,0x00,0x00 }, //0 "AAPL,HasPanel" + { 0x01,0x00,0x00,0x00 }, //1 "AAPL,SelfRefreshSupported" + { 0x01,0x00,0x00,0x00 }, //2 "AAPL,aux-power-connected" + { 0x01,0x00,0x00,0x08 }, //3 "AAPL,backlight-control" + { 0x00,0x00,0x00,0x00 }, //4 "AAPL00,blackscreen-preferences" + { 0x56,0x00,0x00,0x08 }, //5 "AAPL01,BacklightIntensity" + { 0x00,0x00,0x00,0x00 }, //6 "AAPL01,blackscreen-preferences" + { 0x01,0x00,0x00,0x00 }, //7 "AAPL01,DataJustify" + { 0x20,0x00,0x00,0x00 }, //8 "AAPL01,Depth" + { 0x01,0x00,0x00,0x00 }, //9 "AAPL01,Dither" + { 0x20,0x03,0x00,0x00 }, //10 "AAPL01,Height" + { 0x00,0x00,0x00,0x00 }, //11 "AAPL01,Interlace" + { 0x00,0x00,0x00,0x00 }, //12 "AAPL01,Inverter" + { 0x08,0x52,0x00,0x00 }, //13 "AAPL01,InverterCurrent" + { 0x00,0x00,0x00,0x00 }, //14 "AAPL01,LinkFormat" + { 0x00,0x00,0x00,0x00 }, //15 "AAPL01,LinkType" + { 0x01,0x00,0x00,0x00 }, //16 "AAPL01,Pipe" + { 0x01,0x00,0x00,0x00 }, //17 "AAPL01,PixelFormat" + { 0x01,0x00,0x00,0x00 }, //18 "AAPL01,Refresh" + { 0x3B,0x00,0x00,0x00 }, //19 "AAPL01,Stretch" + { 0xc8,0x95,0x00,0x00 }, //20 "AAPL01,InverterFrequency" + { 0x6B,0x10,0x00,0x00 }, //21 "subsystem-vendor-id" + { 0xA2,0x00,0x00,0x00 } //22 "subsystem-id" }; uint8_t reg_TRUE[] = { 0x01, 0x00, 0x00, 0x00 }; @@ -131,29 +132,33 @@ } else if (model == (char *)"GMAX3100") { - devprop_add_value(device, "AAPL,HasPanel", GMAX3100_vals[0], 4); - devprop_add_value(device, "AAPL,SelfRefreshSupported", GMAX3100_vals[1], 4); - devprop_add_value(device, "AAPL,aux-power-connected", GMAX3100_vals[2], 4); - devprop_add_value(device, "AAPL,backlight-control", GMAX3100_vals[3], 4); - devprop_add_value(device, "AAPL00,blackscreen-preferences", GMAX3100_vals[4], 4); - devprop_add_value(device, "AAPL01,BacklightIntensity", GMAX3100_vals[5], 4); - devprop_add_value(device, "AAPL01,blackscreen-preferences", GMAX3100_vals[6], 4); - devprop_add_value(device, "AAPL01,DataJustify", GMAX3100_vals[7], 4); - devprop_add_value(device, "AAPL01,Depth", GMAX3100_vals[8], 4); - devprop_add_value(device, "AAPL01,Dither", GMAX3100_vals[9], 4); - devprop_add_value(device, "AAPL01,DualLink", GMAX3100_vals[10], 4); - devprop_add_value(device, "AAPL01,Height", GMAX3100_vals[11], 4); - devprop_add_value(device, "AAPL01,Interlace", GMAX3100_vals[12], 4); - devprop_add_value(device, "AAPL01,Inverter", GMAX3100_vals[13], 4); - devprop_add_value(device, "AAPL01,InverterCurrent", GMAX3100_vals[14], 4); - devprop_add_value(device, "AAPL01,InverterCurrency", GMAX3100_vals[15], 4); - devprop_add_value(device, "AAPL01,LinkFormat", GMAX3100_vals[16], 4); - devprop_add_value(device, "AAPL01,LinkType", GMAX3100_vals[17], 4); - devprop_add_value(device, "AAPL01,Pipe", GMAX3100_vals[18], 4); - devprop_add_value(device, "AAPL01,PixelFormat", GMAX3100_vals[19], 4); - devprop_add_value(device, "AAPL01,Refresh", GMAX3100_vals[20], 4); - devprop_add_value(device, "AAPL01,Stretch", GMAX3100_vals[21], 4); + BuiltIn = gDualLink; + devprop_add_value(device, "AAPL,HasPanel",GMAX3100_vals[0], 4); + devprop_add_value(device, "AAPL,SelfRefreshSupported",GMAX3100_vals[1], 4); + devprop_add_value(device, "AAPL,aux-power-connected",GMAX3100_vals[2], 4); + devprop_add_value(device, "AAPL,backlight-control",GMAX3100_vals[3], 4); + devprop_add_value(device, "AAPL00,blackscreen-preferences",GMAX3100_vals[4], 4); + devprop_add_value(device, "AAPL01,BacklightIntensity",GMAX3100_vals[5], 4); + devprop_add_value(device, "AAPL01,blackscreen-preferences",GMAX3100_vals[6], 4); + devprop_add_value(device, "AAPL01,DataJustify",GMAX3100_vals[7], 4); + devprop_add_value(device, "AAPL01,Depth",GMAX3100_vals[8], 4); + devprop_add_value(device, "AAPL01,Dither",GMAX3100_vals[9], 4); + devprop_add_value(device, "AAPL01,DualLink", &BuiltIn, 1); //GMAX3100_vals[10] + devprop_add_value(device, "AAPL01,Height",GMAX3100_vals[10], 4); + devprop_add_value(device, "AAPL01,Interlace",GMAX3100_vals[11], 4); + devprop_add_value(device, "AAPL01,Inverter",GMAX3100_vals[12], 4); + devprop_add_value(device, "AAPL01,InverterCurrent",GMAX3100_vals[13], 4); +// devprop_add_value(device, "AAPL01,InverterCurrency",GMAX3100_vals[15], 4); + devprop_add_value(device, "AAPL01,LinkFormat",GMAX3100_vals[14], 4); + devprop_add_value(device, "AAPL01,LinkType",GMAX3100_vals[15], 4); + devprop_add_value(device, "AAPL01,Pipe",GMAX3100_vals[16], 4); + devprop_add_value(device, "AAPL01,PixelFormat",GMAX3100_vals[17], 4); + devprop_add_value(device, "AAPL01,Refresh",GMAX3100_vals[18], 4); + devprop_add_value(device, "AAPL01,Stretch",GMAX3100_vals[19], 4); + devprop_add_value(device, "AAPL01,InverterFrequency",GMAX3100_vals[20], 4); devprop_add_value(device, "class-code", ClassFix, 4); + devprop_add_value(device, "subsystem-vendor-id", GMAX3100_vals[21], 4); + devprop_add_value(device, "subsystem-id", GMAX3100_vals[22], 4); } stringdata = malloc(sizeof(uint8_t) * string->length); Index: branches/slice/trunkM/i386/libsaio/ntfs.c =================================================================== --- branches/slice/trunkM/i386/libsaio/ntfs.c (revision 1178) +++ branches/slice/trunkM/i386/libsaio/ntfs.c (revision 1179) @@ -26,6 +26,11 @@ #include "libsaio.h" #include "sl.h" +/* + * dmazar, 14/7/2011 - support for EXFAT volume label reading + */ +#include "exfat.h" + #define BYTE_ORDER_MARK 0xFEFF #include "ntfs_private.h" @@ -191,6 +196,11 @@ */ if (memcmp((const char *)boot->bf_sysid, "NTFS ", 8) != 0) { + /* + * Check for EXFAT. Finish by jumping to error to free buf, + * although if it is EXFAT then it's no an error. + */ + EXFATGetDescription(ih, str, strMaxLen); goto error; } @@ -316,8 +326,10 @@ boot = (struct bootfile *) buf; // Check for NTFS signature - if ( memcmp((void*)boot->bf_sysid, NTFS_BBID, NTFS_BBIDLEN) != 0 ) - return -1; + if ( memcmp((void*)boot->bf_sysid, NTFS_BBID, NTFS_BBIDLEN) != 0 ) { + // If not NTFS, maybe it is EXFAT + return EXFATGetUUID(ih, uuidStr); + } // Check for non-null volume serial number if( !boot->bf_volsn ) @@ -340,5 +352,9 @@ if (strncmp((const char *)part_bootfile->bf_sysid, NTFS_BBID, NTFS_BBIDLEN) == 0) result = true; + // If not NTFS, maybe it is EXFAT + if (!result) + result = EXFATProbe(buffer); + return result; } Index: branches/slice/trunkM/i386/libsaio/nvidia.c =================================================================== --- branches/slice/trunkM/i386/libsaio/nvidia.c (revision 1178) +++ branches/slice/trunkM/i386/libsaio/nvidia.c (revision 1179) @@ -60,7 +60,7 @@ #endif #if DEBUG_NVIDIA -#define DBG(x...) printf(x) +#define DBG(x...) verbose(x) #else #define DBG(x...) #endif @@ -83,7 +83,11 @@ const char *nvidia_name_1[] = { "@1,name", "NVDA,Display-B" }; const char *nvidia_slot_name[] = { "AAPL,slot-name", "Slot-1" }; -static uint8_t default_NVCAP[]= { +static uint8_t display_cfg_0[]= {0x03, 0x01, 0x03, 0x00}; +static uint8_t display_cfg_1[]= {0xff, 0xff, 0x00, 0x01}; + + +uint8_t default_NVCAP[]= { 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00 @@ -91,9 +95,14 @@ #define NVCAP_LEN ( sizeof(default_NVCAP) / sizeof(uint8_t) ) -static uint8_t default_dcfg_0[] = {0xff, 0xff, 0xff, 0xff}; -static uint8_t default_dcfg_1[] = {0xff, 0xff, 0xff, 0xff}; +static uint8_t default_NVPM[]= { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 +}; +#define NVPM_LEN ( sizeof(default_NVPM) / sizeof(uint8_t) ) #define DCFG0_LEN ( sizeof(default_dcfg_0) / sizeof(uint8_t) ) #define DCFG1_LEN ( sizeof(default_dcfg_1) / sizeof(uint8_t) ) @@ -864,14 +873,13 @@ static int patch_nvidia_rom(uint8_t *rom) { if (!rom || (rom[0] != 0x55 && rom[1] != 0xaa)) { - printf("False ROM signature: 0x%02x%02x\n", rom[0], rom[1]); + verbose("False ROM signature: 0x%02x%02x\n", rom[0], rom[1]); return PATCH_ROM_FAILED; } uint16_t dcbptr = swap16(read16(rom, 0x36)); - - if (!dcbptr) { - printf("no dcb table found\n"); + if(!dcbptr) { + verbose("no dcb table found\n"); return PATCH_ROM_FAILED; } // else @@ -1239,6 +1247,8 @@ bar[0] = pci_config_read32(nvda_dev->dev.addr, 0x10 ); regs = (uint8_t *) (bar[0] & ~0x0f); + delay(50); + // get card type nvCardType = (REG32(0) >> 20) & 0x1ff; @@ -1453,6 +1463,7 @@ devprop_add_nvidia_template(device); devprop_add_value(device, "NVCAP", default_NVCAP, NVCAP_LEN); + devprop_add_value(device, "NVPM", default_NVPM, NVPM_LEN); devprop_add_value(device, "VRAM,totalsize", (uint8_t*)&videoRam, 4); devprop_add_value(device, "model", (uint8_t*)model, strlen(model) + 1); devprop_add_value(device, "rom-revision", (uint8_t*)biosVersion, strlen(biosVersion) + 1); Index: branches/slice/trunkM/revision =================================================================== --- branches/slice/trunkM/revision (revision 1178) +++ branches/slice/trunkM/revision (revision 1179) @@ -1 +1 @@ -1171 \ No newline at end of file +1174:1175 \ No newline at end of file