Index: Makefile.target =================================================================== RCS file: /sources/qemu/qemu/Makefile.target,v retrieving revision 1.230 diff -p -u -r1.230 Makefile.target --- Makefile.target 2 Dec 2007 02:20:02 -0000 1.230 +++ Makefile.target 9 Dec 2007 14:03:20 -0000 @@ -482,7 +482,7 @@ VL_OBJS+= cirrus_vga.o parallel.o ptimer else VL_OBJS+= sun4m.o tcx.o pcnet.o iommu.o m48t59.o slavio_intctl.o VL_OBJS+= slavio_timer.o slavio_serial.o slavio_misc.o fdc.o esp.o sparc32_dma.o -VL_OBJS+= cs4231.o ptimer.o +VL_OBJS+= cs4231.o ptimer.o eccmemctl.o endif endif ifeq ($(TARGET_BASE_ARCH), arm) Index: hw/sun4m.c =================================================================== RCS file: /sources/qemu/qemu/hw/sun4m.c,v retrieving revision 1.67 diff -p -u -r1.67 sun4m.c --- hw/sun4m.c 4 Dec 2007 20:58:31 -0000 1.67 +++ hw/sun4m.c 9 Dec 2007 14:03:24 -0000 @@ -82,6 +82,8 @@ struct hwdef { uint32_t intbit_to_level[32]; uint64_t max_mem; const char * const default_cpu_model; + target_phys_addr_t ecc_base; + uint32_t ecc_version; }; /* TSC handling */ @@ -479,6 +481,9 @@ static void sun4m_hw_init(const struct h nvram_init(nvram, (uint8_t *)&nd_table[0].macaddr, kernel_cmdline, boot_device, RAM_size, kernel_size, graphic_width, graphic_height, graphic_depth, hwdef->machine_id); + + if (hwdef->ecc_base != (target_phys_addr_t)-1) + ecc_init(hwdef->ecc_base, hwdef->ecc_version); } static const struct hwdef hwdefs[] = { @@ -517,6 +522,7 @@ static const struct hwdef hwdefs[] = { }, .max_mem = 0x10000000, .default_cpu_model = "Fujitsu MB86904", + .ecc_base = -1, }, /* SS-10 */ { @@ -553,6 +559,8 @@ static const struct hwdef hwdefs[] = { }, .max_mem = 0xffffffff, // XXX actually first 62GB ok .default_cpu_model = "TI SuperSparc II", + .ecc_base = 0xf00000000ULL, + .ecc_version = 0x10000000, // version 0, implementation 1 }, /* SS-600MP */ { @@ -589,6 +597,8 @@ static const struct hwdef hwdefs[] = { }, .max_mem = 0xffffffff, // XXX actually first 62GB ok .default_cpu_model = "TI SuperSparc II", + .ecc_base = 0xf00000000ULL, + .ecc_version = 0x00000000, // version 0, implementation 0 }, }; Index: hw/sun4m.h =================================================================== RCS file: /sources/qemu/qemu/hw/sun4m.h,v retrieving revision 1.3 diff -p -u -r1.3 sun4m.h --- hw/sun4m.h 4 Dec 2007 20:58:31 -0000 1.3 +++ hw/sun4m.h 9 Dec 2007 14:03:24 -0000 @@ -72,4 +72,7 @@ void espdma_memory_write(void *opaque, u void lance_init(NICInfo *nd, target_phys_addr_t leaddr, void *dma_opaque, qemu_irq irq, qemu_irq *reset); +/* eccmemctl.c */ +void *ecc_init(target_phys_addr_t base, uint32_t version); + #endif