diff --git a/bochs/bochs.h b/bochs/bochs.h index 130305dc9..10ae25a90 100644 --- a/bochs/bochs.h +++ b/bochs/bochs.h @@ -351,9 +351,11 @@ extern bool bx_gui_sighandler; #define BX_PATHNAME_LEN 512 -#define BX_KBD_XT_TYPE 0 -#define BX_KBD_AT_TYPE 1 -#define BX_KBD_MF_TYPE 2 +enum { + BX_KBD_XT_TYPE = 0, + BX_KBD_AT_TYPE = 1, + BX_KBD_MF_TYPE = 2 +}; #define BX_N_OPTROM_IMAGES 4 #define BX_N_OPTRAM_IMAGES 4 diff --git a/bochs/cpu/icache.h b/bochs/cpu/icache.h index 71df0892e..fd789faac 100644 --- a/bochs/cpu/icache.h +++ b/bochs/cpu/icache.h @@ -28,12 +28,12 @@ extern void handleSMC(bx_phy_address pAddr, Bit32u mask); class bxPageWriteStampTable { - const Bit32u PHY_MEM_PAGES = 1024*1024; + const Bit32u PHY_MEM_PAGES_IN_4G_SPACE; Bit32u *fineGranularityMapping; public: - bxPageWriteStampTable() { - fineGranularityMapping = new Bit32u[PHY_MEM_PAGES]; + bxPageWriteStampTable(): PHY_MEM_PAGES_IN_4G_SPACE(1024*1024) { + fineGranularityMapping = new Bit32u[PHY_MEM_PAGES_IN_4G_SPACE]; resetWriteStamps(); } ~bxPageWriteStampTable() { delete [] fineGranularityMapping; } @@ -94,7 +94,7 @@ public: BX_CPP_INLINE void bxPageWriteStampTable::resetWriteStamps(void) { - for (Bit32u i=0; i