Properly enabled SMM (and with the correct SMBASE) on AMD 486 CPU's.
This commit is contained in:
@@ -262,6 +262,7 @@ cdi_get_audio_tracks(cd_img_t *cdi, int *st_track, int *end, TMSF *lead_out)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* TODO: This never returns anything other than 1, should it even be an int? */
|
||||||
int
|
int
|
||||||
cdi_get_audio_tracks_lba(cd_img_t *cdi, int *st_track, int *end, uint32_t *lead_out)
|
cdi_get_audio_tracks_lba(cd_img_t *cdi, int *st_track, int *end, uint32_t *lead_out)
|
||||||
{
|
{
|
||||||
|
@@ -74,9 +74,10 @@ smram_t temp_smram[2];
|
|||||||
/* SMM feature masks */
|
/* SMM feature masks */
|
||||||
#define SMM_IO_INSTRUCTION_RESTART (0x00010000)
|
#define SMM_IO_INSTRUCTION_RESTART (0x00010000)
|
||||||
#define SMM_SMBASE_RELOCATION (0x00020000)
|
#define SMM_SMBASE_RELOCATION (0x00020000)
|
||||||
|
#define SMM_REVISION (0x20000000)
|
||||||
|
|
||||||
/* TODO: Which CPU added SMBASE relocation? */
|
/* TODO: Which CPU added SMBASE relocation? */
|
||||||
#define SMM_REVISION_ID SMM_SMBASE_RELOCATION
|
#define SMM_REVISION_ID (SMM_SMBASE_RELOCATION | SMM_IO_INSTRUCTION_RESTART | SMM_REVISION)
|
||||||
|
|
||||||
#define SMM_SAVE_STATE_MAP_SIZE 128
|
#define SMM_SAVE_STATE_MAP_SIZE 128
|
||||||
|
|
||||||
@@ -989,7 +990,7 @@ enter_smm(int in_hlt)
|
|||||||
uint32_t smram_state = smbase + 0x10000;
|
uint32_t smram_state = smbase + 0x10000;
|
||||||
|
|
||||||
/* If it's a CPU on which SMM is not supporter, do nothing. */
|
/* If it's a CPU on which SMM is not supporter, do nothing. */
|
||||||
if (!is_pentium && !is_k5 && !is_k6 && !is_p6)
|
if (!is_am486 && !is_pentium && !is_k5 && !is_k6 && !is_p6)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
x386_common_log("enter_smm(): smbase = %08X\n", smbase);
|
x386_common_log("enter_smm(): smbase = %08X\n", smbase);
|
||||||
@@ -1146,7 +1147,7 @@ leave_smm(void)
|
|||||||
uint32_t smram_state = smbase + 0x10000;
|
uint32_t smram_state = smbase + 0x10000;
|
||||||
|
|
||||||
/* If it's a CPU on which SMM is not supported (or not implemented in 86Box), do nothing. */
|
/* If it's a CPU on which SMM is not supported (or not implemented in 86Box), do nothing. */
|
||||||
if (!is_pentium && !is_k5 && !is_k6 && !is_p6)
|
if (!is_am486 && !is_pentium && !is_k5 && !is_k6 && !is_p6)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
memset(saved_state, 0x00, SMM_SAVE_STATE_MAP_SIZE * sizeof(uint32_t));
|
memset(saved_state, 0x00, SMM_SAVE_STATE_MAP_SIZE * sizeof(uint32_t));
|
||||||
|
@@ -980,7 +980,7 @@ reset_common(int hard)
|
|||||||
smi_block = 0;
|
smi_block = 0;
|
||||||
|
|
||||||
if (hard) {
|
if (hard) {
|
||||||
smbase = 0x00030000;
|
smbase = is_am486 ? 0x00060000 : 0x00030000;
|
||||||
ppi_reset();
|
ppi_reset();
|
||||||
}
|
}
|
||||||
in_sys = 0;
|
in_sys = 0;
|
||||||
|
Reference in New Issue
Block a user