Index: branches/azimutz/trunkGraphicsEnablerModules/i386/modules/GraphicsEnabler/ATiGraphicsEnabler/ati.c =================================================================== --- branches/azimutz/trunkGraphicsEnablerModules/i386/modules/GraphicsEnabler/ATiGraphicsEnabler/ati.c (revision 1334) +++ branches/azimutz/trunkGraphicsEnablerModules/i386/modules/GraphicsEnabler/ATiGraphicsEnabler/ati.c (revision 1335) @@ -39,6 +39,7 @@ #endif #define kUseAtiROMKey "UseAtiROM" +#define kAtiConfig "AtiConfig" #define MAX_NUM_DCB_ENTRIES 16 @@ -46,212 +47,363 @@ extern uint32_t devices_number; -const char *ati_compatible_0[] = { "@0,compatible", "ATY,%s" }; -const char *ati_compatible_1[] = { "@1,compatible", "ATY,%s" }; -const char *ati_device_type_0[] = { "@0,device_type", "display" }; -const char *ati_device_type_1[] = { "@1,device_type", "display" }; -const char *ati_device_type[] = { "device_type", "ATY,%sParent" }; -const char *ati_name_0[] = { "@0,name", "ATY,%s" }; -const char *ati_name_1[] = { "@1,name", "ATY,%s" }; -const char *ati_name[] = { "name", "ATY,%sParent" }; -const char *ati_efidisplay_0[] = { "@0,ATY,EFIDisplay", "TMDSB" }; -struct ati_data_key ati_connector_type_0 = { 0x04, "@0,connector-type", {0x00, 0x04, 0x00, 0x00} }; -struct ati_data_key ati_connector_type_1 = { 0x04, "@1,connector-type", {0x04, 0x00, 0x00, 0x00} }; -struct ati_data_key ati_display_con_fl_type_0 = { 0x04, "@0,display-connect-flags", {0x00, 0x00, 0x04, 0x00} }; -const char *ati_display_type_0[] = { "@0,display-type", "LCD" }; -const char *ati_display_type_1[] = { "@1,display-type", "NONE" }; -struct ati_data_key ati_aux_power_conn = { 0x04, "AAPL,aux-power-connected", {0x01, 0x00, 0x00, 0x00} }; -struct ati_data_key ati_backlight_ctrl = { 0x04, "AAPL,backlight-control", {0x00, 0x00, 0x00, 0x00} }; -struct ati_data_key ati_aapl01_coher = { 0x04, "AAPL01,Coherency", {0x01, 0x00, 0x00, 0x00} }; -const char *ati_card_no[] = { "ATY,Card#", "109-B77101-00" }; -const char *ati_copyright[] = { "ATY,Copyright", "Copyright AMD Inc. All Rights Reserved. 2005-2009" }; -const char *ati_efi_compile_d[] = { "ATY,EFICompileDate", "Jan 26 2009" }; -struct ati_data_key ati_efi_disp_conf = { 0x08, "ATY,EFIDispConfig", {0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01} }; -struct ati_data_key ati_efi_drv_type = { 0x01, "ATY,EFIDriverType", {0x02} }; -struct ati_data_key ati_efi_enbl_mode = { 0x01, "ATY,EFIEnabledMode", {0x01} }; -struct ati_data_key ati_efi_init_stat = { 0x04, "ATY,EFIHWInitStatus", {0x00, 0x00, 0x00, 0x00} }; -struct ati_data_key ati_efi_orientation = { 0x02, "ATY,EFIOrientation", {0x02, 0x00} }; -const char *ati_efi_version[] = { "ATY,EFIVersion", "01.00.318" }; -const char *ati_efi_versionB[] = { "ATY,EFIVersionB", "113-SBSJ1G04-00R-02" }; -const char *ati_efi_versionE[] = { "ATY,EFIVersionE", "113-B7710A-318" }; -struct ati_data_key ati_mclk = { 0x04, "ATY,MCLK", {0x70, 0x2e, 0x11, 0x00} }; -struct ati_data_key ati_mem_rev_id = { 0x02, "ATY,MemRevisionID", {0x03, 0x00} }; -struct ati_data_key ati_mem_vend_id = { 0x02, "ATY,MemVendorID", {0x02, 0x00} }; -const char *ati_mrt[] = { "ATY,MRT", " " }; -const char *ati_romno[] = { "ATY,Rom#", "113-B7710C-176" }; -struct ati_data_key ati_sclk = { 0x04, "ATY,SCLK", {0x28, 0xdb, 0x0b, 0x00} }; -struct ati_data_key ati_vendor_id = { 0x02, "ATY,VendorID", {0x02, 0x10} }; -struct ati_data_key ati_platform_info = { 0x80, "ATY,PlatformInfo", {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, 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, 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, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }; -struct ati_data_key ati_mvad = { 0x40, "MVAD", {0x3f, 0x5c, 0x82, 0x02, 0xff, 0x90, 0x00, 0x54, 0x60, 0x00, 0xac, 0x10, 0xa0, 0x17, 0x00, 0x03, 0xb0, 0x68, 0x00, 0x0a, 0xa0, 0x0a, 0x30, 0x00, 0x20, 0x00, 0x40, 0x06, 0x6e, 0x06, 0x03, 0x00, 0x06, 0x00, 0x40, 0x06, 0x00, 0x0a, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x10, 0x06, 0x92, 0x20, 0x00, 0x03} }; -struct ati_data_key ati_saved_config = { 0x100, "saved-config", {0x3f, 0x5c, 0x82, 0x02, 0xff, 0x90, 0x00, 0x54, 0x60, 0x00, 0xac, 0x10, 0xa0, 0x17, 0x00, 0x03, 0xb0, 0x68, 0x00, 0x0a, 0xa0, 0x0a, 0x30, 0x00, 0x20, 0x00, 0x40, 0x06, 0x6e, 0x06, 0x03, 0x00, 0x06, 0x00, 0x40, 0x06, 0x00, 0x0a, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x10, 0x06, 0x92, 0x20, 0x00, 0x03, 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, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xee, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x31, 0x30, 0x50, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x32, 0x32, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 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, 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, 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, 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, 0x00, 0x00, 0x00, 0x00} }; -///non 48xx keys -const char *ati_efidisplay_0_n4[] = { "@0,ATY,EFIDisplay", "TMDSA" }; -struct ati_data_key ati_connector_type_0_n4 = { 0x04, "@0,connector-type", {0x04, 0x00, 0x00, 0x00} }; -struct ati_data_key ati_connector_type_1_n4 = { 0x04, "@1,connector-type", {0x00, 0x02, 0x00, 0x00} }; -struct ati_data_key ati_aapl_emc_disp_list_n4 = { 0x40, "AAPL,EMC-Display-List", {0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x00, 0x00, 0x1b, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x00, 0x00, 0x1c, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x00, 0x00, 0x21, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }; -struct ati_data_key ati_fb_offset_n4 = { 0x08, "ATY,FrameBufferOffset", {0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00} }; -struct ati_data_key ati_hwgpio_n4 = { 0x04, "ATY,HWGPIO", {0x23, 0xa8, 0x48, 0x00} }; -struct ati_data_key ati_iospace_offset_n4 = { 0x08, "ATY,IOSpaceOffset", {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00} }; -struct ati_data_key ati_mclk_n4 = { 0x04, "ATY,MCLK", {0x00, 0x35, 0x0c, 0x00} }; -struct ati_data_key ati_sclk_n4 = { 0x04, "ATY,SCLK", {0x60, 0xae, 0x0a, 0x00} }; -struct ati_data_key ati_refclk_n4 = { 0x04, "ATY,RefCLK", {0x8c, 0x0a, 0x00, 0x00} }; -struct ati_data_key ati_regspace_offset_n4 = { 0x08, "ATY,RegisterSpaceOffset", {0x00, 0x00, 0x00, 0x00, 0x90, 0xa2, 0x00, 0x00} }; -struct ati_data_key ati_vram_memsize_0 = { 0x08, "@0,VRAM,memsize", {0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00} }; -struct ati_data_key ati_vram_memsize_1 = { 0x08, "@1,VRAM,memsize", {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }; -struct ati_data_key ati_aapl_blackscr_prefs_0_n4= { 0x04, "AAPL00,blackscreen-preferences", {0x00, 0x00, 0x00, 0x00} }; -struct ati_data_key ati_aapl_blackscr_prefs_1_n4= { 0x04, "AAPL01,blackscreen-preferences", {0x00, 0x00, 0x00, 0x00} }; -struct ati_data_key ati_swgpio_info_n4 = { 0x04, "ATY,SWGPIO Info", {0x00, 0x48, 0xa8, 0x23} }; -struct ati_data_key ati_efi_orientation_n4 = { 0x01, "ATY,EFIOrientation", {0x08} }; -struct ati_data_key ati_mvad_n4 = { 0x100, "MVAD", {0x3e, 0x5c, 0x82, 0x00, 0xff, 0x90, 0x00, 0xf6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x3c, 0x80, 0x07, 0x20, 0x08, 0x30, 0x00, 0x20, 0x00, 0xb0, 0x04, 0xd3, 0x04, 0x03, 0x00, 0x06, 0x00, 0xb0, 0x04, 0x80, 0x07, 0x00, 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, 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, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x90, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x31, 0x30, 0x50, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x32, 0x32, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 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, 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, 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, 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, 0x00, 0x00, 0x00, 0x00} }; -struct ati_data_key ati_saved_config_n4 = { 0x100, "saved-config", {0x3e, 0x5c, 0x82, 0x00, 0xff, 0x90, 0x00, 0xf6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x3c, 0x80, 0x07, 0x20, 0x08, 0x30, 0x00, 0x20, 0x00, 0xb0, 0x04, 0xd3, 0x04, 0x03, 0x00, 0x06, 0x00, 0xb0, 0x04, 0x80, 0x07, 0x00, 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, 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, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x90, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x31, 0x30, 0x50, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x32, 0x32, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 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, 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, 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, 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, 0x00, 0x00, 0x00, 0x00} }; +// ====================//==================== +// properties +// "@" +const char *ati_name_0[] = { "@0,name", "ATY,%s" }; +const char *ati_name_1[] = { "@1,name", "ATY,%s" }; +const char *ati_device_type_0[] = { "@0,device_type", "display" }; +const char *ati_device_type_1[] = { "@1,device_type", "display" }; +const char *ati_compatible_0[] = { "@0,compatible", "ATY,%s" }; +const char *ati_compatible_1[] = { "@1,compatible", "ATY,%s" }; +const char *ati_efidisplay_0[] = { "@0,ATY,EFIDisplay", "TMDSB" }; +const char *ati_display_type_0[] = { "@0,display-type", "LCD" }; +const char *ati_display_type_1[] = { "@1,display-type", "NONE" }; + +// no "@" +const char *ati_name[] = { "name", "ATY,%sParent" }; +const char *ati_device_type[] = { "device_type", "ATY,%sParent" }; +const char *ati_card_no[] = { "ATY,Card#", "109-B77101-00" }; +const char *ati_copyright[] = { "ATY,Copyright", "Copyright AMD Inc. All Rights Reserved. 2005-2009" }; +const char *ati_efi_compile_d[] = { "ATY,EFICompileDate", "Jan 26 2009" }; +const char *ati_efi_version[] = { "ATY,EFIVersion", "01.00.318" }; +const char *ati_efi_versionB[] = { "ATY,EFIVersionB", "113-SBSJ1G04-00R-02" }; +const char *ati_efi_versionE[] = { "ATY,EFIVersionE", "113-B7710A-318" }; +const char *ati_mrt[] = { "ATY,MRT", " " }; +const char *ati_romno[] = { "ATY,Rom#", "113-B7710C-176" }; +// non 48xx key ??? +const char *ati_efidisplay_0_n4[] = { "@0,ATY,EFIDisplay", "TMDSA" }; + +// =====//===== + +// ati_data_key "@" +struct ati_data_key ati_connector_type_0 = { 0x04, "@0,connector-type", {0x00, 0x04, 0x00, 0x00} }; +struct ati_data_key ati_connector_type_1 = { 0x04, "@1,connector-type", {0x04, 0x00, 0x00, 0x00} }; +struct ati_data_key ati_display_con_fl_type_0 = { 0x04, "@0,display-connect-flags", {0x00, 0x00, 0x04, 0x00} }; +// non 48xx keys ??? +struct ati_data_key ati_connector_type_0_n4 = { 0x04, "@0,connector-type", {0x04, 0x00, 0x00, 0x00} }; +struct ati_data_key ati_connector_type_1_n4 = { 0x04, "@1,connector-type", {0x00, 0x02, 0x00, 0x00} }; +struct ati_data_key ati_vram_memsize_0 = { 0x08, "@0,VRAM,memsize", {0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00} }; +struct ati_data_key ati_vram_memsize_1 = { 0x08, "@1,VRAM,memsize", {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }; + +// no "@" +struct ati_data_key ati_aux_power_conn = { 0x04, "AAPL,aux-power-connected", {0x01, 0x00, 0x00, 0x00} }; +struct ati_data_key ati_backlight_ctrl = { 0x04, "AAPL,backlight-control", {0x00, 0x00, 0x00, 0x00} }; +struct ati_data_key ati_aapl01_coher = { 0x04, "AAPL01,Coherency", {0x01, 0x00, 0x00, 0x00} }; +struct ati_data_key ati_efi_disp_conf = { 0x08, "ATY,EFIDispConfig", {0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01} }; +struct ati_data_key ati_efi_drv_type = { 0x01, "ATY,EFIDriverType", {0x02} }; +struct ati_data_key ati_efi_enbl_mode = { 0x01, "ATY,EFIEnabledMode", {0x01} }; +struct ati_data_key ati_efi_init_stat = { 0x04, "ATY,EFIHWInitStatus", {0x00, 0x00, 0x00, 0x00} }; +struct ati_data_key ati_efi_orientation = { 0x02, "ATY,EFIOrientation", {0x02, 0x00} }; +struct ati_data_key ati_mclk = { 0x04, "ATY,MCLK", {0x70, 0x2e, 0x11, 0x00} }; +struct ati_data_key ati_mem_rev_id = { 0x02, "ATY,MemRevisionID", {0x03, 0x00} }; +struct ati_data_key ati_mem_vend_id = { 0x02, "ATY,MemVendorID", {0x02, 0x00} }; +struct ati_data_key ati_sclk = { 0x04, "ATY,SCLK", {0x28, 0xdb, 0x0b, 0x00} }; +struct ati_data_key ati_vendor_id = { 0x02, "ATY,VendorID", {0x02, 0x10} }; + +struct ati_data_key ati_platform_info = { 0x80, "ATY,PlatformInfo", + {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, 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, 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, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }; + +struct ati_data_key ati_mvad = { 0x40, "MVAD", + {0x3f, 0x5c, 0x82, 0x02, 0xff, 0x90, 0x00, 0x54, 0x60, 0x00, 0xac, 0x10, 0xa0, 0x17, 0x00, 0x03, 0xb0, 0x68, 0x00, 0x0a, + 0xa0, 0x0a, 0x30, 0x00, 0x20, 0x00, 0x40, 0x06, 0x6e, 0x06, 0x03, 0x00, 0x06, 0x00, 0x40, 0x06, 0x00, 0x0a, 0x10, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x10, 0x06, + 0x92, 0x20, 0x00, 0x03} }; + +struct ati_data_key ati_saved_config = { 0x100, "saved-config", + {0x3f, 0x5c, 0x82, 0x02, 0xff, 0x90, 0x00, 0x54, 0x60, 0x00, 0xac, 0x10, 0xa0, 0x17, 0x00, 0x03, 0xb0, 0x68, 0x00, 0x0a, + 0xa0, 0x0a, 0x30, 0x00, 0x20, 0x00, 0x40, 0x06, 0x6e, 0x06, 0x03, 0x00, 0x06, 0x00, 0x40, 0x06, 0x00, 0x0a, 0x10, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x10, 0x06, + 0x92, 0x20, 0x00, 0x03, 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, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x02, 0xee, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x31, 0x30, 0x50, 0x44, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x32, 0x32, 0x32, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x02, 0x05, 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, 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, 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, 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, 0x00, 0x00, 0x00, 0x00} }; +// non 48xx keys ??? +struct ati_data_key ati_fb_offset_n4 = { 0x08, "ATY,FrameBufferOffset", {0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00} }; +struct ati_data_key ati_hwgpio_n4 = { 0x04, "ATY,HWGPIO", {0x23, 0xa8, 0x48, 0x00} }; +struct ati_data_key ati_iospace_offset_n4 = { 0x08, "ATY,IOSpaceOffset", {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00} }; +struct ati_data_key ati_mclk_n4 = { 0x04, "ATY,MCLK", {0x00, 0x35, 0x0c, 0x00} }; +struct ati_data_key ati_sclk_n4 = { 0x04, "ATY,SCLK", {0x60, 0xae, 0x0a, 0x00} }; +struct ati_data_key ati_refclk_n4 = { 0x04, "ATY,RefCLK", {0x8c, 0x0a, 0x00, 0x00} }; +struct ati_data_key ati_regspace_offset_n4 = { 0x08, "ATY,RegisterSpaceOffset", {0x00, 0x00, 0x00, 0x00, 0x90, 0xa2, 0x00, 0x00} }; +struct ati_data_key ati_aapl_blackscr_prefs_0_n4 = { 0x04, "AAPL00,blackscreen-preferences", {0x00, 0x00, 0x00, 0x00} }; +struct ati_data_key ati_aapl_blackscr_prefs_1_n4 = { 0x04, "AAPL01,blackscreen-preferences", {0x00, 0x00, 0x00, 0x00} }; +struct ati_data_key ati_swgpio_info_n4 = { 0x04, "ATY,SWGPIO Info", {0x00, 0x48, 0xa8, 0x23} }; +struct ati_data_key ati_efi_orientation_n4 = { 0x01, "ATY,EFIOrientation", {0x08} }; + +struct ati_data_key ati_aapl_emc_disp_list_n4 = { 0x40, "AAPL,EMC-Display-List", + {0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x00, 0x00, + 0x1b, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x00, 0x00, 0x1c, 0x92, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x00, 0x00, 0x21, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00} }; + +struct ati_data_key ati_mvad_n4 = { 0x100, "MVAD", + {0x3e, 0x5c, 0x82, 0x00, 0xff, 0x90, 0x00, 0xf6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x3c, 0x80, 0x07, + 0x20, 0x08, 0x30, 0x00, 0x20, 0x00, 0xb0, 0x04, 0xd3, 0x04, 0x03, 0x00, 0x06, 0x00, 0xb0, 0x04, 0x80, 0x07, 0x00, 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, 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, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x02, 0x90, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x31, 0x30, 0x50, 0x44, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x32, 0x32, 0x32, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x02, 0x05, 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, 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, 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, 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, 0x00, 0x00, 0x00, 0x00} }; + +struct ati_data_key ati_saved_config_n4 = { 0x100, "saved-config", + {0x3e, 0x5c, 0x82, 0x00, 0xff, 0x90, 0x00, 0xf6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x3c, 0x80, 0x07, + 0x20, 0x08, 0x30, 0x00, 0x20, 0x00, 0xb0, 0x04, 0xd3, 0x04, 0x03, 0x00, 0x06, 0x00, 0xb0, 0x04, 0x80, 0x07, 0x00, 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, 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, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x02, 0x90, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x31, 0x30, 0x50, 0x44, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x32, 0x32, 0x32, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x02, 0x05, 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, 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, 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, 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, 0x00, 0x00, 0x00, 0x00} }; + +// ====================//==================== + +/* ??? struct pcir_s { uint32_t signature; uint16_t vid; uint16_t devid; +};*/ + +static struct ati_chipsets_t ATIChipsets[] = { + { 0x00000000, "Unknown" }, +// ===================================================== + { 0x10027181, "ATI Radeon X1600 Series" }, // Azi + { 0x10027183, "ATI Radeon X1550 Series" }, // Beej + { 0x10027187, "ATI Radeon X1300 Series" }, // Mckibble + { 0x100271C5, "ATI Mobility Radeon X1600" }, // Darles, Derc - looks like it's a no go ?? + { 0x100271D4, "ATI Mobility FireGL V5250" }, // Downlord - ?? +// ===================================================== + { 0x10029589, "ATI Radeon 2600 Series" }, + { 0x10029588, "ATI Radeon 2600 Series" }, + { 0x100294C3, "ATI Radeon 2400 Series" }, + { 0x100294C4, "ATI Radeon 2400 Series" }, + { 0x100294C6, "ATI Radeon 2400 Series" }, + { 0x10029400, "ATI Radeon 2900 Series" }, + { 0x10029405, "ATI Radeon 2900GT Series" }, + { 0x10029581, "ATI Radeon 2600 Series" }, + { 0x10029583, "ATI Radeon 2600 Series" }, + { 0x10029586, "ATI Radeon 2600 Series" }, + { 0x10029587, "ATI Radeon 2600 Series" }, + { 0x100294C9, "ATI Radeon 2400 Series" }, + { 0x10029501, "ATI Radeon 3800 Series" }, + { 0x10029505, "ATI Radeon 3800 Series" }, + { 0x10029515, "ATI Radeon 3800 Series" }, + { 0x10029507, "ATI Radeon 3800 Series" }, + { 0x10029500, "ATI Radeon 3800 Series" }, + { 0x1002950F, "ATI Radeon 3800X2 Series" }, + { 0x100295C5, "ATI Radeon 3400 Series" }, + { 0x100295C7, "ATI Radeon 3400 Series" }, + { 0x100295C0, "ATI Radeon 3400 Series" }, + { 0x10029596, "ATI Radeon 3600 Series" }, + { 0x10029590, "ATI Radeon 3600 Series" }, + { 0x10029599, "ATI Radeon 3600 Series" }, + { 0x10029597, "ATI Radeon 3600 Series" }, + { 0x10029598, "ATI Radeon 3600 Series" }, + { 0x10029442, "ATI Radeon 4850 Series" }, + { 0x10029440, "ATI Radeon 4870 Series" }, + { 0x1002944C, "ATI Radeon 4830 Series" }, + { 0x10029460, "ATI Radeon 4890 Series" }, + { 0x10029462, "ATI Radeon 4890 Series" }, + { 0x10029441, "ATI Radeon 4870X2 Series" }, + { 0x10029443, "ATI Radeon 4850X2 Series" }, + { 0x10029444, "ATI Radeon 4800 Series" }, + { 0x10029446, "ATI Radeon 4800 Series" }, + { 0x1002944E, "ATI Radeon 4730 Series" }, + { 0x10029450, "ATI Radeon 4800 Series" }, + { 0x10029452, "ATI Radeon 4800 Series" }, + { 0x10029456, "ATI Radeon 4800 Series" }, + { 0x1002944A, "ATI Radeon 4800 Mobility Series" }, + { 0x1002945A, "ATI Radeon 4800 Mobility Series" }, + { 0x1002945B, "ATI Radeon 4800 Mobility Series" }, + { 0x1002944B, "ATI Radeon 4800 Mobility Series" }, + { 0x10029490, "ATI Radeon 4670 Series" }, + { 0x10029498, "ATI Radeon 4650 Series" }, + { 0x10029490, "ATI Radeon 4600 Series" }, + { 0x10029498, "ATI Radeon 4600 Series" }, + { 0x1002949E, "ATI Radeon 4600 Series" }, + { 0x10029480, "ATI Radeon 4600 Series" }, + { 0x10029488, "ATI Radeon 4600 Series" }, + { 0x10029540, "ATI Radeon 4500 Series" }, + { 0x10029541, "ATI Radeon 4500 Series" }, + { 0x1002954E, "ATI Radeon 4500 Series" }, + { 0x10029552, "ATI Radeon 4300 Mobility Series" }, + { 0x10029553, "ATI Radeon 4500 Mobility Series" }, + { 0x1002954F, "ATI Radeon 4300 Series" }, + { 0x100294B3, "ATI Radeon 4770 Series" }, + { 0x100294B5, "ATI Radeon 4770 Series" }, + { 0x100268B8, "ATI Radeon 5700 Series" }, + { 0x100268BE, "ATI Radeon 5700 Series" }, + { 0x10026898, "ATI Radeon 5800 Series" }, + { 0x10026899, "ATI Radeon 5800 Series" } }; -// Known cards as of 2008/08/26 -static struct ati_chipsets_t ATIKnownChipsets[] = { - { 0x00000000, "Unknown" }, - { 0x10027181, "ATI Radeon X1600 Series" }, - { 0x10027183, "ATI Radeon X1550 Series" }, - { 0x10027187, "ATI Radeon X1300 Series" }, - { 0x100271C5, "ATI Mobility Radeon X1600" }, - { 0x100271D4, "ATI Mobility FireGL V5250" }, - - { 0x10029589, "ATI Radeon 2600 Series"} , - { 0x10029588, "ATI Radeon 2600 Series"} , - { 0x100294C3, "ATI Radeon 2400 Series"} , - { 0x100294C4, "ATI Radeon 2400 Series"} , - { 0x100294C6, "ATI Radeon 2400 Series"} , - { 0x10029400, "ATI Radeon 2900 Series"} , - { 0x10029405, "ATI Radeon 2900GT Series"} , - { 0x10029581, "ATI Radeon 2600 Series"} , - { 0x10029583, "ATI Radeon 2600 Series"} , - { 0x10029586, "ATI Radeon 2600 Series"} , - { 0x10029587, "ATI Radeon 2600 Series"} , - { 0x100294C9, "ATI Radeon 2400 Series"} , - { 0x10029501, "ATI Radeon 3800 Series"} , - { 0x10029505, "ATI Radeon 3800 Series"} , - { 0x10029515, "ATI Radeon 3800 Series"} , - { 0x10029507, "ATI Radeon 3800 Series"} , - { 0x10029500, "ATI Radeon 3800 Series"} , - { 0x1002950F, "ATI Radeon 3800X2 Series"} , - { 0x100295C5, "ATI Radeon 3400 Series"} , - { 0x100295C7, "ATI Radeon 3400 Series"} , - { 0x100295C0, "ATI Radeon 3400 Series"} , - { 0x10029596, "ATI Radeon 3600 Series"} , - { 0x10029590, "ATI Radeon 3600 Series"} , - { 0x10029599, "ATI Radeon 3600 Series"} , - { 0x10029597, "ATI Radeon 3600 Series"} , - { 0x10029598, "ATI Radeon 3600 Series"} , - { 0x10029442, "ATI Radeon 4850 Series"} , - { 0x10029440, "ATI Radeon 4870 Series"} , - { 0x1002944C, "ATI Radeon 4830 Series"} , - { 0x10029460, "ATI Radeon 4890 Series"} , - { 0x10029462, "ATI Radeon 4890 Series"} , - { 0x10029441, "ATI Radeon 4870X2 Series"} , - { 0x10029443, "ATI Radeon 4850X2 Series"} , - { 0x10029444, "ATI Radeon 4800 Series"} , - { 0x10029446, "ATI Radeon 4800 Series"} , - { 0x1002944E, "ATI Radeon 4730 Series"} , - { 0x10029450, "ATI Radeon 4800 Series"} , - { 0x10029452, "ATI Radeon 4800 Series"} , - { 0x10029456, "ATI Radeon 4800 Series"} , - { 0x1002944A, "ATI Radeon 4800 Mobility Series"} , - { 0x1002945A, "ATI Radeon 4800 Mobility Series"} , - { 0x1002945B, "ATI Radeon 4800 Mobility Series"} , - { 0x1002944B, "ATI Radeon 4800 Mobility Series"} , - { 0x10029490, "ATI Radeon 4670 Series"} , - { 0x10029498, "ATI Radeon 4650 Series"} , - { 0x10029490, "ATI Radeon 4600 Series"} , - { 0x10029498, "ATI Radeon 4600 Series"} , - { 0x1002949E, "ATI Radeon 4600 Series"} , - { 0x10029480, "ATI Radeon HD 4650M" }, // akbar - { 0x10029488, "ATI Radeon 4600 Series"} , - { 0x10029540, "ATI Radeon 4500 Series"} , - { 0x10029541, "ATI Radeon 4500 Series"} , - { 0x1002954E, "ATI Radeon 4500 Series"} , - { 0x10029552, "ATI Radeon 4300 Mobility Series"} , - { 0x10029553, "ATI Radeon 4500 Mobility Series"} , - { 0x1002954F, "ATI Radeon 4300 Series"} , - { 0x100294B3, "ATI Radeon 4770 Series"} , - { 0x100294B5, "ATI Radeon 4770 Series"} , - { 0x100268B8, "ATI Radeon 5700 Series"} , - { 0x100268BE, "ATI Radeon 5700 Series"} , - { 0x10026898, "ATI Radeon 5800 Series"} , - { 0x10026899, "ATI Radeon 5800 Series"} +// <= 10.6.7 +static struct ati_chipsets_t ATIFramebuffers_pre[] = { + { 0x00000000, "Megalodon" }, +// ============================= + { 0x10027181, "Megalodon" }, +/* { 0x10027183, "Caretta" }, + { 0x10027187, "Caretta" }, + { 0x100271C5, "Wormy" }, // ?? + { 0x100271D4, "Wormy" }, // ??*/ +// ============================= + { 0x10029589, "Lamna" }, + { 0x10029588, "Lamna" }, + { 0x100294C3, "Iago" }, + { 0x100294C4, "Iago" }, + { 0x100294C6, "Iago" }, + { 0x10029400, "Franklin" }, + { 0x10029405, "Franklin" }, + { 0x10029581, "Hypoprion" }, + { 0x10029583, "Hypoprion" }, + { 0x10029586, "Hypoprion" }, + { 0x10029587, "Hypoprion" }, + { 0x100294C9, "Iago" }, + { 0x10029501, "Megalodon" }, + { 0x10029505, "Megalodon" }, + { 0x10029515, "Megalodon" }, + { 0x10029507, "Megalodon" }, + { 0x10029500, "Megalodon" }, + { 0x1002950F, "Triakis" }, + { 0x100295C5, "Iago" }, + { 0x100295C7, "Iago" }, + { 0x100295C0, "Iago" }, + { 0x10029596, "Megalodon" }, + { 0x10029590, "Megalodon" }, + { 0x10029599, "Megalodon" }, + { 0x10029597, "Megalodon" }, + { 0x10029598, "Megalodon" }, + { 0x10029442, "Motmot" }, + { 0x10029440, "Motmot" }, + { 0x1002944C, "Motmot" }, + { 0x10029460, "Motmot" }, + { 0x10029462, "Motmot" }, + { 0x10029441, "Motmot" }, + { 0x10029443, "Motmot" }, + { 0x10029444, "Motmot" }, + { 0x10029446, "Motmot" }, + { 0x1002944E, "Motmot" }, + { 0x10029450, "Motmot" }, + { 0x10029452, "Motmot" }, + { 0x10029456, "Motmot" }, + { 0x1002944A, "Motmot" }, + { 0x1002945A, "Motmot" }, + { 0x1002945B, "Motmot" }, + { 0x1002944B, "Motmot" }, + { 0x10029490, "Peregrine" }, + { 0x10029498, "Peregrine" }, + { 0x1002949E, "Peregrine" }, + { 0x10029480, "Peregrine" }, + { 0x10029488, "Peregrine" }, + { 0x10029540, "Peregrine" }, + { 0x10029541, "Peregrine" }, + { 0x1002954E, "Peregrine" }, + { 0x10029552, "Peregrine" }, + { 0x10029553, "Peregrine" }, + { 0x1002954F, "Peregrine" }, + { 0x100294B3, "Peregrine" }, + { 0x100294B5, "Peregrine" }, + { 0x100268B8, "Motmot" }, + { 0x100268BE, "Motmot" }, + { 0x10026898, "Motmot" }, + { 0x10026899, "Motmot" } }; -static struct ati_chipsets_t ATIKnownFramebuffers[] = { - { 0x00000000, "Megalodon" }, - { 0x10027181, "Caretta" }, - { 0x10027183, "Caretta" }, - { 0x10027187, "Caretta" }, - { 0x100271C5, "Wormy" }, - { 0x100271D4, "Wormy" }, - - { 0x10029589, "Lamna"} , - { 0x10029588, "Lamna"} , - { 0x100294C3, "Iago"} , - { 0x100294C4, "Iago"} , - { 0x100294C6, "Iago"} , - { 0x10029400, "Franklin"} , - { 0x10029405, "Franklin"} , - { 0x10029581, "Hypoprion"} , - { 0x10029583, "Hypoprion"} , - { 0x10029586, "Hypoprion"} , - { 0x10029587, "Hypoprion"} , - { 0x100294C9, "Iago"} , - { 0x10029501, "Megalodon"} , - { 0x10029505, "Megalodon"} , - { 0x10029515, "Megalodon"} , - { 0x10029507, "Megalodon"} , - { 0x10029500, "Megalodon"} , - { 0x1002950F, "Triakis"} , - { 0x100295C5, "Iago"} , - { 0x100295C7, "Iago"} , - { 0x100295C0, "Iago"} , - { 0x10029596, "Megalodon"} , - { 0x10029590, "Megalodon"} , - { 0x10029599, "Megalodon"} , - { 0x10029597, "Megalodon"} , - { 0x10029598, "Megalodon"} , - { 0x10029442, "Motmot"} , - { 0x10029440, "Motmot"} , - { 0x1002944C, "Motmot"} , - { 0x10029460, "Motmot"} , - { 0x10029462, "Motmot"} , - { 0x10029441, "Motmot"} , - { 0x10029443, "Motmot"} , - { 0x10029444, "Motmot"} , - { 0x10029446, "Motmot"} , - { 0x1002944E, "Motmot"} , - { 0x10029450, "Motmot"} , - { 0x10029452, "Motmot"} , - { 0x10029456, "Motmot"} , - { 0x1002944A, "Motmot"} , - { 0x1002945A, "Motmot"} , - { 0x1002945B, "Motmot"} , - { 0x1002944B, "Motmot"} , - { 0x10029490, "Peregrine"} , - { 0x10029498, "Peregrine"} , - { 0x1002949E, "Peregrine"} , - { 0x10029480, "Gliff" }, // Peregrine <= 10.6.7 - { 0x10029488, "Peregrine"} , - { 0x10029540, "Peregrine"} , - { 0x10029541, "Peregrine"} , - { 0x1002954E, "Peregrine"} , - { 0x10029552, "Peregrine"} , - { 0x10029553, "Peregrine"} , - { 0x1002954F, "Peregrine"} , - { 0x100294B3, "Peregrine"}, - { 0x100294B5, "Peregrine"}, - { 0x100268B8, "Motmot"}, - { 0x100268BE, "Motmot"}, - { 0x10026898, "Motmot"}, - { 0x10026899, "Motmot"} +// >= 10.6.8 +static struct ati_chipsets_t ATIFramebuffers_post[] = { + { 0x00000000, "Megalodon" }, +// ============================= + { 0x10027181, "Caretta" }, + { 0x10027183, "Caretta" }, + { 0x10027187, "Caretta" }, + { 0x100271C5, "Wormy" }, // ?? + { 0x100271D4, "Wormy" }, // ?? +// ============================= +/* { 0x10029589, "Lamna" }, + { 0x10029588, "Lamna" }, + { 0x100294C3, "Iago" }, + { 0x100294C4, "Iago" }, + { 0x100294C6, "Iago" }, + { 0x10029400, "Franklin" }, + { 0x10029405, "Franklin" }, + { 0x10029581, "Hypoprion" }, + { 0x10029583, "Hypoprion" }, + { 0x10029586, "Hypoprion" }, + { 0x10029587, "Hypoprion" }, + { 0x100294C9, "Iago" }, + { 0x10029501, "Megalodon" }, + { 0x10029505, "Megalodon" }, + { 0x10029515, "Megalodon" }, + { 0x10029507, "Megalodon" }, + { 0x10029500, "Megalodon" }, + { 0x1002950F, "Triakis" }, + { 0x100295C5, "Iago" }, + { 0x100295C7, "Iago" }, + { 0x100295C0, "Iago" }, + { 0x10029596, "Megalodon" }, + { 0x10029590, "Megalodon" }, + { 0x10029599, "Megalodon" }, + { 0x10029597, "Megalodon" }, + { 0x10029598, "Megalodon" }, + { 0x10029442, "Motmot" }, + { 0x10029440, "Motmot" }, + { 0x1002944C, "Motmot" }, + { 0x10029460, "Motmot" }, + { 0x10029462, "Motmot" }, + { 0x10029441, "Motmot" }, + { 0x10029443, "Motmot" }, + { 0x10029444, "Motmot" }, + { 0x10029446, "Motmot" }, + { 0x1002944E, "Motmot" }, + { 0x10029450, "Motmot" }, + { 0x10029452, "Motmot" }, + { 0x10029456, "Motmot" }, + { 0x1002944A, "Motmot" }, + { 0x1002945A, "Motmot" }, + { 0x1002945B, "Motmot" }, + { 0x1002944B, "Motmot" }, + { 0x10029490, "Peregrine" }, + { 0x10029498, "Peregrine" }, + { 0x1002949E, "Peregrine" },*/ + { 0x10029480, "Gliff" }//, Akbar +/* { 0x10029488, "Peregrine" }, + { 0x10029540, "Peregrine" }, + { 0x10029541, "Peregrine" }, + { 0x1002954E, "Peregrine" }, + { 0x10029552, "Peregrine" }, + { 0x10029553, "Peregrine" }, + { 0x1002954F, "Peregrine" }, + { 0x100294B3, "Peregrine" }, + { 0x100294B5, "Peregrine" }, + { 0x100268B8, "Motmot" }, + { 0x100268BE, "Motmot" }, + { 0x10026898, "Motmot" }, + { 0x10026899, "Motmot" }*/ }; static uint32_t accessROM(pci_dt_t *ati_dev, unsigned int mode) @@ -355,7 +507,7 @@ } #define AVIVO_D1CRTC_CONTROL 0x6080 -#define AVIVO_CRTC_EN (1<<0) +#define AVIVO_CRTC_EN (1<<0) #define AVIVO_D2CRTC_CONTROL 0x6880 static bool radeon_card_posted(pci_dt_t *ati_dev) @@ -418,24 +570,45 @@ { int i; - for (i = 0; i < (sizeof(ATIKnownChipsets) / sizeof(ATIKnownChipsets[0])); i++) { - if (ATIKnownChipsets[i].device == id) { - return ATIKnownChipsets[i].name; + for (i = 0; i < (sizeof(ATIChipsets) / sizeof(ATIChipsets[0])); i++) { + if (ATIChipsets[i].device == id) { + return ATIChipsets[i].name; } } - return ATIKnownChipsets[0].name; + return ATIChipsets[0].name; } static char *get_ati_fb(uint32_t id) { int i; - for (i = 0; i < (sizeof(ATIKnownFramebuffers) / sizeof(ATIKnownFramebuffers[0])); i++) { - if (ATIKnownFramebuffers[i].device == id) { - return ATIKnownFramebuffers[i].name; + // limit patch to Snow & Lion explicitly!? + if ((gMacOSVersion[3] == '6') && (gMacOSVersion[5] >= '8')) + { + for (i = 0; i < (sizeof(ATIFramebuffers_post) / sizeof(ATIFramebuffers_post[0])); i++) + { + if (ATIFramebuffers_post[i].device == id) + { + verbose("Framebuffer ( >= 10.6.8): %s\n", ATIFramebuffers_post[i].name); + return ATIFramebuffers_post[i].name; + } } + verbose("Framebuffer (default post): %s\n", ATIFramebuffers_post[0].name); + return ATIFramebuffers_post[0].name; } - return ATIKnownFramebuffers[0].name; + else + { + for (i = 0; i < (sizeof(ATIFramebuffers_pre) / sizeof(ATIFramebuffers_pre[0])); i++) + { + if (ATIFramebuffers_pre[i].device == id) + { + verbose("Framebuffer ( <= 10.6.7): %s\n", ATIFramebuffers_pre[i].name); + return ATIFramebuffers_pre[i].name; + } + } + verbose("Framebuffer (default): %s\n", ATIFramebuffers_pre[0].name); + return ATIFramebuffers_pre[0].name; + } } static int devprop_add_iopciconfigspace(struct DevPropDevice *device, pci_dt_t *ati_dev) @@ -630,13 +803,12 @@ return 1; } - bool setup_ati_devprop(pci_dt_t *ati_dev) { struct DevPropDevice *device; char *devicepath; char *model; - char *framebuffer; + const char *framebuffer; char tmp[64]; uint8_t *rom = NULL; uint32_t rom_size = 0; @@ -648,9 +820,9 @@ uint8_t cmd; bool doit; bool toFree; - + devicepath = get_pci_dev_path(ati_dev); - + cmd = pci_config_read8(ati_dev->dev.addr, 4); verbose("old pci command - %x\n", cmd); if (cmd == 0) { @@ -658,9 +830,19 @@ 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); + framebuffer = getStringForKey(kAtiConfig, &bootInfo->bootConfig); + + if (framebuffer == 0) + { + framebuffer = get_ati_fb((ati_dev->vendor_id << 16) | ati_dev->device_id); + } + else + { + verbose("(AtiConfig) Framebuffer set to: %s\n", framebuffer); + } + if (!string) { string = devprop_create_string(); } Property changes on: branches/azimutz/trunkGraphicsEnablerModules ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r1309-1333