SiS 5595 fixes, added the PC Chips M747, and corrected the name of the Aptiva.
This commit is contained in:
@@ -1733,6 +1733,9 @@ acpi_reg_write_sis_5595(int size, uint16_t addr, uint8_t val, void *priv)
|
||||
break;
|
||||
case 0x1c:
|
||||
dev->regs.gpe_pin = ((dev->regs.gpe_pin & ~(0xff << shift32)) | ((val & 0xff) << shift32));
|
||||
if (!strcmp(machine_get_internal_name(), "m747") && (val & 0x10) &&
|
||||
!(dev->regs.gpe_io & 0x00000010))
|
||||
resetx86();
|
||||
break;
|
||||
case 0x1d:
|
||||
dev->regs.gpe_pin = ((dev->regs.gpe_pin & ~(0x0f << shift32)) | ((val & 0x0f) << shift32));
|
||||
|
||||
@@ -86,6 +86,7 @@ typedef struct sis_5513_pci_to_isa_t {
|
||||
port_92_t *port_92;
|
||||
void *pit;
|
||||
nvr_t *nvr;
|
||||
char *fn;
|
||||
ddma_t *ddma;
|
||||
acpi_t *acpi;
|
||||
void *smbus;
|
||||
@@ -1077,7 +1078,6 @@ sis_5513_11_pci_to_isa_reset(sis_5513_pci_to_isa_t *dev)
|
||||
dev->sis->ide_bits_1_3_writable = 0;
|
||||
dev->sis->usb_enabled = 0;
|
||||
|
||||
sis_5513_apc_reset(dev);
|
||||
sis_5513_apc_recalc(dev, 0);
|
||||
}
|
||||
|
||||
@@ -1132,7 +1132,6 @@ sis_5513_b0_pci_to_isa_reset(sis_5513_pci_to_isa_t *dev)
|
||||
|
||||
dev->sis->usb_enabled = 0;
|
||||
|
||||
sis_5513_apc_reset(dev);
|
||||
sis_5513_apc_recalc(dev, 0);
|
||||
|
||||
if (dev->rev == 0x81)
|
||||
@@ -1196,6 +1195,17 @@ static void
|
||||
sis_5513_pci_to_isa_close(void *priv)
|
||||
{
|
||||
sis_5513_pci_to_isa_t *dev = (sis_5513_pci_to_isa_t *) priv;
|
||||
FILE *fp = NULL;
|
||||
|
||||
fp = nvr_fopen(dev->fn, "wb");
|
||||
|
||||
if (fp != NULL) {
|
||||
(void) fwrite(dev->apc_regs, 256, 1, fp);
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
if (dev->fn != NULL)
|
||||
free(dev->fn);
|
||||
|
||||
free(dev);
|
||||
}
|
||||
@@ -1205,6 +1215,8 @@ sis_5513_pci_to_isa_init(UNUSED(const device_t *info))
|
||||
{
|
||||
sis_5513_pci_to_isa_t *dev = (sis_5513_pci_to_isa_t *) calloc(1, sizeof(sis_5513_pci_to_isa_t));
|
||||
uint8_t pit_is_fast = (((pit_mode == -1) && is486) || (pit_mode == 1));
|
||||
FILE *fp = NULL;
|
||||
int c;
|
||||
|
||||
dev->rev = info->local;
|
||||
|
||||
@@ -1272,6 +1284,22 @@ sis_5513_pci_to_isa_init(UNUSED(const device_t *info))
|
||||
dev->sis->acpi->priv = dev->sis;
|
||||
acpi_set_slot(dev->sis->acpi, dev->sis->sb_pci_slot);
|
||||
acpi_set_nvr(dev->sis->acpi, dev->nvr);
|
||||
|
||||
/* Set up the NVR file's name. */
|
||||
c = strlen(machine_get_internal_name()) + 9;
|
||||
dev->fn = (char *) malloc(c + 1);
|
||||
sprintf(dev->fn, "%s_apc.nvr", machine_get_internal_name());
|
||||
|
||||
fp = nvr_fopen(dev->fn, "rb");
|
||||
|
||||
memset(dev->apc_regs, 0x00, sizeof(dev->apc_regs));
|
||||
sis_5513_apc_reset(dev);
|
||||
if (fp != NULL) {
|
||||
if (fread(dev->apc_regs, 1, 256, fp) != 256)
|
||||
fatal("sis_5513_pci_to_isa_init(): Error reading APC data\n");
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
acpi_set_irq_mode(dev->sis->acpi, 2);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -521,7 +521,7 @@ extern int machine_at_403tg_d_init(const machine_t *);
|
||||
extern int machine_at_403tg_d_mr_init(const machine_t *);
|
||||
extern int machine_at_pb450_init(const machine_t *);
|
||||
extern int machine_at_pb450_init(const machine_t *);
|
||||
extern int machine_at_aptiva_cm_init(const machine_t *);
|
||||
extern int machine_at_aptiva_510_init(const machine_t *);
|
||||
extern int machine_at_pc330_6573_init(const machine_t *);
|
||||
extern int machine_at_mvi486_init(const machine_t *);
|
||||
|
||||
@@ -801,6 +801,7 @@ extern int machine_at_borapro_init(const machine_t *);
|
||||
extern int machine_at_ms6168_init(const machine_t *);
|
||||
|
||||
extern int machine_at_p6f99_init(const machine_t *);
|
||||
extern int machine_at_m747_init(const machine_t *);
|
||||
|
||||
/* m_at_slot2.c */
|
||||
extern int machine_at_6gxu_init(const machine_t *);
|
||||
|
||||
@@ -722,11 +722,11 @@ machine_at_pc330_6573_common_init(const machine_t *model)
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_aptiva_cm_init(const machine_t *model)
|
||||
machine_at_aptiva_510_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/aptiva_cm/$IMAGES.USF",
|
||||
ret = bios_load_linear("roms/machines/aptiva_510/$IMAGES.USF",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
|
||||
@@ -841,3 +841,30 @@ machine_at_p6f99_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_m747_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/m747/990521.rom",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x02, PCI_CARD_AGPBRIDGE, 0, 0, 0, 0);
|
||||
device_add(&sis_5600_device);
|
||||
device_add(&keyboard_ps2_ami_pci_device);
|
||||
device_add(&it8661f_device);
|
||||
device_add(&winbond_flash_w29c020_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -7186,11 +7186,11 @@ const machine_t machines[] = {
|
||||
},
|
||||
/* Has IBM PS/2 Type 1 KBC firmware. */
|
||||
{
|
||||
.name = "[OPTi 802G] IBM Aptiva CM",
|
||||
.internal_name = "aptiva_cm",
|
||||
.name = "[OPTi 802G] IBM Aptiva 510/710/Vision",
|
||||
.internal_name = "aptiva_510",
|
||||
.type = MACHINE_TYPE_486_S3,
|
||||
.chipset = MACHINE_CHIPSET_OPTI_895_802G,
|
||||
.init = machine_at_aptiva_cm_init,
|
||||
.init = machine_at_aptiva_510_init,
|
||||
.p1_handler = NULL,
|
||||
.gpio_handler = NULL,
|
||||
.available_flag = MACHINE_AVAILABLE,
|
||||
@@ -14513,6 +14513,46 @@ const machine_t machines[] = {
|
||||
.snd_device = &es1371_onboard_device, /* ES1373 but we currently don't emulate that. */
|
||||
.net_device = NULL
|
||||
},
|
||||
/* Has the SiS (5)600 chipset with on-chip KBC. */
|
||||
{
|
||||
.name = "[SiS 5600] PC Chips M747",
|
||||
.internal_name = "m747",
|
||||
.type = MACHINE_TYPE_SLOT1,
|
||||
.chipset = MACHINE_CHIPSET_SIS_5600,
|
||||
.init = machine_at_m747_init,
|
||||
.p1_handler = NULL,
|
||||
.gpio_handler = NULL,
|
||||
.available_flag = MACHINE_AVAILABLE,
|
||||
.gpio_acpi_handler = NULL,
|
||||
.cpu = {
|
||||
.package = CPU_PKG_SLOT1,
|
||||
.block = CPU_BLOCK_NONE,
|
||||
.min_bus = 66666667,
|
||||
.max_bus = 100000000,
|
||||
.min_voltage = 1300,
|
||||
.max_voltage = 3500,
|
||||
.min_multi = 1.5,
|
||||
.max_multi = 8.0
|
||||
},
|
||||
.bus_flags = MACHINE_PS2_PCI,
|
||||
.flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB,
|
||||
.ram = {
|
||||
.min = 8192,
|
||||
.max = 1572864,
|
||||
.step = 1024
|
||||
},
|
||||
.nvrmask = 255,
|
||||
.kbc_device = NULL,
|
||||
.kbc_p1 = 0xff,
|
||||
.gpio = 0xffffffff,
|
||||
.gpio_acpi = 0xffffffff,
|
||||
.device = NULL,
|
||||
.fdc_device = NULL,
|
||||
.sio_device = NULL,
|
||||
.vid_device = NULL,
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
|
||||
/* Slot 1/2 machines */
|
||||
/* 440GX */
|
||||
|
||||
Reference in New Issue
Block a user