diff options
author | sam <sam@FreeBSD.org> | 2009-06-17 03:09:13 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2009-06-17 03:09:13 +0000 |
commit | c00ecac84fae9ac8e3109e4644496ce33699974d (patch) | |
tree | 43b4695a7765ff1d246fe9e4fc5773eee47accdd /sys/arm | |
parent | 8052549ad29d9dbc59124c2924109efd906529c5 (diff) | |
download | FreeBSD-src-c00ecac84fae9ac8e3109e4644496ce33699974d.zip FreeBSD-src-c00ecac84fae9ac8e3109e4644496ce33699974d.tar.gz |
correct data/instruction memory sizes for non-ixp425 parts (these
are only used to bounds-check writes when loading firmware)
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/xscale/ixp425/ixp425_npe.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/arm/xscale/ixp425/ixp425_npe.c b/sys/arm/xscale/ixp425/ixp425_npe.c index 0aa162a..fe102eb 100644 --- a/sys/arm/xscale/ixp425/ixp425_npe.c +++ b/sys/arm/xscale/ixp425/ixp425_npe.c @@ -306,8 +306,14 @@ ixpnpe_attach(device_t dev, int npeid) sc->sc_nrefs = 1; sc->sc_size = config->size; - sc->insMemSize = config->ins_memsize; /* size of instruction memory */ - sc->dataMemSize = config->data_memsize; /* size of data memory */ + if (cpu_is_ixp42x()) { + /* NB: instruction/data memory sizes are NPE-dependent */ + sc->insMemSize = config->ins_memsize; + sc->dataMemSize = config->data_memsize; + } else { + sc->insMemSize = IXP46X_NPEDL_INS_MEMSIZE_WORDS; + sc->dataMemSize = IXP46X_NPEDL_DATA_MEMSIZE_WORDS; + } if (bus_space_map(sc->sc_iot, config->base, sc->sc_size, 0, &sc->sc_ioh)) panic("%s: Cannot map registers", device_get_name(dev)); |