resolve github issue #57 + more clear variable name

This commit is contained in:
Shwartsman 2023-11-07 16:10:41 +02:00
parent 30d285b80f
commit 8f30812180
2 changed files with 9 additions and 7 deletions

View File

@ -351,9 +351,11 @@ extern bool bx_gui_sighandler;
#define BX_PATHNAME_LEN 512 #define BX_PATHNAME_LEN 512
#define BX_KBD_XT_TYPE 0 enum {
#define BX_KBD_AT_TYPE 1 BX_KBD_XT_TYPE = 0,
#define BX_KBD_MF_TYPE 2 BX_KBD_AT_TYPE = 1,
BX_KBD_MF_TYPE = 2
};
#define BX_N_OPTROM_IMAGES 4 #define BX_N_OPTROM_IMAGES 4
#define BX_N_OPTRAM_IMAGES 4 #define BX_N_OPTRAM_IMAGES 4

View File

@ -28,12 +28,12 @@ extern void handleSMC(bx_phy_address pAddr, Bit32u mask);
class bxPageWriteStampTable class bxPageWriteStampTable
{ {
const Bit32u PHY_MEM_PAGES = 1024*1024; const Bit32u PHY_MEM_PAGES_IN_4G_SPACE;
Bit32u *fineGranularityMapping; Bit32u *fineGranularityMapping;
public: public:
bxPageWriteStampTable() { bxPageWriteStampTable(): PHY_MEM_PAGES_IN_4G_SPACE(1024*1024) {
fineGranularityMapping = new Bit32u[PHY_MEM_PAGES]; fineGranularityMapping = new Bit32u[PHY_MEM_PAGES_IN_4G_SPACE];
resetWriteStamps(); resetWriteStamps();
} }
~bxPageWriteStampTable() { delete [] fineGranularityMapping; } ~bxPageWriteStampTable() { delete [] fineGranularityMapping; }
@ -94,7 +94,7 @@ public:
BX_CPP_INLINE void bxPageWriteStampTable::resetWriteStamps(void) BX_CPP_INLINE void bxPageWriteStampTable::resetWriteStamps(void)
{ {
for (Bit32u i=0; i<PHY_MEM_PAGES; i++) { for (Bit32u i=0; i<PHY_MEM_PAGES_IN_4G_SPACE; i++) {
fineGranularityMapping[i] = 0; fineGranularityMapping[i] = 0;
} }
} }