platform_drv: disable no snoop for ATI/AMD HDA

Implemented as depicted in the OpenBSD driver, register description
found in 'AMD SB700/710/750 Register Reference Guide'
(43009_sb7xx_rrg_pub_1.00.pdf).

Issue #4629.
This commit is contained in:
Josef Söntgen 2022-09-30 21:11:35 +00:00 committed by Christian Helmuth
parent cdff00970b
commit a78a7e1f67

View File

@ -38,6 +38,11 @@ void Driver::pci_hd_audio_quirks(Device::Pci_config cfg,
struct No_snoop : Bitfield<11,1> {};
};
struct Amd_device_control : Register<0x42, 8>
{
struct No_snoop : Bitfield<0, 3> {};
};
using Mmio::Mmio;
};
@ -48,5 +53,8 @@ void Driver::pci_hd_audio_quirks(Device::Pci_config cfg,
if (cfg.vendor_id == 0x8086)
audio.write<Hdaudio::Intel_device_control::No_snoop>(0);
if (cfg.vendor_id == 0x1002 || cfg.vendor_id == 0x1022)
audio.write<Hdaudio::Amd_device_control::No_snoop>(2);
}