Attached files fixes some problems with nvram emulation: - whole nvram was erased in some conditions - fix out of range accesses - improve speed by keeping contents in memory
Sorry to not provide a patch for ds1225y.c, but it contains mixed line-endings and my diff/patch tools doesn't like that.
Index: hw/mips.h =================================================================== RCS file: /sources/qemu/qemu/hw/mips.h,v retrieving revision 1.1 diff -u -r1.1 mips.h --- hw/mips.h 17 Nov 2007 17:14:43 -0000 1.1 +++ hw/mips.h 3 Mar 2008 08:53:18 -0000 @@ -6,8 +6,8 @@ PCIBus *pci_gt64120_init(qemu_irq *pic); /* ds1225y.c */ -typedef struct ds1225y_t ds1225y_t; -ds1225y_t *ds1225y_init(target_phys_addr_t mem_base, const char *filename); +void *ds1225y_init(target_phys_addr_t mem_base, const char *filename); +void ds1225y_set_protection(void *opaque, int protection); /* g364fb.c */ int g364fb_mm_init(DisplayState *ds, uint8_t *vga_vram_base,