mcr p15, 0, r3, c7, c14, 2NetBSD uses this in "cpufunc" in the routine:
armv7_dcache_wbinv_all().The question is whether this is supported on all of the v7 chips I intend to work with. It is certainly available on the Cortex-A7 MPCore in the Allwinner H3.
Bring up the specific Cortex manual, go to "System Control" then "Register summary",
then c7 registers. There it is for the A7 MPCore along with its brother DCCIMVAC.
They are there for the Cortex A8 (hence the BBB).
They are there for the Cortex A9 (hence the Zynq).
I have also seen this instruction described as "write back and invalidate". In other words "clean" and "write back" mean the same thing. Notice also that there is a separate instruction to do just "clean" and another to do just "invalidate". This instruction combines them both.
The "fdt" scheme (flattened device table) depends on a dtb file being placed by Uboot in a spot where NetBSD expects it. The dtb file itself is generated (compiled) from sources. We would like to find the sources for the allwinner-h3 (not to mention the BBB and the zynq). Using locate along with grep I find two places where likely sources can be found:
/u1/NetBSD/Git/src/sys/arch/arm/dts/sun8i-h3-orangepi-one.dts /u1/NetBSD/Git/src/sys/external/gpl2/dts/dist/arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dtsEverything was once in the first place (arch/arm/dts), but apparently some GPL2 licensing concerns made the NetBSD group segregate many files to external/gpl2/dts/dist/arch/arm/boot/dts.
The first location has a number of things of interest:
omap3-beagle.dts sun8i-h3-nanopi-neo.dts
The first is mostly a link to external/gpl2/dts/dist/arch/arm/boot/dts/omap3-beagle.dts
The second is mostly a link to external/gpl2/dts/dist/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
The second location (/u1/NetBSD/Git/src/sys/external/gpl2/dts/dist/arch/arm/boot/dts) is the gold mine.
zynq-7000.dtsi zynq-zybo.dts omap34xx.dtsi omap3-beagle.dts sun8i-h3.dtsi sun8i-h3-orangepi-pc.dts sun8i-h3-orangepi-pc-plus.dts sunxi-h3-h5.dtsi sun8i-h3.dtsi sun8i-h3-nanopi.dtsi sun8i-h3-nanopi-neo.dtsI am at a loss to find a ram/memory declaration for any of the H3 boards. I have spent a fair while searching for this, and for my purposes I should just assume that an entry of the same form as one of the two following gets magically generated for the h3 boards.
The RAM declaration for the BBB is:
memory@80000000 { device_type = "memory"; reg = <0x80000000 0x10000000>; /* 256 MB */ };
For the Zynq/zybo we have:
memory@0 { device_type = "memory"; reg = <0x0 0x20000000>; };
Kyu / [email protected]