Updates and fixes

This commit is contained in:
Jasmine Iwanek
2024-08-03 18:48:30 -04:00
parent 6e96590a2b
commit 7eda3929f4
6 changed files with 19 additions and 14 deletions

View File

@@ -136,8 +136,7 @@ acpi_timer_overflow(void *priv)
dev->regs.pmsts |= TMROF_STS;
/*
if (dev->regs.pmen & 1) /* Timer Overflow Interrupt Enable */
{
if (dev->regs.pmen & 1) { /* Timer Overflow Interrupt Enable */
acpi_log("ACPI: Overflow detected. Provoking an %s\n", sci_en ? "SCI" : "SMI");
if (sci_en) /* Trigger an SCI or SMI depending on the status of the SCI_EN register */
@@ -2162,6 +2161,9 @@ acpi_reg_read_common(int size, uint16_t addr, void *priv)
case VEN_INTEL:
ret = acpi_reg_read_intel(size, addr, priv);
break;
case VEN_INTEL_ICH2:
ret = acpi_reg_read_intel_ich2(size, addr, priv);
break;
case VEN_SMC:
ret = acpi_reg_read_smc(size, addr, priv);
break;
@@ -2209,6 +2211,9 @@ acpi_reg_write_common(int size, uint16_t addr, uint8_t val, void *priv)
case VEN_INTEL:
acpi_reg_write_intel(size, addr, val, priv);
break;
case VEN_INTEL_ICH2:
acpi_reg_write_intel_ich2(size, addr, val, priv);
break;
case VEN_SMC:
acpi_reg_write_smc(size, addr, val, priv);
break;

View File

@@ -129,6 +129,7 @@ intel_lsmm_segment_recalc(intel_815ep_t *dev, uint8_t val)
case 3:
smram_enable(dev->lsmm_segment, 0x000a0000, 0x000a0000, 0x20000, 0, 1);
break;
default:
break;
}

View File

@@ -307,10 +307,9 @@ typedef struct {
uint64_t mtrr_fix16k_8000; /* 0x00000258 */
uint64_t mtrr_fix16k_a000; /* 0x00000259 */
uint64_t mtrr_fix4k[8]; /* 0x00000268 - 0x0000026f */
uint64_t mtrr_deftype; /* 0x000002ff */
/* Pentium Pro, Pentium II Klamath, and Pentium II Deschutes MSR's */
uint64_t pat; /* 0x00000277 - Pentium II Deschutes and later */
uint64_t pat; /* 0x00000277 - Pentium II Deschutes and later */
/* Pentium Pro, Pentium II Klamath, and Pentium II Deschutes MSR's that are also
on the VIA Cyrix III */
@@ -323,7 +322,7 @@ typedef struct {
uint64_t ecx19d; /* 0x0000019d */
/* Pentium Pro, Pentium II Klamath, and Pentium II Deschutes MSR's */
uint64_t mca_ctl[5]; /* 0x00000400, 0x00000404, 0x00000408, 0x0000040c, 0x00000410 */
uint64_t mca_ctl[5]; /* 0x00000400, 0x00000404, 0x00000408, 0x0000040c, 0x00000410 - Machine Check Architecture */
uint64_t ecx570; /* 0x00000570 */
/* Other/Unclassified MSRs */
@@ -420,7 +419,7 @@ typedef struct {
#define in_smm cpu_state._in_smm
#define smi_line cpu_state._smi_line
#define smbase cpu_state._smbase
#define smbase cpu_state._smbase
/*The cpu_state.flags below must match in both cpu_cur_status and block->status for a block
to be valid*/

View File

@@ -1808,8 +1808,8 @@ pmodeiret(int is32)
{
uint16_t newss;
uint16_t seg = 0;
uint16_t segdat[4];
uint16_t segdat2[4];
uint16_t segdat[4] = { 0 };
uint16_t segdat2[4] = { 0 };
uint16_t segs[4];
uint32_t tempflags;
uint32_t flagmask;

View File

@@ -154,7 +154,7 @@ pci_bridge_write(int func, int addr, uint8_t val, void *priv)
val &= 0x01;
else if (AGP_BRIDGE_ALI(dev->local))
val &= 0x01;
else if (PCI_BRIDGE_INTEL_ICH2)
else if (dev->local == PCI_BRIDGE_INTEL_ICH2)
val &= 0x01;
else
val &= 0x03;

View File

@@ -15723,7 +15723,7 @@ const machine_t machines[] = {
.gpio = 0,
.device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.sio_device = &it8702_device,
.vid_device = NULL,
.snd_device = NULL,
.net_device = NULL
@@ -15761,7 +15761,7 @@ const machine_t machines[] = {
.gpio = 0,
.device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.sio_device = &w83627hf_device,
.vid_device = NULL,
.snd_device = NULL,
.net_device = NULL
@@ -15800,7 +15800,7 @@ const machine_t machines[] = {
.gpio = 0,
.device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.sio_device = &nsc366_device,
.vid_device = NULL,
.snd_device = NULL,
.net_device = NULL
@@ -15838,7 +15838,7 @@ const machine_t machines[] = {
.gpio = 0,
.device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.sio_device = &nsc366_device,
.vid_device = NULL,
.snd_device = NULL,
.net_device = NULL
@@ -15876,7 +15876,7 @@ const machine_t machines[] = {
.gpio = 0,
.device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.sio_device = &nsc366_device,
.vid_device = NULL,
.snd_device = NULL,
.net_device = NULL