## MI50 Bios Flash guide ## Things to know before you install # This only works on the 32gb version of the Radeon Instinct MI50, and doing this on the 16gb version will result in bricking your GPU. There are already a lot of guides on flashing the 16gb version so you should use that instead # This only works on the 32gb version of the Radeon Instinct MI50, and doing this on the 16gb version will result in bricking your GPU. There are already a lot of guides on flashing the 16gb version so you should use that instead # This only works on the 32gb version of the Radeon Instinct MI50, and doing this on the 16gb version will result in bricking your GPU. There are already a lot of guides on flashing the 16gb version so you should use that instead - There are multiple rom options that can be flashed, but searching on Chinese forums using a translator, they say that the v420 rom should be the best since it has support for UEFI, ReBAR, display output in Windows, and has support for PCIE 4. While the other options such as the Apple rom lacks some features and is less stable, so there is no reason to run the other version of the bios unless it's specifically needed. - If you don't need video output and don't know how to flash the bios, you can use rdn-id driver(https://rdn-id.com/) on Windows. You can run it without flashing the bios, but display output won't be available so if you don't have another GPU, you won't be able to boot unless you have a server motherboard. ## Host Environment - Linux install - ASPM options related to PCI should be off in Bios. Some options may work, so you'll need to do some trial and error - Above 4g Decoding should be on - CSM related options should be off - It's recommended to have ReBAR on, but on my Z690 Hero/Core i5-14600K/96gb DDR5 @5200Mhz CL38/3x SSD having 2x MI50 + Arc B580 gave me d4 "pci resource allocation error"(1x MI50 + Arc B580/ 2x MI50 / 2x MI50 + GTX1070(No support for ReBAR) posted without error) and wouldn't post no matter what I did(removing all SSDs, turning off SATA/other onboard devices, locking PCIE version to 3/4, resetting the Bios, etc), so I had to turn ReBAR off(see https://rog-forum.asus.com/t5/intel-700-600-series/d4-q-code/td-p/1098366). - Bios file for the AMD Radeon Pro V420 - AMDVBFlash software ## Download links for the necessary files V420 Bios: https://drive.google.com/file/d/1AQlbrnsafzrFXaliV5narZpsJqvfZkft/view?usp=sharing - The size of the Bios should be 1.0MB, unlike the Bios from Techpowerup, which is less than half in size. AMDVBFlash: https://www.techpowerup.com/download/ati-atiflash/ - The version I used is v4.71 ## Getting ready - After installing Linux(Ubuntu in this case), download AMDVBFlash. - Extract the file and cd into the extracted folder. ``` cd /EXTRACTED-FOLDER ``` - Edit the permission so that it can be executed. ``` sudo chmod +x ./amdvbflash ``` - List current installed AMD GPUs. ``` sudo ./amdvbflash -ai ``` - Output example ``` Adapter 0 SEG=0000, BN=07, DN=00, PCIID=66A11002, SSID=********) Asic Family : Vega20 Flash Type : GD25Q80C (1024 KB) Product Name : Vega20 A1 SERVER XL D16317 Hynix/Samsung 32GB 8HI Bios Config File : D1631700.111 Bios P/N : 113-D1631700-111 Bios Version : 016.004.000.056.013522 Bios Date : 01/16/20 21:38 ROM Image Type : Legacy Images ROM Image Details : Image[0]: Size(41984 Bytes), Type(Legacy Image) ``` - Backup the original Bios ``` sudo ./amdvbflash -s 0 originalvbios.rom ``` - If you have multiple AMD GPUs, the number '0' should be replaced with the Adapter number of the MI50. - Output ``` 0x100000 bytes saved, checksum-=0x382B ``` - After executing the command, backup the original Bios. - Unlock the ROM ``` sudo ./amdvbflash -unlockrom 0 ``` - Output ``` ROM Unlocked ``` ## Flashing the Bios - Download the V420 Bios, copy the file to the AMDVBFlash folder, and change the name to something simple, such as v420.bin # Flashing the Bios can possibly brick your GPU, so do it at your own risk!! Check the command before executing it # Flashing the Bios can possibly brick your GPU, so do it at your own risk!! Check the command before executing it # Flashing the Bios can possibly brick your GPU, so do it at your own risk!! Check the command before executing it # Flashing the Bios can possibly brick your GPU, so do it at your own risk!! Check the command before executing it # Flashing the Bios can possibly brick your GPU, so do it at your own risk!! Check the command before executing it ``` sudo ./amdvbflash -f -p #GPU_ID #FILE_NAME ``` - Example ``` sudo ./amdvbflash -f -p 0 v420.bin ``` - Output example ``` Old SSID: 0834 New SSID: 081E Old P/N: 113-D1631700-111 New P/N: 113-D1640200-043 The result of RSA signature verify is PASS. Old DeviceID: 66A1 New DeviceID: 66A0 Old Product Name: Vega20 A1 SERVER XL D16317 Hynix/Samsung 32GB 8HI New Product Name: Vega20 A1 GLXT WS D16402 32GB 8HI 1000m Old BIOS Version: 016.004.000.056.013522 New BIOS Version: 016.004.000.043.012098 Flash type: GD25Q80C Burst size is 256 100000/100000h bytes programmed 100000/100000h bytes verified Restart System To Complete VBIOS Update. ``` - Check if the Bios flash worked(restart was not required) ``` sudo ./amdvbflash -ai ``` - Output example ``` Adapter 0 SEG=0000, BN=07, DN=00, PCIID=66A11002, SSID=********) Asic Family : Vega20 Flash Type : GD25Q80C (1024 KB) Product Name : Vega20 A1 GLXT WS D16402 32GB 8HI 1000m Bios Config File : D1640200.043 Bios P/N : 113-D1640200-043 Bios Version : 016.004.000.0543.012098 Bios Date : 05/02/19 11:36 ROM Image Type : Legacy Images ROM Image Details : Image[0]: Size(59392 Bytes), Type(Legacy Image) Image[1]: Size(44032 Bytes), Type(Hybrid Image) ``` - lspci ``` lspci -vvv ``` - Output Example ``` VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Vega 20 [Radeon Pro/Radeon Instinct] (prog-if 00 [VGA controller]) Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Vega 20 [Radeon Pro/Radeon Instinct] Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- Capabilities: [50] Power Management version 3 Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1+,D2+,D3hot+,D3cold+) Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME- Capabilities: [64] Express (v2) Legacy Endpoint, MSI 00 DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <4us, L1 unlimited ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset- DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq- RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ MaxPayload 256 bytes, MaxReadReq 512 bytes DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+ AuxPwr- TransPend- LnkCap: Port #0, Speed 16GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <64ns, L1 <1us ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+ LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes, Disabled- CommClk+ ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- LnkSta: Speed 16GT/s, Width x16 TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt- DevCap2: Completion Timeout: Range ABCD, TimeoutDis+ NROPrPrP- LTR+ 10BitTagComp+ 10BitTagReq+ OBFF Not Supported, ExtFmt+ EETLPPrefix+, MaxEETLPPrefixes 1 EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- FRS- AtomicOpsCap: 32bit+ 64bit+ 128bitCAS- DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR+ 10BitTagReq- OBFF Disabled, AtomicOpsCtl: ReqEn+ LnkCap2: Supported Link Speeds: 2.5-16GT/s, Crosslink- Retimer+ 2Retimers+ DRS- LnkCtl2: Target Link Speed: 16GT/s, EnterCompliance- SpeedDis- Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- Compliance Preset/De-emphasis: -6dB de-emphasis, 0dB preshoot LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete+ EqualizationPhase1+ EqualizationPhase2+ EqualizationPhase3+ LinkEqualizationRequest- Retimer- 2Retimers- CrosslinkRes: unsupported Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+ Address: 00000000fee00f58 Data: 0000 Capabilities: [100 v1] Vendor Specific Information: ID=0001 Rev=1 Len=010 Capabilities: [150 v2] Advanced Error Reporting UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol- CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+ CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+ AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn- MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap- HeaderLog: 00000000 00000000 00000000 00000000 Capabilities: [200 v1] Physical Resizable BAR BAR 0: current size: 32GB, supported: 256MB 512MB 1GB 2GB 4GB 8GB 16GB 32GB BAR 2: current size: 2MB, supported: 2MB 4MB 8MB 16MB 32MB 64MB 128MB 256MB Capabilities: [270 v1] Secondary PCI Express LnkCtl3: LnkEquIntrruptEn- PerformEqu- LaneErrStat: 0 Capabilities: [2a0 v1] Access Control Services ACSCap: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans- ACSCtl: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans- Capabilities: [2b0 v1] Address Translation Service (ATS) ATSCap: Invalidate Queue Depth: 00 ATSCtl: Enable-, Smallest Translation Unit: 00 Capabilities: [2c0 v1] Page Request Interface (PRI) PRICtl: Enable- Reset- PRISta: RF- UPRGI- Stopped+ Page Request Capacity: 00000100, Page Request Allocation: 00000000 Capabilities: [2d0 v1] Process Address Space ID (PASID) PASIDCap: Exec+ Priv+, Max PASID Width: 10 PASIDCtl: Enable- Exec- Priv- Capabilities: [320 v1] Latency Tolerance Reporting Max snoop latency: 15728640ns Max no snoop latency: 15728640ns Capabilities: [400 v1] Data Link Feature Capabilities: [410 v1] Physical Layer 16.0 GT/s Capabilities: [440 v1] Lane Margining at the Receiver Kernel driver in use: amdgpu Kernel modules: amdgpu ``` ## Additional Infos - On Ubuntu, 1 flashed MI50 uses around 17-21W of power when idle(reported from rocm-smi). Meanwhile on Windows GPU-Z reports that 1 card uses 12-18W while idle for some reason. I don't know if the power consumption on idle is actually different or the calculation method is the one that's different. - After turning ASPM on in the Bios, Linux might not be able to initialize the GPU. You should add ASPM related options in /etc/default/grub to initialize the GPU. ``` nano /etc/default/grub ``` - Add the line below to the 'GRUB_CMDLINE_LINUX_DEFAULT' ``` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci realloc pci=noaer pcie_aspm=off iommu=pt" ``` - You can set the power limit to your liking on Ubuntu by using this command. ``` rocm-smi --setpoweroverdrive NUMBER_IN_WATTS(ex. 125) ``` - After executing the command you can use 'rocm-smi' to find out if it's working. - The power limit resets every time you reboot your computer, so you need to make a script to execute this command every time you log on. ``` sudo nano /etc/systemd/system/rocm-powerlimit.service ``` - Paste the command below ``` [Unit] Description=Set ROCm GPU Power Limit After=multi-user.target [Service] Type=oneshot ExecStartPre=/bin/sleep 5 ExecStart=/opt/rocm/bin/rocm-smi --setpower 100 RemainAfterExit=yes [Install] WantedBy=multi-user.target ``` - Save and exit ``` sudo systemctl daemon-reload sudo systemctl enable rocm-powerlimit.service ``` - Reboot, execute 'rocm-smi' to see if the script works