Jump to content

Clover test and patches for Polaris GPU

CLOVER ATI POLARIS AMD

  • Please log in to reply
250 replies to this topic

#1
fantomas1

fantomas1

    InsanelyMacaholic

  • Supervisors
  • 4,597 posts
  • Gender:Male
THIS TOPIC IS THE RESULT OF VARIUS SPLITTED POST FROM CLOVER GENERAL DISCUSSION

THE MAIN GOAL OF THAT IS KEEP TRACK OF THE RESULT IN THE TEST AND MAYBE FIND POSSIBLE SOLUTION ON THE BOOT HANG WITH POLARIS CARDS WITHOUT THE HELP OF PRIMARY iGPU

ALSO TO KEEP THE CLOVER GENERAL DISCUSSION TOPIC CLEAN...


Other related topic:
AMD Polaris IDs on 10.12 Sierra
10.12 Sierra AMD Framebuffer dump script

 

ErmaC (November, 12 2016)


 

Hi guys  :)
 
A question from a noob: it's about Clover support for Polaris graphics cards
https://sourceforge..../Platform/ati.c (line 277)


  //Polaris
  { 0x67C0,	0x00000000, CHIP_FAMILY_HAWAII,	"AMD Radeon Polaris 10",        kNull	},
  { 0x67DF,	0x00000000, CHIP_FAMILY_HAWAII,	"AMD Radeon RX480",             kNull	},
  { 0x67E0,	0x00000000, CHIP_FAMILY_HAWAII,	"AMD Radeon RX460",             kNull	},
  { 0x67EF,	0x00000000, CHIP_FAMILY_HAWAII,	"AMD Radeon RX460",             kNull	},
  { 0x67FF,	0x00000000, CHIP_FAMILY_HAWAII,	"AMD Radeon Polaris 11",
Shouldn't we have CHIP_FAMILY_POLARIS instead of CHIP_FAMILY_HAWAII???
 
Or maybe CHIP_FAMILY_BAFFIN (for Polaris 11) and CHIP_FAMILY_ELLESMERE (for Polaris 10)???
 
Also, are you sure about RX460 with 0x67E0??? According to AMD  and Linux Kernel Driver DataBase, there's no RX 460 with that device.
 
Here, all known Polaris graphics cards device-ids
 
Spoiler

Edited by ErmaC, 12 November 2016 - 06:39 PM.
Split from Clover general discussion


#2
Ciro82

Ciro82

    Out Of Order

  • Donators
  • 3,211 posts
  • Gender:Male
  • Location:Aosta

Also, are you sure about RX460 with 0x67E0??? According to AMD  and Linux Kernel Driver DataBase, there's no RX 460 with that device.

 

From Linux:

 

+ /* Polaris11 */

+ {0x1002, 0x67E0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS11},
+ {0x1002, 0x67E1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS11},
+ {0x1002, 0x67E8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS11},
+ {0x1002, 0x67E9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS11},
+ {0x1002, 0x67EB, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS11},
+ {0x1002, 0x67FF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS11},
+ /* Polaris10 */
+ {0x1002, 0x67C0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS10},
+ {0x1002, 0x67DF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS10},



#3
fantomas1

fantomas1

    InsanelyMacaholic

  • Supervisors
  • 4,597 posts
  • Gender:Male

From Linux:

 

+ /* Polaris11 */

+ {0x1002, 0x67E0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS11},
+ {0x1002, 0x67E1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS11},
+ {0x1002, 0x67E8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS11},
+ {0x1002, 0x67E9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS11},
+ {0x1002, 0x67EB, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS11},
+ {0x1002, 0x67FF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS11},
+ /* Polaris10 */
+ {0x1002, 0x67C0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS10},
+ {0x1002, 0x67DF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS10},

 

Yes but it does not show the model name   :(

 

EDIT:

 

CHIP_FAMILY_POLARIS10

CHIP_FAMILY_POLARIS11 

 

it sounds good (instead of CHIP_FAMILY_HAWAII).   ;)



#4
Ciro82

Ciro82

    Out Of Order

  • Donators
  • 3,211 posts
  • Gender:Male
  • Location:Aosta

Yes but it does not show the model name   :(

 

Yeah, your list is more accurate ;)

Maybe Mobile models? 



#5
fantomas1

fantomas1

    InsanelyMacaholic

  • Supervisors
  • 4,597 posts
  • Gender:Male

Yeah, your list is more accurate ;)

Maybe Mobile models? 

Probably 



#6
Needy

Needy

    InsanelyMac Geek

  • Coders
  • 231 posts
  • Gender:Male

Yes but it does not show the model name :(

EDIT:

CHIP_FAMILY_POLARIS10
CHIP_FAMILY_POLARIS11

it sounds good (instead of CHIP_FAMILY_HAWAII). ;)


Hello there,

We'll look into your concern.

Best regards.

#7
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,628 posts
  • Gender:Male
  • Location:Moscow

From Linux:

 

+ /* Polaris11 */

+ {0x1002, 0x67E0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS11},
+ {0x1002, 0x67E1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS11},
+ {0x1002, 0x67E8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS11},
+ {0x1002, 0x67E9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS11},
+ {0x1002, 0x67EB, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS11},
+ {0x1002, 0x67FF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS11},
+ /* Polaris10 */
+ {0x1002, 0x67C0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS10},
+ {0x1002, 0x67DF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS10},

Thanks, I will add this to Clover sources when I'll return home.

But I have to notice that it will not influence on macOS, just naming.

For modern cards in Sierra Inject->ATI=false is the best solution.


Hi,

Is it possible with clover to solve this ssdtprgen script warning?

 

Warning: 'system-type' may be set improperly (1 instead of 3)

 

I have also had a cpu warning that I solved in clover adding type parameter for my cpu.

Any advice?

system-type calculated from ModelName in Smbios section of your config.plist.

Set all to default and be happy.

 

PS. I don't use ssdtprgen



#8
fantomas1

fantomas1

    InsanelyMacaholic

  • Supervisors
  • 4,597 posts
  • Gender:Male

@Slice
 

@Slice can you add the 9500controller in ATI.h and ATI.c with related Framebuffers? Please :)

Kext /System/Library/Extensions/AMD9500Controller.kext/Contents/MacOS/AMD9500Controller
Personality: Exmoor
ConnectorInfo count in decimal: 6
Disk offset in decimal 1892144
0000000 02 00 00 00 00 01 00 00 00 01 01 51 00 00 00 00 22 05 02 04 00 00 00 00
0000024 02 00 00 00 00 01 00 00 00 01 02 61 01 00 00 00 12 04 01 03 00 00 00 00
0000048 00 04 00 00 04 03 00 00 00 01 03 43 00 00 00 00 11 02 03 01 00 00 00 00
0000072 00 04 00 00 00 01 00 00 00 01 04 31 00 00 00 00 21 03 05 05 00 00 00 00
0000096 00 04 00 00 04 03 00 00 00 01 05 23 00 00 00 00 10 00 04 02 00 00 00 00
0000120 00 04 00 00 00 01 00 00 00 01 06 11 00 00 00 00 20 01 05 05 00 00 00 00
0000144
Personality: Berbice
ConnectorInfo count in decimal: 5
Disk offset in decimal 1892288
0000000 02 00 00 00 00 01 00 00 39 05 01 08 00 00 00 00 20 01 01 01 00 00 00 00
0000024 00 04 00 00 00 01 00 00 00 01 02 43 00 00 00 00 10 00 02 02 00 00 00 00
0000048 00 04 00 00 04 03 00 00 00 01 03 13 00 00 00 00 21 03 03 03 00 00 00 00
0000072 00 04 00 00 04 03 00 00 00 01 04 53 00 00 00 00 11 02 04 04 00 00 00 00
0000096 00 04 00 00 04 03 00 00 00 01 05 33 00 00 00 00 12 04 05 05 00 00 00 00
0000120
Personality: Elqui
ConnectorInfo count in decimal: 5
Disk offset in decimal 1892416
0000000 02 00 00 00 00 01 00 00 00 01 01 41 00 00 00 00 11 02 02 04 00 00 00 00
0000024 02 00 00 00 00 01 00 00 00 01 02 31 01 00 00 00 21 03 01 03 00 00 00 00
0000048 00 04 00 00 04 03 00 00 00 01 03 03 00 00 00 00 20 01 03 01 00 00 00 00
0000072 00 04 00 00 04 03 00 00 00 01 04 03 00 00 00 00 12 04 04 02 00 00 00 00
0000096 00 04 00 00 04 03 00 00 00 01 05 01 00 00 00 00 10 00 05 05 00 00 00 00
0000120
Personality: Acre
ConnectorInfo count in decimal: 3
Disk offset in decimal 1892640
0000000 00 04 00 00 04 03 00 00 00 01 01 01 00 00 00 00 11 02 02 01 00 00 00 00
0000024 00 08 00 00 04 02 00 00 00 01 02 00 00 00 00 00 21 03 05 04 00 00 00 00
0000048 04 00 00 00 04 02 00 00 00 01 03 00 00 00 00 00 00 00 03 05 00 00 00 00
0000072
Personality: Caroni
ConnectorInfo count in decimal: 5
Disk offset in decimal 1892832
0000000 02 00 00 00 00 01 00 00 00 01 01 41 00 00 00 00 11 02 02 04 00 00 00 00
0000024 02 00 00 00 00 01 00 00 00 01 02 31 01 00 00 00 21 03 01 03 00 00 00 00
0000048 00 04 00 00 04 03 00 00 00 01 03 03 00 00 00 00 20 01 03 01 00 00 00 00
0000072 00 04 00 00 04 03 00 00 00 01 04 03 00 00 00 00 12 04 04 02 00 00 00 00
0000096 00 04 00 00 04 03 00 00 00 01 05 01 00 00 00 00 10 00 05 05 00 00 00 00
0000120
Personality: Florin
ConnectorInfo count in decimal: 6
Disk offset in decimal 1893056
0000000 02 00 00 00 00 01 00 00 00 01 01 41 00 00 00 00 11 02 02 04 00 00 00 00
0000024 02 00 00 00 00 01 00 00 00 01 02 31 01 00 00 00 21 03 01 03 00 00 00 00
0000048 00 04 00 00 04 03 00 00 00 01 03 13 00 00 00 00 20 01 03 01 00 00 00 00
0000072 00 04 00 00 04 03 00 00 00 01 04 21 00 00 00 00 10 00 05 05 00 00 00 00
0000096 00 04 00 00 04 03 00 00 00 01 05 53 00 00 00 00 22 05 04 02 00 00 00 00
0000120 00 04 00 00 04 03 00 00 00 01 06 61 00 00 00 00 12 04 06 06 00 00 00 00
0000144
Personality: Guariba
ConnectorInfo count in decimal: 6
Disk offset in decimal 1893232
0000000 00 04 00 00 04 03 00 00 00 01 01 01 00 00 00 00 12 04 06 01 00 00 00 00
0000024 00 04 00 00 04 03 00 00 00 01 02 01 00 00 00 00 22 05 04 03 00 00 00 00
0000048 00 04 00 00 04 03 00 00 00 01 03 01 00 00 00 00 11 02 01 02 00 00 00 00
0000072 00 08 00 00 04 02 00 00 00 01 04 00 00 00 00 00 21 03 05 04 00 00 00 00
0000096 04 00 00 00 04 02 00 00 00 01 05 00 00 00 00 00 00 00 03 06 00 00 00 00
0000120 00 04 00 00 00 01 00 00 00 01 06 01 00 00 00 00 20 01 02 05 00 00 00 00
0000144
Personality: Dayman
ConnectorInfo count in decimal: 6
Disk offset in decimal 1893376
0000000 00 04 00 00 04 03 00 00 00 01 01 01 00 00 00 00 12 04 06 01 00 00 00 00
0000024 00 04 00 00 04 03 00 00 00 01 02 01 00 00 00 00 22 05 04 03 00 00 00 00
0000048 00 04 00 00 04 03 00 00 00 01 03 01 00 00 00 00 11 02 01 02 00 00 00 00
0000072 00 08 00 00 04 02 00 00 00 01 04 00 00 00 00 00 21 03 05 04 00 00 00 00
0000096 04 00 00 00 04 02 00 00 00 01 05 00 00 00 00 00 00 00 03 06 00 00 00 00
0000120 00 04 00 00 00 01 00 00 00 01 06 01 00 00 00 00 20 01 02 05 00 00 00 00
0000144
Personality: Baladi
ConnectorInfo count in decimal: 6
Disk offset in decimal 1893552
0000000 00 04 00 00 04 03 00 00 00 01 03 00 00 00 00 00 12 04 03 03 00 00 00 00
0000024 00 04 00 00 04 03 00 00 00 01 01 00 00 00 00 00 11 02 01 01 00 00 00 00
0000048 00 04 00 00 04 03 00 00 00 01 02 00 00 00 00 00 21 03 02 02 00 00 00 00
0000072 00 04 00 00 04 03 00 00 00 01 04 00 00 00 00 00 22 05 04 04 00 00 00 00
0000096 00 04 00 00 04 03 00 00 00 01 05 00 00 00 00 00 10 00 05 05 00 00 00 00
0000120 00 04 00 00 04 03 00 00 00 01 06 00 00 00 00 00 20 01 06 06 00 00 00 00
0000144
Personality: OPM
ConnectorInfo count in decimal: 5
Disk offset in decimal 1893696
0000000 00 04 00 00 04 03 00 00 00 00 00 01 00 00 00 00 11 02 02 02 00 00 00 00
0000024 00 04 00 00 04 03 00 00 00 00 00 01 00 00 00 00 21 03 03 03 00 00 00 00
0000048 00 04 00 00 04 03 00 00 00 00 00 01 00 00 00 00 12 04 01 01 00 00 00 00
0000072 00 04 00 00 04 03 00 00 00 00 00 01 00 00 00 00 10 00 04 04 00 00 00 00
0000096 00 04 00 00 04 03 00 00 00 00 00 01 00 00 00 00 20 01 05 05 00 00 00 00
0000120


gif-facteur-6.gif



#9
ErmaC

ErmaC

    127.0.0.1

  • Supervisors
  • 5,246 posts
  • Gender:Male
  • Location:Canary Islands

@Slice

 
 
All the collected info are in this source... anyway...far from get it working
- ati.c
- ati.h
 
-> REMOVED update and info here
 
ErmaC



#10
Mork vom Ork

Mork vom Ork

    InsanelyMac Sage

  • Donators
  • 342 posts
  • Gender:Male
  • Location:Berlin/Germany

I know zero developers trying to understand a problem with some AMD CPU and some chipsets for AMD CPU.

I have no reports and logs about this.

Clover has detection for AMD CPU and uses MSR that is known to work with some AMD CPU. That's all I know about.

Slice,

 

i think, i might know where the problem is - see my Bootlog here:

5:426  0:000  Framebuffer @0xB0000000  MMIO @0xC0000000    I/O Port @0x0000E000 ROM Addr @0xDE740000
5:426  0:000  ATI card POSTed,
5:426  0:000  Set VRAM for Cedar+ = -1Mb        //<--- the value for VRAM readout is NOT correct
5:426  0:000  ATI: get_vram_size returned 0xFFF00000 //<---- but here the Value is correct, it is 4.096 dec.
5:426  0:000  ATI Radeon EVERGREEN family
5:426  0:000  Users config name Acre
5:426  0:000  Use # of ports setting from config.plist: 3
5:426  0:000  (AtiPorts) Nr of ports set to: 3
5:426  0:000  ATI Oland AMD Radeon RX460 -1MB (Acre) [1002:67EF] (subsys [174B:E344]):: PciRoot(0x0)\Pci(0x1,0x0)\Pci(0x0,0x0)
5:426  0:000  Intel Intel HD Graphics 530 [8086:1912] :: PciRoot(0x0)\Pci(0x2,0x0)
5:426  0:000  Intel GFX revision  =0x6
5:426  0:000   RCBA disabled; cannot use it
5:426  0:000  stringlength = 4500
5:426  0:000  CurrentMode: Width=3840 Height=2160
5:426  0:000  Beginning FSInjection
5:426  0:000  Blocking kext caches

might have something to do with this code-snippet within "ATI.c" file here:

//  size in MB on evergreen
//  XXX watch for overflow!!!

    card->vram_size = ((UINT64)REG32(card->mmio, R600_CONFIG_MEMSIZE)) << 20;  //<--- this is the part to readout cards VRAM-size, if no Value for VRAM was set within config.plist
    DBG("Set VRAM for Cedar+ = %dMb\n", (INTN)RShiftU64(card->vram_size, 20));
    } else if (chip_family >= CHIP_FAMILY_R600) {
            card->vram_size = REG32(card->mmio, R600_CONFIG_MEMSIZE);
    } else {
      card->vram_size = REG32(card->mmio, RADEON_CONFIG_MEMSIZE);
      if (card->vram_size == 0) {
        card->vram_size = REG32(card->mmio, RADEON_CONFIG_APER_SIZE);

//  Slice - previously I successfully made Radeon9000 working
//  by writing this register
    
          WRITEREG32(card->mmio, RADEON_CONFIG_MEMSIZE, (UINT32)card->vram_size);
      }
    }
  }
  gSettings.VRAM = card->vram_size;
  DBG("ATI: get_vram_size returned 0x%x\n", card->vram_size);  //<--- and this is the part for correct VRAM size in Bootlog
}

tested it just with an installed RADEON RX460.

i might could test this part also with an installed R9 280x, to see, if VRAM size gets read out correctly with such an installed card <--- if this would be helpfull.

 

If card->vram_size really gets just "-1MB" that might be the problem, why system does not get loaded after verbose boot, cause OS X > 10.9 needs at least more memory than just a minimum of 128MB VRAM.

But please get noticed, that this is just some thoughts, cause i am NO coder - but i can read and compare  ;-) You might give it a try... your choice.

 

EDIT#1:

This is Bootlog with R9 280x installed as main GFX:

7:230  0:000  Framebuffer @0xB0000000  MMIO @0xDE900000    I/O Port @0x0000E000 ROM Addr @0xDE940000
7:230  0:000  ATI card POSTed,
7:230  0:000  Set VRAM for Cedar+ = 3072Mb  //<--- see here, this time VRAM size was correct detected
7:230  0:000  ATI: get_vram_size returned 0xC0000000  //<--- also here correct VRAM size value
7:230  0:000  ATI Radeon EVERGREEN family
7:230  0:000  Users config name Junsai
7:230  0:000  Use # of ports setting from config.plist: 5
7:230  0:000  (AtiPorts) Nr of ports set to: 5
7:230  0:000  ATI Tahiti AMD Radeon HD 7970X/8970/R9 280X 3072MB (Junsai) [1002:6798] (subsys [174B:3000]):: PciRoot(0x0)\Pci(0x1,0x0)\Pci(0x0,0x0)
7:230  0:000   RCBA disabled; cannot use it

so i think, the code has to be modified in some way to get the correct VRAM size from newer cards (like cards with TONGA chipset or newer).

 

EDIT#2:

 

this is Bootlog output when using

		<key>VRAM</key>
		<integer>4096</integer>

within config.plist to determine VRAM size:

12:046  0:000  Framebuffer @0xB0000000  MMIO @0xC0000000    I/O Port @0x0000E000 ROM Addr @0xDE740000
12:046  0:000  ATI card POSTed,
12:046  0:000  Set VRAM from config = 4096Mb  // <--- correct, cause provided by config.plist
12:046  0:000  ATI: get_vram_size returned 0x0  // <--- incorrect, cause code will be ignored (through if...then...else), if VRAM size was set by config.plist
12:046  0:000  ATI Radeon EVERGREEN family
12:046  0:000  Users config name Acre
12:046  0:000  Use # of ports setting from config.plist: 3
12:046  0:000  (AtiPorts) Nr of ports set to: 3
12:046  0:000  ATI Oland AMD Radeon RX460 4096MB (Acre) [1002:67EF] (subsys [174B:E344]):: PciRoot(0x0)\Pci(0x1,0x0)\Pci(0x0,0x0)
12:046  0:000  Intel Intel HD Graphics 530 [8086:1912] :: PciRoot(0x0)\Pci(0x2,0x0)
12:046  0:000  Intel GFX revision  =0x6

Attached you will find the "ati.c" and "ati.h" files, which i i have expanded to contain BAFFIN and ELLESMERE code snippets:

expanded "ati.h" with:

    /* Arctic Islands */    
    CHIP_FAMILY_ELLESMERE, /* Polaris 10 */
    CHIP_FAMILY_BAFFIN,   /* Polaris 11 */
    CHIP_FAMILY_LAST

and

    /* AMD9500Controller */
    kBarbice,
    kElqui,
    kAcre,
    kCaroni,
    kFlorin,
    kGuariba,
    kDayman,
    kCfgEnd

and "ati.c" with:

    /* AMD9500Controller */
    {"Exmoor",    6},
    {"Barbice",   5},
    {"Elqui",     5},
    {"Acre",      3},
    {"Caroni",    5},
    {"Florin",    6},
    {"Guariba",   6},
    {"Dayman",    6},
    {"Baladi",    6},
    {"OPM",       5},

and (in parts)

//  ELLESMERE Polaris 10

    { 0x67C0,    0x00000000, CHIP_FAMILY_ELLESMERE,    "AMD Radeon Polaris 10",    kNull    },
    { 0x67DF,    0x00000000, CHIP_FAMILY_ELLESMERE,    "AMD Radeon RX480",         kNull    },

//  BAFFIN Polaris 11

    { 0x67E0,    0x00000000, CHIP_FAMILY_BAFFIN,    "AMD Radeon Polaris 11",        kNull    },
    { 0x67E1,    0x00000000, CHIP_FAMILY_BAFFIN,    "AMD Radeon Polaris 11",        kNull    },
    { 0x67E8,    0x00000000, CHIP_FAMILY_BAFFIN,    "AMD Radeon Polaris 11",        kNull    },
    { 0x67E9,    0x00000000, CHIP_FAMILY_BAFFIN,    "AMD Radeon Polaris 11",        kNull    },
    { 0x67EB,    0x00000000, CHIP_FAMILY_BAFFIN,    "AMD Radeon Polaris 11",        kNull    },
    { 0x67EF,    0x00000000, CHIP_FAMILY_BAFFIN,    "AMD Radeon RX460",             kAcre    },
    { 0x67FF,    0x00000000, CHIP_FAMILY_BAFFIN,    "AMD Radeon Polaris 11",        kNull    },

also i "cleaned" it a little bit to have a better overview:

Bildschirmfoto2016-11-05um18.01.17.png

Bildschirmfoto2016-11-05um18.03.31.png

Bildschirmfoto2016-11-05um18.03.54.png

and just to be sure: i did NOT change any existing part* or removed any outcommented parts.

 

* except this line:

    { 0x67EF,    0x00000000, CHIP_FAMILY_BAFFIN,    "AMD Radeon RX460",             kAcre    },  //changed "kNULL" to "kAcre" as standard FB for RX460

Attached Files



#11
Mork vom Ork

Mork vom Ork

    InsanelyMac Sage

  • Donators
  • 342 posts
  • Gender:Male
  • Location:Berlin/Germany

About VRAM size problem above <--- i fixed it by changing one line:

//  size in MB on evergreen
//  XXX watch for overflow!!!


//  card->vram_size = ((UINT64)REG32(card->mmio, R600_CONFIG_MEMSIZE)) << 20;   // <--- changed THIS line
    card->vram_size = IoRead32(R600_CONFIG_MEMSIZE) << 20;                      // <--- into THIS line
    DBG("Set VRAM for Cedar+ = %dMb\n", (INTN)RShiftU64(card->vram_size, 20));
    } else if (chip_family <= CHIP_FAMILY_R600) {
            card->vram_size = REG32(card->mmio, R600_CONFIG_MEMSIZE);
    } else {
      card->vram_size = REG32(card->mmio, RADEON_CONFIG_MEMSIZE);
      if (card->vram_size == 0) {
        card->vram_size = REG32(card->mmio, RADEON_CONFIG_APER_SIZE);

//  Slice - previously I successfully made Radeon9000 working
//  by writing this register

and now my Bootlog looks like this:

2:831  0:000  Framebuffer @0xB0000000  MMIO @0xC0000000    I/O Port @0x0000E000 ROM Addr @0xDE740000
2:831  0:000  ATI card POSTed,
2:831  0:000  Set VRAM for Cedar+ = 4095Mb             // <--- correct detected VRAM size here
2:831  0:000  ATI: get_vram_size returned 0xFFF00000   // <--- and here
2:831  0:000  Found generic VBIOS ROM file (1002_67EF.rom)
2:833  0:001  Loaded ROM len=262144
2:833  0:000  Calculated ROM len=58368
2:833  0:000  VideoBIOS read from file
2:833  0:000  ATI Radeon EVERGREEN family
2:833  0:000  Users config name Acre
2:833  0:000  Use # of ports setting from config.plist: 3
2:833  0:000  (AtiPorts) Nr of ports set to: 3
2:833  0:000  ATI Oland AMD Radeon RX460 4095MB (Acre) [1002:67EF] (subsys [174B:E344]):: PciRoot(0x0)\Pci(0x1,0x0)\Pci(0x0,0x0)

I know, it may NOT be the best way to fix it, but ONE way, and for me it works. Maybe someone of the PROs find a better way. Anyway... this change just fixed the VRAM size problem,

NOT the blacksreen after verbose boot with RADEON RX460.

Sorry, was hoping, too , that it may also fix the "blackscreen" problem.



#12
Pavo

Pavo

    InsanelyMac Legend

  • Developers
  • 628 posts
  • Gender:Male
  • Location:Fort Gordon, GA

Slice I have a real Mac Pro 5,1 and able to do any test you may need to fix this gpu issue that everyone seems to be having, I have 7970, 290X and RX 480 to test if needed. Just let me know what you need



#13
ErmaC

ErmaC

    127.0.0.1

  • Supervisors
  • 5,246 posts
  • Gender:Male
  • Location:Canary Islands

About VRAM size problem above <--- i fixed it by changing one line:
Sorry, was hoping, too , that it may also fix the "blackscreen" problem.


Hi Mork von Ork

just to be sure that I understand what you are try to do... (I try to help)
(PS I don't have this hardware... I mean ATi/AMD to test myself...)

So...
I use the latest Clover 3905 sources with the ATI changes that I post few "post" ago with you tiny change of today...
... with respect of your change made yesterday there is some duplicated in the card_configs...

can you test this? (pls the logs are very useful)

-> removed... new one in the next post

 

also... one things... are you using a FAKE id? (maybe I lost where you mention it...)

but looking at you output I see this

2:833  0:000  ATI Oland AMD Radeon RX460 4095MB (Acre) [1002:67EF] (subsys [174B:E344]):: PciRoot(0x0)\Pci(0x1,0x0)\Pci(0x0,0x0)

Oland?????

 

the oland card we have in the source are this:

Spoiler

 

ErmaC



#14
Mork vom Ork

Mork vom Ork

    InsanelyMac Sage

  • Donators
  • 342 posts
  • Gender:Male
  • Location:Berlin/Germany

@ErmaC

 

same effect: no initialization of RX460 w/o helper card (IGPU in my case). Still boots to BlackScreen after verbose boot.

 

but now ELLESMERE gets detected correctly in BootLog:

4:806  0:000  Framebuffer @0xB0000000  MMIO @0xC0000000    I/O Port @0x0000E000 ROM Addr @0xDE740000
4:806  0:000  ATI card POSTed,
4:806  0:000  Set VRAM for Cedar+ =4095Mb
4:806  0:000  ATI: get_vram_size returned 0xFFF00000
4:806  0:000  ATI Radeon EVERGREEN family
4:806  0:000  Users config name Acre
4:806  0:000   use N ports setting from config.plist: 3
4:806  0:000  (AtiPorts) Nr of ports set to: 3
4:806  0:000  ATI Ellesmere AMD Radeon RX460 4095MB (Acre) [1002:67EF] (subsys [174B:E344]):: PciRoot(0x0)\Pci(0x1,0x0)\Pci(0x0,0x0)

Have to check one of my files: ati.c or ati.h for that OLAND output.

No FakeID here - i completly let CLOVER detect device-id, vendor-id and subsystem-id:

Bildschirmfoto2016-11-06um19.02.55.png

see "Arbitrary" is outcommented, so that old "inject"-Method should work.



#15
ErmaC

ErmaC

    127.0.0.1

  • Supervisors
  • 5,246 posts
  • Gender:Male
  • Location:Canary Islands
4:806  0:000  Users config name Acre
4:806  0:000   use N ports setting from config.plist: 3
4:806  0:000  (AtiPorts) Nr of ports set to: 3
4:806  0:000  ATI Ellesmere AMD Radeon RX460 4095MB (Acre) [1002:67EF] (subsys [174B:E344]):: PciRoot(0x0)\Pci(0x1,0x0)\Pci(0x0,0x0)

 
pls try also removing the port number in config.plist
because ithe "logic" automatically set the number of port to 3 (acre =3)

 { 0x67EF, 0x00000000, CHIP_FAMILY_BAFFIN, "AMD Radeon RX460",             kAcre },

your device have already set the correct number of port (so no need to set it in the config)

{"Acre", 3},

but now ELLESMERE gets detected correctly in BootLog:

 

I made some error...

yep ELLESMERE is now detect but your card is a BAFFIN...

I will check the list probably I forgot some CHIP_FAMILY...

 

EDIT:

YES I forgot to add a family chip...

this one is correct. (I mean the chip family for your card)

-> removed new one posted

ErmaC



#16
gengik84

gengik84

    InsanelyMac Top V.I.P.

  • Moderators
  • 14,563 posts
  • Gender:Male
  • Location:Toscana

@Ermac

Bios setting: primary PCIe

With FakeID

Black screen again... :(  :wallbash:

 

Test RX-480



#17
ErmaC

ErmaC

    127.0.0.1

  • Supervisors
  • 5,246 posts
  • Gender:Male
  • Location:Canary Islands

@Ermac

Bios setting: primary PCIe

With FakeID

Black screen again... :(  :wallbash:

 

Test RX-480

 

@gengik84

 

I only try to fix the memory size and chip family (+ port number)

set the primary GFX is another story for now...

 

In the same way as Mork vom Ork set your gfx card in a way where you are able to boot and post the logs

 

ErmaC 



#18
Mork vom Ork

Mork vom Ork

    InsanelyMac Sage

  • Donators
  • 342 posts
  • Gender:Male
  • Location:Berlin/Germany

@ErmaC:

 

removed the entry for "VideoPorts" in config.plist. <--- but CLOVER still defaults to 6 ports for the RX460 (which only have 3 ports: DP, HDMI and DVI).

All other values have been detected as expected so far, even "CHIP_FAMILY_BAFFIN" :thumbsup_anim:

 

About the Portdetection ithink we have to look at this part of the code:

//  use cfg_name on radeon_cards, to retrive the default name from card_configs,
        card->cfg_name = card_configs[card->info->cfg_name].name;
        n_ports = card_configs[card->info->cfg_name].ports;        // <--- # of ports declared here (declared through  detection?)
        
//  which means one of the fb's or kNull
        DBG("Framebuffer set to device's default: %a\n", card->cfg_name);
    DBG(" N ports defaults to %d\n", n_ports);
  }
 
  if (gSettings.VideoPorts != 0) {                                  // <--- part, when # of Ports provided by config.plist
    n_ports = gSettings.VideoPorts;
    DBG("Use # of ports setting from config.plist: %d\n", n_ports);
  }
 
    if (n_ports > 0) {                                              // <--- part, when # of Ports NOT provided by config.plist, then try to detect through CLOVER
        card->ports = (UINT8)n_ports; // use it.
        DBG("(AtiPorts) Nr of ports set to: %d\n", card->ports);
  } else {
    
//      if (card->cfg_name > 0) // do we want 0 ports if fb is kNull or mistyped ?
//      else, match cfg_name with card_configs list and retrive default nr of ports.
        for (i = 0; i < kCfgEnd; i++) {
            if (AsciiStrCmp(card->cfg_name, card_configs[i].name) == 0) {
                card->ports = card_configs[i].ports; // default
      }
    }
        
        DBG("Nr of ports set to framebuffer's default: %d\n", card->ports);
    }
 
  if (card->ports == 0) {
    card->ports = 2; //real minimum
    DBG("Nr of ports set to min: %d\n", card->ports);
  }


#19
fantomas1

fantomas1

    InsanelyMacaholic

  • Supervisors
  • 4,597 posts
  • Gender:Male

but CLOVER still defaults to 6 ports for the RX460 (which only have 3 ports: DP, HDMI and DVI).

 

remove also "FB Name" entry if it is not empty.



#20
ErmaC

ErmaC

    127.0.0.1

  • Supervisors
  • 5,246 posts
  • Gender:Male
  • Location:Canary Islands

removed the entry for "VideoPorts" in config.plist. <--- but CLOVER still defaults to 6 ports for the RX460 (which only have 3 ports: DP, HDMI and DVI).
All other values have been detected as expected so far, even "CHIP_FAMILY_BAFFIN" :thumbsup_anim:


remove also "FB Name" entry if it is not empty.

of course this also is important no 'missed' value have to interfere...
 
Can you post the log with this?
 
-> Attached File  CLOVER_3905_ATI_V4.zip   599.79KB   22 downloads
 
setting in config and w/o setting in config..
 
pls
 
ErmaC






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users

© 2017 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy