Date: Tue, 18 Jul 2006 22:58:40 GMT From: Olivier Houchard <cognet@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 101884 for review Message-ID: <200607182258.k6IMweEl040867@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=101884 Change 101884 by cognet@cognet on 2006/07/18 22:58:18 Working cpu_reset(). Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425.c#2 (text+ko) ==== @@ -46,6 +46,8 @@ #include <sys/rman.h> #include <machine/bus.h> #include <machine/intr.h> +#include <vm/vm.h> +#include <vm/pmap.h> #include <arm/xscale/ixp425/ixp425reg.h> #include <arm/xscale/ixp425/ixp425var.h> @@ -93,6 +95,7 @@ struct ixp425_softc *sc = device_get_softc(dev); int unit = device_get_unit(dev); sc->sc_iot = &ixp425_bs_tag; + ixp425_softc = sc; /* * Mapping for PCI CSR @@ -158,8 +161,31 @@ void cpu_reset() { + int reg; + (void) disable_interrupts(I32_bit|F32_bit); IXPREG(IXP425_INT_ENABLE) = 0; + /* + * Map the boot Flash device down at physical address 0. + */ + reg = bus_space_read_4(ixp425_softc->sc_iot, IXP425_EXP_VBASE, + EXP_CNFG0_OFFSET); + reg |= EXP_CNFG0_MEM_MAP; + bus_space_write_4(ixp425_softc->sc_iot, IXP425_EXP_VBASE, + EXP_CNFG0_OFFSET, reg); + pmap_kenter_section(0x00000000, 0x00000000, 0); + cpu_idcache_wbinv_all(); + /* Jump into the bootcode's reset vector. */ + __asm __volatile( + "mrc p15, 0, %0, c1, c0, 0\n" + "bic %0, %0, #1\n" /* Disable MMU */ + "mcr p15, 0, %0, c1, c0, 0\n" + "nop\n" + "nop\n" + "nop\n" + "mov pc, #0\n" + : "=r" (reg)); + printf("Reset failed!\n"); for(;;); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607182258.k6IMweEl040867>