Merge pull request #802 from tiseno100/master

Added the Acer V60N
This commit is contained in:
OBattler
2020-06-12 21:31:05 +02:00
committed by GitHub
5 changed files with 86 additions and 13 deletions

View File

@@ -60,6 +60,7 @@
# include "codegen.h"
#endif
/*#define ENABLE_CPU_LOG 1*/
static void cpu_write(uint16_t addr, uint8_t val, void *priv);
static uint8_t cpu_read(uint16_t addr, void *priv);
@@ -195,6 +196,7 @@ uint64_t apic_base_msr = 0;
uint64_t pat_msr = 0;
uint64_t msr_ia32_pmc[8] = {0, 0, 0, 0, 0, 0, 0, 0};
uint64_t ecx17_msr = 0;
uint64_t ecx2a_msr = 0;
uint64_t ecx79_msr = 0;
uint64_t ecx8x_msr[4] = {0, 0, 0, 0};
uint64_t ecx116_msr = 0;
@@ -204,9 +206,19 @@ uint64_t ecx186_msr = 0;
uint64_t ecx187_msr = 0;
uint64_t ecx1e0_msr = 0;
uint64_t ecx404_msr = 0;
uint64_t ecx408_msr = 0;
uint64_t ecx40c_msr = 0;
uint64_t ecx410_msr = 0;
uint64_t ecx570_msr = 0;
uint64_t ecx83_msr = 0; /* AMD K5 and K6 MSR's. */
/* Some weird long MSR's used by the Tyan Tsunami ATX */
/* Will respond with: 0404040404040404. It'll be nice */
/* If somebody could check them. */
uint64_t ecxf0f00250_msr = 0;
uint64_t ecxf0f00258_msr = 0;
uint64_t star = 0; /* AMD K6-2+. */
uint64_t amd_efer = 0, amd_whcr = 0,
@@ -2882,10 +2894,30 @@ void cpu_RDMSR()
EAX = ecx404_msr & 0xffffffff;
EDX = ecx404_msr >> 32;
break;
case 0x408:
EAX = ecx408_msr & 0xffffffff;
EDX = ecx408_msr >> 32;
break;
case 0x40c:
EAX = ecx40c_msr & 0xffffffff;
EDX = ecx40c_msr >> 32;
break;
case 0x410:
EAX = ecx410_msr & 0xffffffff;
EDX = ecx410_msr >> 32;
break;
case 0x570:
EAX = ecx570_msr & 0xffffffff;
EDX = ecx570_msr >> 32;
break;
case 0xf0f00250:
EAX = ecxf0f00250_msr & 0xffffffff;
EDX = ecxf0f00250_msr >> 32;
break;
case 0xf0f00258:
EAX = ecxf0f00258_msr & 0xffffffff;
EDX = ecxf0f00258_msr >> 32;
break;
default:
i686_invalid_rdmsr:
cpu_log("RDMSR: Invalid MSR: %08X\n", ECX);
@@ -3229,6 +3261,9 @@ void cpu_WRMSR()
/* pclog("APIC_BASE write: %08X%08X\n", EDX, EAX); */
// apic_base_msr = EAX | ((uint64_t)EDX << 32);
break;
case 0x2A:
ecx2a_msr = EAX | ((uint64_t)EDX << 32);
break;
case 0x79:
ecx79_msr = EAX | ((uint64_t)EDX << 32);
break;
@@ -3301,9 +3336,24 @@ void cpu_WRMSR()
case 0x404:
ecx404_msr = EAX | ((uint64_t)EDX << 32);
break;
case 0x408:
ecx408_msr = EAX | ((uint64_t)EDX << 32);
break;
case 0x40c:
ecx40c_msr = EAX | ((uint64_t)EDX << 32);
break;
case 0x410:
ecx410_msr = EAX | ((uint64_t)EDX << 32);
break;
case 0x570:
ecx570_msr = EAX | ((uint64_t)EDX << 32);
break;
case 0xf0f00250:
ecxf0f00250_msr = EAX | ((uint64_t)EDX << 32);
break;
case 0xf0f00258:
ecxf0f00258_msr = EAX | ((uint64_t)EDX << 32);
break;
default:
i686_invalid_wrmsr:
cpu_log("WRMSR: Invalid MSR: %08X\n", ECX);

View File

@@ -324,6 +324,7 @@ extern int machine_at_ax59pro_init(const machine_t *);
extern int machine_at_mvp3_init(const machine_t *);
/* m_at_socket8.c */
extern int machine_at_v60n_init(const machine_t *);
extern int machine_at_686nx_init(const machine_t *);
extern int machine_at_mb600n_init(const machine_t *);
extern int machine_at_8500ttc_init(const machine_t *);

View File

@@ -376,13 +376,7 @@ machine_at_atc6310bxii_init(const machine_t *model)
int
machine_at_p6sba_init(const machine_t *model)
{
/*
AMI 440BX Board.
doesn't like the i686 CPU's.
10 -> D3 -> D1 POST. Probably KBC related.
*/
{
int ret;
ret = bios_load_linear(L"roms/machines/p6sba/SBAB21.ROM",
@@ -441,9 +435,6 @@ machine_at_p6sba_init(const machine_t *model)
int
machine_at_tsunamiatx_init(const machine_t *model)
{
/* AMI 440BX board. Requires the PC87309
and doesn't like the i686 CPUs */
int ret;
ret = bios_load_linear(L"roms/machines/tsunamiatx/bx46200f.rom",

View File

@@ -100,6 +100,37 @@ machine_at_mb600n_init(const machine_t *model)
return ret;
}
int
machine_at_v60n_init(const machine_t *model)
{
int ret;
ret = bios_load_linear(L"roms/machines/v60n/V60NE5.BIN",
0x000e0000, 131072, 0);
if (bios_only || !ret)
return ret;
machine_at_common_init(model);
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4);
pci_register_slot(0x0F, PCI_CARD_NORMAL, 2, 3, 4, 1);
pci_register_slot(0x10, PCI_CARD_NORMAL, 3, 4, 1, 2);
pci_register_slot(0x12, PCI_CARD_NORMAL, 4, 1, 2, 3);
pci_register_slot(0x0C, PCI_CARD_NORMAL, 2, 3, 4, 1);
device_add(&i440fx_device);
device_add(&piix3_device);
device_add(&keyboard_ps2_pci_device);
device_add(&fdc37c935_device);
device_add(&acerm3a_device);
device_add(&sst_flash_29ee010_device);
return ret;
}
int
machine_at_8500ttc_init(const machine_t *model)
{

View File

@@ -288,7 +288,7 @@ const machine_t machines[] = {
{ "[Socket 8 FX] Biostar MB-8500ttc", "8500ttc", {{"Intel", cpus_PentiumPro}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 1024, 8, 127, machine_at_8500ttc_init, NULL },
{ "[Socket 8 FX] Micronics M6MI", "m6mi", {{"Intel", cpus_PentiumPro}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 768, 8, 127, machine_at_m6mi_init, NULL },
{ "[Socket 8 FX] ASUS P/I-P65UP5 (C-P6ND)", "p65up5_cp6nd", {{"Intel", cpus_PentiumPro}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 1024, 8, 127, machine_at_p65up5_cp6nd_init, NULL },
{ "[Socket 8 FX] Acer V60N", "v60n", {{"Intel", cpus_PentiumPro}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 512, 8, 127, machine_at_v60n_init, NULL },
/* Slot 1 machines */
/* 440FX */
@@ -307,9 +307,9 @@ const machine_t machines[] = {
{ "[Slot 1 BX] ABit BF6", "bf6", {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL},{"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 768, 8, 255, machine_at_bf6_init, NULL },
{ "[Slot 1 BX] A-Trend ATC6310BXII", "atc6310bxii", {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL},{"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 768, 8, 255, machine_at_atc6310bxii_init, NULL },
#if defined(DEV_BRANCH) && defined(NO_SIO)
{ "[Slot 1 BX] Tyan Tsunami ATX", "tsunamiatx", {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL},{"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC | MACHINE_SOUND, 8, 1024, 8, 255, machine_at_tsunamiatx_init, at_tsunamiatx_get_device },
{ "[Slot 1 BX] Tyan Tsunami ATX", "tsunamiatx", {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"", NULL},{"", NULL},{"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC | MACHINE_SOUND, 8, 1024, 8, 255, machine_at_tsunamiatx_init, at_tsunamiatx_get_device },
#endif
{ "[Slot 1 BX] Supermicro P6SBA", "p6sba", {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL},{"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 768, 8, 255, machine_at_p6sba_init, NULL },
{ "[Slot 1 BX] Supermicro P6SBA", "p6sba", {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"", NULL},{"", NULL},{"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 768, 8, 255, machine_at_p6sba_init, NULL },
/* Slot 2 machines */
/* 440GX */