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:
parent
3d852a208e
commit
4b465e5b50
@ -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];
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user