Merge pull request #656 from richardg867/master

SMSC SLC90E66 (Victory66) southbridge
This commit is contained in:
OBattler
2020-03-31 19:51:25 +02:00
committed by GitHub
4 changed files with 39 additions and 12 deletions

View File

@@ -427,7 +427,7 @@ w83781d_reset(w83781d_t *dev, uint8_t initialization)
* AS99127F Rev. 2 on a P4B motherboard, and they seem to work well enough.
*/
if (dev->local & W83781D_AS99127F) {
dev->regs[0x00] = 0xB8; /* might be connected to IN2 Low Limit in some way */
/* 0x00 appears to mirror IN2 Low Limit */
dev->regs[0x01] = dev->regs[0x23]; /* appears to mirror IN3 */
dev->regs[0x02] = dev->regs[0x20]; /* appears to mirror IN0 */
dev->regs[0x03] = 0x60;
@@ -512,7 +512,7 @@ const device_t w83781d_device = {
/*
* ASUS AS99127F is a customized W83781D with no ISA interface (SMBus only),
* The ASUS AS99127F is a customized W83781D with no ISA interface (SMBus only),
* added proprietary registers and different chip/vendor IDs.
*/
const device_t as99127f_device = {
@@ -526,7 +526,7 @@ const device_t as99127f_device = {
/*
* Rev. 2 changes the vendor ID back to Winbond's.
* Rev. 2 changes the vendor ID back to Winbond's and brings some other changes.
*/
const device_t as99127f_rev2_device = {
"ASUS AS99127F Rev. 2 Hardware Monitor",

View File

@@ -20,3 +20,4 @@ extern const device_t piix_device;
extern const device_t piix3_device;
extern const device_t piix4_device;
extern const device_t piix4e_device;
extern const device_t slc90e66_device;

View File

@@ -1110,18 +1110,29 @@ piix_reset_hard(piix_t *dev)
/* Clear all 4 functions' arrays and set their vendor and device ID's. */
for (i = 0; i < 4; i++) {
memset(dev->regs[i], 0, 256);
dev->regs[i][0x00] = 0x86; dev->regs[i][0x01] = 0x80; /* Intel */
dev->regs[i][0x02] = (dev->func0_id & 0xff) + (i << dev->func_shift);
dev->regs[i][0x03] = (dev->func0_id >> 8);
memset(dev->regs[i], 0, 256);
if (dev->func0_id == 0x9460) {
dev->regs[i][0x00] = 0x55; dev->regs[i][0x01] = 0x10; /* SMSC */
if (i == 1) { /* IDE controller is 9130, breaking convention */
dev->regs[i][0x02] = 0x30;
dev->regs[i][0x03] = 0x91;
} else {
dev->regs[i][0x02] = (dev->func0_id & 0xff) + (i << dev->func_shift);
dev->regs[i][0x03] = (dev->func0_id >> 8);
}
} else {
dev->regs[i][0x00] = 0x86; dev->regs[i][0x01] = 0x80; /* Intel */
dev->regs[i][0x02] = (dev->func0_id & 0xff) + (i << dev->func_shift);
dev->regs[i][0x03] = (dev->func0_id >> 8);
}
}
/* Function 0: PCI to ISA Bridge */
fregs = (uint8_t *) dev->regs[0];
piix_log("PIIX Function 0: 8086:%02X%02X\n", fregs[0x03], fregs[0x02]);
piix_log("PIIX Function 0: %02X%02X:%02X%02X\n", fregs[0x01], fregs[0x00], fregs[0x03], fregs[0x02]);
fregs[0x04] = 0x07;
fregs[0x06] = 0x80; fregs[0x07] = 0x02;
if (dev->type == 4)
if (dev->type == 4 && dev->func0_id != 0x9460)
fregs[0x08] = (dev->rev & 0x08) ? 0x02 : (dev->rev & 0x07);
else
fregs[0x08] = dev->rev;
@@ -1146,7 +1157,7 @@ piix_reset_hard(piix_t *dev)
/* Function 1: IDE */
fregs = (uint8_t *) dev->regs[1];
piix_log("PIIX Function 1: 8086:%02X%02X\n", fregs[0x03], fregs[0x02]);
piix_log("PIIX Function 1: %02X%02X:%02X%02X\n", fregs[0x01], fregs[0x00], fregs[0x03], fregs[0x02]);
fregs[0x04] = (dev->type > 3) ? 0x05 : 0x07;
fregs[0x06] = 0x80; fregs[0x07] = 0x02;
if (dev->type == 4)
@@ -1161,7 +1172,7 @@ piix_reset_hard(piix_t *dev)
/* Function 2: USB */
if (dev->type > 1) {
fregs = (uint8_t *) dev->regs[2];
piix_log("PIIX Function 2: 8086:%02X%02X\n", fregs[0x03], fregs[0x02]);
piix_log("PIIX Function 2: %02X%02X:%02X%02X\n", fregs[0x01], fregs[0x00], fregs[0x03], fregs[0x02]);
fregs[0x04] = 0x05;
fregs[0x06] = 0x80; fregs[0x07] = 0x02;
if (dev->type == 4)
@@ -1181,7 +1192,7 @@ piix_reset_hard(piix_t *dev)
/* Function 3: Power Management */
if (dev->type > 3) {
fregs = (uint8_t *) dev->regs[3];
piix_log("PIIX Function 3: 8086:%02X%02X\n", fregs[0x03], fregs[0x02]);
piix_log("PIIX Function 3: %02X%02X:%02X%02X\n", fregs[0x01], fregs[0x00], fregs[0x03], fregs[0x02]);
fregs[0x06] = 0x80; fregs[0x07] = 0x02;
fregs[0x08] = (dev->rev & 0x08) ? 0x02 : (dev->rev & 0x07);
fregs[0x0a] = 0x80; fregs[0x0b] = 0x06;
@@ -1391,3 +1402,17 @@ const device_t piix4e_device =
NULL,
NULL
};
const device_t slc90e66_device =
{
"SMSC SLC90E66 (Victory66)",
DEVICE_PCI,
0x94600004,
piix_init,
piix_close,
NULL,
NULL,
NULL,
NULL,
NULL
};

View File

@@ -184,6 +184,7 @@ spd_register(uint8_t ram_type, uint8_t slot_mask, uint16_t max_module_size)
spd_log("SPD: vslot %d = %d MB\n", vslot, vslots[vslot]);
total_size -= vslots[vslot];
} else {
vslots[vslot] = 0;
break;
}
}