|
|
|
@@ -35,10 +35,14 @@
|
|
|
|
|
#include <86box/chipset.h>
|
|
|
|
|
#include <86box/spd.h>
|
|
|
|
|
|
|
|
|
|
#define VIA_597 0x05970100
|
|
|
|
|
#define VIA_598 0x05980000
|
|
|
|
|
#define VIA_691 0x06910000
|
|
|
|
|
#define VIA_8601 0x86010500
|
|
|
|
|
|
|
|
|
|
typedef struct via_apollo_t
|
|
|
|
|
{
|
|
|
|
|
uint16_t id;
|
|
|
|
|
uint32_t id;
|
|
|
|
|
uint8_t pci_conf[256];
|
|
|
|
|
|
|
|
|
|
smram_t *smram;
|
|
|
|
@@ -84,8 +88,8 @@ via_apollo_setup(via_apollo_t *dev)
|
|
|
|
|
/* Host Bridge */
|
|
|
|
|
dev->pci_conf[0x00] = 0x06; /*VIA*/
|
|
|
|
|
dev->pci_conf[0x01] = 0x11;
|
|
|
|
|
dev->pci_conf[0x02] = dev->id & 0xff;
|
|
|
|
|
dev->pci_conf[0x03] = (dev->id >> 8);
|
|
|
|
|
dev->pci_conf[0x02] = dev->id >> 16;
|
|
|
|
|
dev->pci_conf[0x03] = dev->id >> 24;
|
|
|
|
|
|
|
|
|
|
dev->pci_conf[0x04] = 6;
|
|
|
|
|
dev->pci_conf[0x05] = 0;
|
|
|
|
@@ -93,8 +97,7 @@ via_apollo_setup(via_apollo_t *dev)
|
|
|
|
|
dev->pci_conf[0x06] = 0x90;
|
|
|
|
|
dev->pci_conf[0x07] = 0x02;
|
|
|
|
|
|
|
|
|
|
if (dev->id == 0x0597)
|
|
|
|
|
dev->pci_conf[0x08] = 1; /* Production Silicon ("Revision B") */
|
|
|
|
|
dev->pci_conf[0x08] = dev->id >> 8;
|
|
|
|
|
dev->pci_conf[0x09] = 0;
|
|
|
|
|
dev->pci_conf[0x0a] = 0;
|
|
|
|
|
dev->pci_conf[0x0b] = 6;
|
|
|
|
@@ -105,7 +108,9 @@ via_apollo_setup(via_apollo_t *dev)
|
|
|
|
|
dev->pci_conf[0x10] = 0x08;
|
|
|
|
|
dev->pci_conf[0x34] = 0xa0;
|
|
|
|
|
|
|
|
|
|
if (dev->id == 0x0691) {
|
|
|
|
|
if (dev->id == VIA_8601)
|
|
|
|
|
dev->pci_conf[0x52] = 0x10;
|
|
|
|
|
if (dev->id == VIA_691) {
|
|
|
|
|
dev->pci_conf[0x56] = 0x01;
|
|
|
|
|
dev->pci_conf[0x57] = 0x01;
|
|
|
|
|
}
|
|
|
|
@@ -119,7 +124,7 @@ via_apollo_setup(via_apollo_t *dev)
|
|
|
|
|
dev->pci_conf[0x64] = 0xec;
|
|
|
|
|
dev->pci_conf[0x65] = 0xec;
|
|
|
|
|
dev->pci_conf[0x66] = 0xec;
|
|
|
|
|
if (dev->id == 0x0691)
|
|
|
|
|
if (dev->id == VIA_691)
|
|
|
|
|
dev->pci_conf[0x67] = 0xec; /* DRAM Timing for Banks 6,7. */
|
|
|
|
|
dev->pci_conf[0x6b] = 0x01;
|
|
|
|
|
|
|
|
|
@@ -138,7 +143,7 @@ via_apollo_host_bridge_write(int func, int addr, uint8_t val, void *priv)
|
|
|
|
|
|
|
|
|
|
if (func)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*Read-only addresses*/
|
|
|
|
|
if ((addr < 4) || ((addr >= 5) && (addr < 7)) || ((addr >= 8) && (addr < 0xd)) ||
|
|
|
|
|
((addr >= 0xe) && (addr < 0x12)) || ((addr >= 0x14) && (addr < 0x50)) ||
|
|
|
|
@@ -148,9 +153,9 @@ via_apollo_host_bridge_write(int func, int addr, uint8_t val, void *priv)
|
|
|
|
|
((addr >= 0xad) && (addr < 0xf0)) || ((addr >= 0xf8) && (addr < 0xfc)) ||
|
|
|
|
|
(addr == 0xfd))
|
|
|
|
|
return;
|
|
|
|
|
if (((addr == 0x78) || (addr >= 0xad)) && (dev->id == 0x0597))
|
|
|
|
|
if (((addr == 0x78) || (addr >= 0xad)) && (dev->id == VIA_597))
|
|
|
|
|
return;
|
|
|
|
|
if (((addr == 0x67) || ((addr >= 0xf0) && (addr < 0xfc))) && (dev->id != 0x0691))
|
|
|
|
|
if (((addr == 0x67) || ((addr >= 0xf0) && (addr < 0xfc))) && (dev->id != VIA_691))
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
switch(addr) {
|
|
|
|
@@ -161,7 +166,11 @@ via_apollo_host_bridge_write(int func, int addr, uint8_t val, void *priv)
|
|
|
|
|
dev->pci_conf[0x07] &= ~(val & 0xb0);
|
|
|
|
|
break;
|
|
|
|
|
case 0x0d:
|
|
|
|
|
if(dev->id == VIA_8601)
|
|
|
|
|
dev->pci_conf[0x0d] = (dev->pci_conf[0x0d] & ~0x07) | (val & 0x07);
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0x0d] = (dev->pci_conf[0x0d] & ~0x07) | (val & 0x07);
|
|
|
|
|
|
|
|
|
|
dev->pci_conf[0x75] = (dev->pci_conf[0x75] & ~0x30) | ((val & 0x06) << 3);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
@@ -173,45 +182,51 @@ via_apollo_host_bridge_write(int func, int addr, uint8_t val, void *priv)
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0x50: /* Cache Control 1 */
|
|
|
|
|
if (dev->id == 0x0691)
|
|
|
|
|
if (dev->id == VIA_8601)
|
|
|
|
|
dev->pci_conf[0x50] = (dev->pci_conf[0x50] & ~0xd3) | (val & 0xd3);
|
|
|
|
|
else if (dev->id == VIA_691)
|
|
|
|
|
dev->pci_conf[0x50] = val;
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0x50] = (dev->pci_conf[0x50] & ~0xf8) | (val & 0xf8);
|
|
|
|
|
break;
|
|
|
|
|
case 0x51: /* Cache Control 2 */
|
|
|
|
|
if (dev->id == 0x0691)
|
|
|
|
|
if (dev->id >= VIA_691)
|
|
|
|
|
dev->pci_conf[0x51] = val;
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0x51] = (dev->pci_conf[0x51] & ~0xeb) | (val & 0xeb);
|
|
|
|
|
break;
|
|
|
|
|
case 0x52: /* Non_Cacheable Control */
|
|
|
|
|
if (dev->id == 0x0691)
|
|
|
|
|
if (dev->id == VIA_8601)
|
|
|
|
|
dev->pci_conf[0x52] = (dev->pci_conf[0x52] & ~0xdf) | (val & 0xdf);
|
|
|
|
|
else if (dev->id == VIA_691)
|
|
|
|
|
dev->pci_conf[0x52] = (dev->pci_conf[0x52] & ~0x9f) | (val & 0x9f);
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0x52] = (dev->pci_conf[0x52] & ~0xf5) | (val & 0xf5);
|
|
|
|
|
break;
|
|
|
|
|
case 0x53: /* System Performance Control */
|
|
|
|
|
if (dev->id == 0x0691)
|
|
|
|
|
if (dev->id == VIA_8601)
|
|
|
|
|
dev->pci_conf[0x53] = (dev->pci_conf[0x53] & ~0xfc) | (val & 0xfc);
|
|
|
|
|
else if (dev->id == VIA_691)
|
|
|
|
|
dev->pci_conf[0x53] = val;
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0x53] = (dev->pci_conf[0x53] & ~0xf0) | (val & 0xf0);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0x56: case 0x57: case 0x5a: case 0x5b: case 0x5c: case 0x5d: case 0x5e: case 0x5f: /* DRAM Row Ending Address */
|
|
|
|
|
if (dev->id >= 0x0691)
|
|
|
|
|
if (dev->id >= VIA_691)
|
|
|
|
|
spd_write_drbs(dev->pci_conf, 0x5a, 0x56, 8);
|
|
|
|
|
else if (addr >= 0x5a)
|
|
|
|
|
spd_write_drbs(dev->pci_conf, 0x5a, 0x5f, 8);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0x58:
|
|
|
|
|
if (dev->id == 0x0597)
|
|
|
|
|
if ((dev->id == VIA_597) || (dev->id == VIA_8601))
|
|
|
|
|
dev->pci_conf[0x58] = (dev->pci_conf[0x58] & ~0xee) | (val & 0xee);
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0x58] = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x59:
|
|
|
|
|
if (dev->id == 0x0691)
|
|
|
|
|
if (dev->id == VIA_691)
|
|
|
|
|
dev->pci_conf[0x59] = val;
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0x59] = (dev->pci_conf[0x59] & ~0xf0) | (val & 0xf0);
|
|
|
|
@@ -248,7 +263,7 @@ via_apollo_host_bridge_write(int func, int addr, uint8_t val, void *priv)
|
|
|
|
|
apollo_map(0xe0000, 0x10000, (val & 0xc0) >> 6);
|
|
|
|
|
dev->pci_conf[0x63] = val;
|
|
|
|
|
smram_disable_all();
|
|
|
|
|
if (dev->id == 0x0691) switch (val & 0x03) {
|
|
|
|
|
if (dev->id >= VIA_691) switch (val & 0x03) {
|
|
|
|
|
case 0x00:
|
|
|
|
|
default:
|
|
|
|
|
apollo_smram_map(dev, 1, 0x000a0000, 0x00020000, 1); /* SMM: Code DRAM, Data DRAM */
|
|
|
|
@@ -271,21 +286,21 @@ via_apollo_host_bridge_write(int func, int addr, uint8_t val, void *priv)
|
|
|
|
|
default:
|
|
|
|
|
/* Disable SMI Address Redirection (default) */
|
|
|
|
|
apollo_smram_map(dev, 1, 0x000a0000, 0x00020000, 0);
|
|
|
|
|
if (dev->id == 0x0597)
|
|
|
|
|
if (dev->id == VIA_597)
|
|
|
|
|
apollo_smram_map(dev, 1, 0x00030000, 0x00020000, 1);
|
|
|
|
|
apollo_smram_map(dev, 0, 0x000a0000, 0x00020000, 0);
|
|
|
|
|
break;
|
|
|
|
|
case 0x01:
|
|
|
|
|
/* Allow access to DRAM Axxxx-Bxxxx for both normal and SMI cycles */
|
|
|
|
|
apollo_smram_map(dev, 1, 0x000a0000, 0x00020000, 1);
|
|
|
|
|
if (dev->id == 0x0597)
|
|
|
|
|
if (dev->id == VIA_597)
|
|
|
|
|
apollo_smram_map(dev, 1, 0x00030000, 0x00020000, 1);
|
|
|
|
|
apollo_smram_map(dev, 0, 0x000a0000, 0x00020000, 1);
|
|
|
|
|
break;
|
|
|
|
|
case 0x02:
|
|
|
|
|
/* Reserved */
|
|
|
|
|
apollo_smram_map(dev, 1, 0x000a0000, 0x00020000, 3);
|
|
|
|
|
if (dev->id == 0x0597) {
|
|
|
|
|
if (dev->id == VIA_597) {
|
|
|
|
|
/* SMI 3xxxx-4xxxx redirect to Axxxx-Bxxxx. */
|
|
|
|
|
apollo_smram_map(dev, 1, 0x00030000, 0x00020000, 1);
|
|
|
|
|
}
|
|
|
|
@@ -294,38 +309,46 @@ via_apollo_host_bridge_write(int func, int addr, uint8_t val, void *priv)
|
|
|
|
|
case 0x03:
|
|
|
|
|
/* Allow SMI Axxxx-Bxxxx DRAM access */
|
|
|
|
|
apollo_smram_map(dev, 1, 0x000a0000, 0x00020000, 1);
|
|
|
|
|
if (dev->id == 0x0597)
|
|
|
|
|
if (dev->id == VIA_597)
|
|
|
|
|
apollo_smram_map(dev, 1, 0x00030000, 0x00020000, 1);
|
|
|
|
|
apollo_smram_map(dev, 0, 0x000a0000, 0x00020000, 0);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 0x68:
|
|
|
|
|
if (dev->id == 0x0597)
|
|
|
|
|
if (dev->id == VIA_597)
|
|
|
|
|
dev->pci_conf[0x68] = (dev->pci_conf[0x6b] & ~0xfe) | (val & 0xfe);
|
|
|
|
|
else if (dev->id == 0x0598)
|
|
|
|
|
else if ((dev->id == VIA_598) || (dev->id == VIA_8601))
|
|
|
|
|
dev->pci_conf[0x68] = val;
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0x68] = (dev->pci_conf[0x6b] & ~0xfd) | (val & 0xfd);
|
|
|
|
|
break;
|
|
|
|
|
case 0x69:
|
|
|
|
|
if (dev->id == VIA_8601)
|
|
|
|
|
dev->pci_conf[0x69] = (dev->pci_conf[0x69] & ~0xfe) | (val & 0xfe);
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0x69] = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x6b:
|
|
|
|
|
if (dev->id == 0x0691)
|
|
|
|
|
if (dev->id == VIA_8601)
|
|
|
|
|
dev->pci_conf[0x6b] = val;
|
|
|
|
|
else if (dev->id == VIA_691)
|
|
|
|
|
dev->pci_conf[0x6b] = (dev->pci_conf[0x6b] & ~0xcf) | (val & 0xcf);
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0x6b] = (dev->pci_conf[0x6b] & ~0xc1) | (val & 0xc1);
|
|
|
|
|
break;
|
|
|
|
|
case 0x6c:
|
|
|
|
|
if (dev->id == 0x0597)
|
|
|
|
|
if ((dev->id == VIA_597) || (dev->id == VIA_8601))
|
|
|
|
|
dev->pci_conf[0x6c] = (dev->pci_conf[0x6c] & ~0x1f) | (val & 0x1f);
|
|
|
|
|
else if (dev->id == 0x0598)
|
|
|
|
|
else if (dev->id == VIA_598)
|
|
|
|
|
dev->pci_conf[0x6c] = (dev->pci_conf[0x6c] & ~0x7f) | (val & 0x7f);
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0x6c] = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x6d:
|
|
|
|
|
if (dev->id == 0x0597)
|
|
|
|
|
if (dev->id == VIA_597)
|
|
|
|
|
dev->pci_conf[0x6d] = (dev->pci_conf[0x6d] & ~0x0f) | (val & 0x0f);
|
|
|
|
|
else if (dev->id == 0x0598)
|
|
|
|
|
else if ((dev->id == VIA_598) || (dev->id == VIA_8601))
|
|
|
|
|
dev->pci_conf[0x6d] = (dev->pci_conf[0x6d] & ~0x7f) | (val & 0x7f);
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0x6d] = val;
|
|
|
|
@@ -335,24 +358,52 @@ via_apollo_host_bridge_write(int func, int addr, uint8_t val, void *priv)
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0x70:
|
|
|
|
|
if (dev->id == 0x0597)
|
|
|
|
|
if (dev->id == VIA_8601)
|
|
|
|
|
dev->pci_conf[0x70] = (dev->pci_conf[0x70] & ~0xdf) | (val & 0xdf);
|
|
|
|
|
else if (dev->id == VIA_597)
|
|
|
|
|
dev->pci_conf[0x70] = (dev->pci_conf[0x70] & ~0xf1) | (val & 0xf1);
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0x70] = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x73:
|
|
|
|
|
if (dev->id == VIA_8601)
|
|
|
|
|
dev->pci_conf[0x73] = (dev->pci_conf[0x73] & ~0x7f) | (val & 0x7f);
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0x73] = val;
|
|
|
|
|
break;
|
|
|
|
|
case 0x74:
|
|
|
|
|
dev->pci_conf[0x74] = (dev->pci_conf[0x74] & ~0xc0) | (val & 0xc0);
|
|
|
|
|
if (dev->id == VIA_8601)
|
|
|
|
|
dev->pci_conf[0x74] = (dev->pci_conf[0x74] & ~0xdf) | (val & 0xdf);
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0x74] = (dev->pci_conf[0x74] & ~0xc0) | (val & 0xc0);
|
|
|
|
|
break;
|
|
|
|
|
case 0x75:
|
|
|
|
|
dev->pci_conf[0x75] = (dev->pci_conf[0x75] & ~0xcf) | (val & 0xcf);
|
|
|
|
|
if (dev->id == VIA_8601)
|
|
|
|
|
dev->pci_conf[0x75] = val;
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0x75] = (dev->pci_conf[0x75] & ~0xcf) | (val & 0xcf);
|
|
|
|
|
break;
|
|
|
|
|
case 0x76:
|
|
|
|
|
dev->pci_conf[0x76] = (dev->pci_conf[0x76] & ~0xf0) | (val & 0xf0);
|
|
|
|
|
if (dev->id == VIA_8601)
|
|
|
|
|
dev->pci_conf[0x75] = val;
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0x76] = (dev->pci_conf[0x76] & ~0xf0) | (val & 0xf0);
|
|
|
|
|
break;
|
|
|
|
|
case 0x77:
|
|
|
|
|
if (dev->id != VIA_8601)
|
|
|
|
|
dev->pci_conf[0x77] = (dev->pci_conf[0x77] & ~0xc0) | (val & 0xc0);
|
|
|
|
|
break;
|
|
|
|
|
case 0x78:
|
|
|
|
|
dev->pci_conf[0x78] = (dev->pci_conf[0x78] & ~0xd5) | (val & 0xd5);
|
|
|
|
|
break;
|
|
|
|
|
case 0x79:
|
|
|
|
|
dev->pci_conf[0x79] = (dev->pci_conf[0x79] & ~0xfc) | (val & 0xfc);
|
|
|
|
|
break;
|
|
|
|
|
case 0x7a:
|
|
|
|
|
dev->pci_conf[0x7a] = (dev->pci_conf[0x7a] & ~0x89) | (val & 0x89);
|
|
|
|
|
break;
|
|
|
|
|
case 0x7e:
|
|
|
|
|
if (dev->id != VIA_8601)
|
|
|
|
|
dev->pci_conf[0x7e] = (dev->pci_conf[0x7e] & ~0x3f) | (val & 0x3f);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
@@ -361,14 +412,25 @@ via_apollo_host_bridge_write(int func, int addr, uint8_t val, void *priv)
|
|
|
|
|
break;
|
|
|
|
|
case 0x84:
|
|
|
|
|
/* The datasheet first mentions 7-0 but then says 3-0 are reserved -
|
|
|
|
|
- minimum of 16 MB for the graphics aperture? */
|
|
|
|
|
dev->pci_conf[0x84] = (dev->pci_conf[0x84] & ~0xf0) | (val & 0xf0);
|
|
|
|
|
- minimum of 16 MB for the graphics aperture? 8601 datasheet doesn't refer it. */
|
|
|
|
|
if(dev->id == VIA_8601)
|
|
|
|
|
dev->pci_conf[0x84] = val;
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0x84] = (dev->pci_conf[0x84] & ~0xf0) | (val & 0xf0);
|
|
|
|
|
break;
|
|
|
|
|
case 0x88:
|
|
|
|
|
dev->pci_conf[0x88] = (dev->pci_conf[0x88] & ~0x07) | (val & 0x07);
|
|
|
|
|
if(dev->id == VIA_8601)
|
|
|
|
|
dev->pci_conf[0x88] = (dev->pci_conf[0x88] & ~0x06) | (val & 0x06);
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0x88] = (dev->pci_conf[0x88] & ~0x07) | (val & 0x07);
|
|
|
|
|
break;
|
|
|
|
|
case 0x89:
|
|
|
|
|
dev->pci_conf[0x89] = (dev->pci_conf[0x89] & ~0xf0) | (val & 0xf0);
|
|
|
|
|
case 0x8a:
|
|
|
|
|
case 0x8b:
|
|
|
|
|
if(dev->id == VIA_8601)
|
|
|
|
|
dev->pci_conf[addr] = val;
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0x89] = (dev->pci_conf[0x89] & ~0xf0) | (val & 0xf0);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0xa8:
|
|
|
|
@@ -378,13 +440,29 @@ via_apollo_host_bridge_write(int func, int addr, uint8_t val, void *priv)
|
|
|
|
|
dev->pci_conf[0xa9] = (dev->pci_conf[0xa9] & ~0x03) | (val & 0x03);
|
|
|
|
|
break;
|
|
|
|
|
case 0xac:
|
|
|
|
|
if(dev->id == VIA_8601)
|
|
|
|
|
dev->pci_conf[0xac] = (dev->pci_conf[0xac] & ~0x7f) | (val & 0x7f);
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0xac] = (dev->pci_conf[0xac] & ~0x0f) | (val & 0x0f);
|
|
|
|
|
break;
|
|
|
|
|
case 0xad:
|
|
|
|
|
dev->pci_conf[0xac] = (dev->pci_conf[0xac] & ~0x0f) | (val & 0x0f);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0xfc:
|
|
|
|
|
if (dev->id > 0x0597)
|
|
|
|
|
if (dev->id == VIA_8601)
|
|
|
|
|
dev->pci_conf[0xfc] = (dev->pci_conf[0xfc] & ~0x03) | (val & 0x03);
|
|
|
|
|
else if (dev->id > VIA_597)
|
|
|
|
|
dev->pci_conf[0xfc] = (dev->pci_conf[0xfc] & ~0x01) | (val & 0x01);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0xfd:
|
|
|
|
|
if (dev->id == VIA_8601)
|
|
|
|
|
dev->pci_conf[0xfd] = (dev->pci_conf[0xfd] & ~0x07) | (val & 0x07);
|
|
|
|
|
else
|
|
|
|
|
dev->pci_conf[0xfd] = val;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
dev->pci_conf[addr] = val;
|
|
|
|
|
break;
|
|
|
|
@@ -442,17 +520,21 @@ via_apollo_init(const device_t *info)
|
|
|
|
|
dev->id = info->local;
|
|
|
|
|
|
|
|
|
|
switch (dev->id) {
|
|
|
|
|
case 0x0597:
|
|
|
|
|
case VIA_597:
|
|
|
|
|
device_add(&via_vp3_agp_device);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0x0598:
|
|
|
|
|
case VIA_598:
|
|
|
|
|
device_add(&via_mvp3_agp_device);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0x0691:
|
|
|
|
|
case VIA_691:
|
|
|
|
|
device_add(&via_apro_agp_device);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case VIA_8601:
|
|
|
|
|
device_add(&via_vt8601_agp_device);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
via_apollo_setup(dev);
|
|
|
|
@@ -477,7 +559,7 @@ const device_t via_vp3_device =
|
|
|
|
|
{
|
|
|
|
|
"VIA Apollo VP3",
|
|
|
|
|
DEVICE_PCI,
|
|
|
|
|
0x0597, /*VT82C597*/
|
|
|
|
|
VIA_597, /*VT82C597*/
|
|
|
|
|
via_apollo_init,
|
|
|
|
|
via_apollo_close,
|
|
|
|
|
via_apollo_reset,
|
|
|
|
@@ -491,7 +573,7 @@ const device_t via_mvp3_device =
|
|
|
|
|
{
|
|
|
|
|
"VIA Apollo MVP3",
|
|
|
|
|
DEVICE_PCI,
|
|
|
|
|
0x0598, /*VT82C598MVP*/
|
|
|
|
|
VIA_598, /*VT82C598MVP*/
|
|
|
|
|
via_apollo_init,
|
|
|
|
|
via_apollo_close,
|
|
|
|
|
via_apollo_reset,
|
|
|
|
@@ -504,7 +586,20 @@ const device_t via_mvp3_device =
|
|
|
|
|
const device_t via_apro_device = {
|
|
|
|
|
"VIA Apollo Pro",
|
|
|
|
|
DEVICE_PCI,
|
|
|
|
|
0x0691, /*VT82C691*/
|
|
|
|
|
VIA_691, /*VT82C691*/
|
|
|
|
|
via_apollo_init,
|
|
|
|
|
via_apollo_close,
|
|
|
|
|
via_apollo_reset,
|
|
|
|
|
NULL,
|
|
|
|
|
NULL,
|
|
|
|
|
NULL,
|
|
|
|
|
NULL
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const device_t via_vt8601_device = {
|
|
|
|
|
"VIA Apollo ProMedia",
|
|
|
|
|
DEVICE_PCI,
|
|
|
|
|
VIA_8601, /*VT8601*/
|
|
|
|
|
via_apollo_init,
|
|
|
|
|
via_apollo_close,
|
|
|
|
|
via_apollo_reset,
|
|
|
|
|