Some CPU fixes, should fix compiling.
This commit is contained in:
@@ -358,6 +358,8 @@ cpu_set(void)
|
||||
acycs = 0;
|
||||
#endif
|
||||
|
||||
soft_reset_pci = 0;
|
||||
|
||||
cpu_alt_reset = 0;
|
||||
unmask_a20_in_smm = 0;
|
||||
|
||||
|
@@ -698,6 +698,10 @@ typedef struct
|
||||
extern uint32_t addr64, addr64_2;
|
||||
extern uint32_t addr64a[8], addr64a_2[8];
|
||||
|
||||
extern int soft_reset_pci;
|
||||
|
||||
extern int reset_on_hlt, hlt_reset_pending;
|
||||
|
||||
extern cyrix_t cyrix;
|
||||
|
||||
extern void (*cpu_exec)(int cycs);
|
||||
|
@@ -31,6 +31,7 @@
|
||||
#include <86box/rom.h>
|
||||
#include <86box/nmi.h>
|
||||
#include <86box/pic.h>
|
||||
#include <86box/pci.h>
|
||||
#include <86box/ppi.h>
|
||||
#include <86box/timer.h>
|
||||
|
||||
@@ -56,7 +57,7 @@ uint64_t xt_cpu_multi;
|
||||
int nmi = 0, nmi_auto_clear = 0;
|
||||
|
||||
/* Was the CPU ever reset? */
|
||||
int x86_was_reset = 0;
|
||||
int x86_was_reset = 0, soft_reset_pci = 0;
|
||||
|
||||
/* Is the TRAP flag on? */
|
||||
int trap = 0;
|
||||
@@ -64,6 +65,9 @@ int trap = 0;
|
||||
/* The current effective address's segment. */
|
||||
uint32_t easeg;
|
||||
|
||||
/* This is for the OPTI 283 special reset handling mode. */
|
||||
int reset_on_hlt, hlt_reset_pending;
|
||||
|
||||
|
||||
#ifdef ENABLE_X86_LOG
|
||||
void dumpregs(int);
|
||||
@@ -216,15 +220,28 @@ makeznptable(void)
|
||||
static void
|
||||
reset_common(int hard)
|
||||
{
|
||||
/* Make sure to gracefully leave SMM. */
|
||||
if (in_smm)
|
||||
leave_smm();
|
||||
|
||||
#ifdef ENABLE_808X_LOG
|
||||
if (hard)
|
||||
x808x_log("x86 reset\n");
|
||||
#endif
|
||||
|
||||
if (!hard && reset_on_hlt) {
|
||||
hlt_reset_pending++;
|
||||
pclog("hlt_reset_pending = %i\n", hlt_reset_pending);
|
||||
if (hlt_reset_pending == 2)
|
||||
hlt_reset_pending = 0;
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
/* Make sure to gracefully leave SMM. */
|
||||
if (in_smm)
|
||||
leave_smm();
|
||||
|
||||
/* Needed for the ALi M1533. */
|
||||
if (soft_reset_pci && !hard)
|
||||
pci_reset();
|
||||
|
||||
use32 = 0;
|
||||
cpu_cur_status = 0;
|
||||
stack32 = 0;
|
||||
@@ -290,6 +307,9 @@ reset_common(int hard)
|
||||
shadowbios = shadowbios_write = 0;
|
||||
alt_access = cpu_end_block_after_ins = 0;
|
||||
|
||||
if (hard)
|
||||
reset_on_hlt = hlt_reset_pending = 0;
|
||||
|
||||
if (!is286)
|
||||
reset_808x(hard);
|
||||
}
|
||||
|
Reference in New Issue
Block a user