Follow these steps.
-Download ATIwinflash, (make sure only the card you want to flash is connected) and save your bios-call it RX580_original.rom or something meaningful.
-Then use
https://github.com/jaschaknack/PolarisBiosEditor to open the RX580_original.rom and make sure the mem timings show up. Click 1 Click timing patch (see image below). A popup box will show it is going to apply good mem timings so go ahead and click okay.
-Now save the bios as RX580_modded.rom and open Atiwinflash (make sure the card you want to flash is selected) navigate to where you saved the modded rom and select program. The screen will pause for 30sec to a minute (do not interrrupt this process).
-Apply pixel patcher after if needed (device manager code 43 means apply the pixel patcher).
-Run the miner software and tweak your OC settings.