Attempt to fix issues after restore in case "large ramfile" support is used.

- bx_shadow_filedata_c: using tmpfile64() (same as memory code).
- memory parameters: minimum value set to -2 (means "swapped out").
- FIXME: restore issues still not fixed.
This commit is contained in:
Volker Ruppert 2021-06-23 20:59:08 +00:00
parent 3d852a208e
commit 4b465e5b50
2 changed files with 2 additions and 2 deletions

View File

@ -1287,7 +1287,7 @@ bool bx_real_sim_c::restore_bochs_param(bx_list_c *root, const char *sr_path, co
FILE **fpp = ((bx_shadow_filedata_c*)param)->get_fpp();
// If the temporary backing store file wasn't created, do it now.
if (*fpp == NULL)
*fpp = tmpfile();
*fpp = tmpfile64();
if (*fpp != NULL) {
while (!feof(fp2)) {
char buffer[64];

View File

@ -328,7 +328,7 @@ void BX_MEM_C::register_state()
bx_list_c *mapping = new bx_list_c(list, "mapping");
for (Bit32u blk=0; blk < num_blocks; blk++) {
sprintf(param_name, "blk%d", blk);
bx_param_num_c *param = new bx_param_num_c(mapping, param_name, "", "", 0, BX_MAX_BIT32U, 0);
bx_param_num_c *param = new bx_param_num_c(mapping, param_name, "", "", -2, BX_MAX_BIT32U, 0);
param->set_base(BASE_DEC);
param->set_sr_handlers(this, memory_param_save_handler, memory_param_restore_handler);
}