Fix build

This commit is contained in:
Jasmine Iwanek
2023-05-16 20:38:12 -04:00
parent fede9580a4
commit e9ffea19ae
3 changed files with 14 additions and 8 deletions

View File

@@ -2764,7 +2764,8 @@ i686_invalid_rdmsr:
void
cpu_WRMSR(void)
{
uint64_t temp, temp2;
uint64_t temp;
uint64_t temp2;
cpu_log("WRMSR %08X %08X%08X\n", ECX, EDX, EAX);

View File

@@ -134,8 +134,8 @@ static uint8_t *_mem_exec[MEM_MAPPINGS_NO];
static uint8_t ff_pccache[4] = { 0xff, 0xff, 0xff, 0xff };
static mem_state_t _mem_state[MEM_MAPPINGS_NO];
static uint8_t *mtrr_areas[MEM_MAPPINGS_NO];
static uint8_t mtrr_area_refcounts[MEM_MAPPINGS_NO];
static uint8_t *mtrr_areas[MEM_MAPPINGS_NO];
static uint8_t mtrr_area_refcounts[MEM_MAPPINGS_NO];
static uint32_t remap_start_addr;
static uint32_t remap_start_addr2;
@@ -2879,7 +2879,7 @@ mem_reset(void)
memset(pages, 0x00, pages_sz * sizeof(page_t));
for (c = 0; c < MEM_MAPPINGS_NO; c++) {
for (uint32_t c = 0; c < MEM_MAPPINGS_NO; c++) {
if (mtrr_areas[c]) {
free(mtrr_areas[c]);
mtrr_areas[c] = 0;
@@ -3190,7 +3190,9 @@ void
mem_add_mtrr(uint64_t base, uint64_t mask, uint8_t type)
{
uint64_t size = ((~mask) & 0xffffffff) + 1;
uint64_t page_base, page, addr;
uint64_t page_base;
uint64_t page;
uint64_t addr;
uint8_t *mtrr;
mem_log("Adding MTRR base=%08llx mask=%08llx size=%08llx type=%d\n", base, mask, size, type);
@@ -3232,7 +3234,8 @@ void
mem_del_mtrr(uint64_t base, uint64_t mask)
{
uint64_t size = ((~mask) & 0xffffffff) + 1;
uint64_t page_base, page;
uint64_t page_base;
uint64_t page;
mem_log("Deleting MTRR base=%08llx mask=%08llx size=%08llx\n", base, mask, size);
@@ -3265,7 +3268,9 @@ mem_del_mtrr(uint64_t base, uint64_t mask)
void
mem_invalidate_mtrr(uint8_t wb)
{
uint64_t page, page_base, addr;
uint64_t page;
uint64_t page_base;
uint64_t addr;
uint8_t *mtrr;
mem_log("Invalidating cache (writeback=%d)\n", wb);

View File

@@ -895,7 +895,7 @@ nvr_start(nvr_t *nvr)
/* Re-compute CMOS checksum. SeaBIOS doesn't care
about the checksum either, but Windows does. */
uint16_t checksum = 0;
for (i = 0x10; i <= 0x2d; i++)
for (uint8_t i = 0x10; i <= 0x2d; i++)
checksum += nvr->regs[i];
nvr->regs[0x2e] = (checksum >> 8);
nvr->regs[0x2f] = checksum;