X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fnvram.c;fp=palacios%2Fsrc%2Fdevices%2Fnvram.c;h=59e200303b6470328cc6fa5b2e148f0422f897c1;hb=165560d91368d638b177022f883d3723d7618944;hp=15c8dfa885e37b87c96f64113d5515beb78476e6;hpb=9b31f917eae9b397cb21ff78d81084301b289e43;p=palacios.git diff --git a/palacios/src/devices/nvram.c b/palacios/src/devices/nvram.c index 15c8dfa..59e2003 100644 --- a/palacios/src/devices/nvram.c +++ b/palacios/src/devices/nvram.c @@ -428,7 +428,15 @@ static int handle_timer_event(struct guest_info * info, } static int set_nvram_defaults(struct vm_device * dev) { + struct guest_info * info = dev->vm; struct nvram_internal * nvram_state = (struct nvram_internal *)dev->private_data; + + /* TODO: + * The amount of ram in the system is stored in info->mem_size + * We need to reflect that value correctly here + */ + PrintError("TODO: Set the nvram memory register to reflect info->mem_size (%p)\n", (void *)(info->mem_size)); + // // 2 1.44 MB floppy drives @@ -593,7 +601,7 @@ static int nvram_write_data_port(ushort_t port, static int nvram_init_device(struct vm_device * dev) { - + struct nvram_internal * data = (struct nvram_internal *)dev->private_data; PrintDebug("nvram: init_device\n"); @@ -602,6 +610,8 @@ static int nvram_init_device(struct vm_device * dev) { // Would read state here set_nvram_defaults(dev); + + nvram_reset_device(dev);