Add support for AMD64 Family 10h processors.

PR:		kern/128331
MFC after:	3 days
This commit is contained in:
Jung-uk Kim 2009-01-12 16:07:03 +00:00
parent a28d1439d8
commit 7dcbc463ef
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=187100

View file

@ -167,14 +167,16 @@ agp_amd64_attach(device_t dev)
{
struct agp_amd64_softc *sc = device_get_softc(dev);
struct agp_gatt *gatt;
uint32_t devid;
int i, n, error;
for (i = 0, n = 0; i < PCI_SLOTMAX && n < AMD64_MAX_MCTRL; i++)
if (pci_cfgregread(0, i, 3, 0, 4) == 0x11031022) {
for (i = 0, n = 0; i < PCI_SLOTMAX && n < AMD64_MAX_MCTRL; i++) {
devid = pci_cfgregread(0, i, 3, 0, 4);
if (devid == 0x11031022 || devid == 0x12031022) {
sc->mctrl[n] = i;
n++;
}
}
if (n == 0)
return (ENXIO);