On 21/05/18 22:33, Mark Cave-Ayland wrote:
This patchset is something I've been working on for a while and started off with the aim of getting rid of the "dma-alloc" console warnings whilst booting *BSD images on PPC, but ended up as a full implementation for SPARC32/SPARC64 and PPC.
The patchset is fairly straightfoward: the first few patches rework the SPARC32 DVMA functions to make them usable from Forth, whilst patch 8 adds a missing D-cache flush for PPC which could certainly do with another set of eyes.
The remainder of the patches add PPC and SPARC64 support before adding in the complete "dma-*" $call-parent chains to enable devices to call the DMA functions as indicated in the IEEE-1275 specification and various FCode examples found around the net.
Finally the last 2 patches switch the esp SCSI driver over to use the IEEE-1275 Forth words instead of calling the low-level C functions directly.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Mark Cave-Ayland (15): dma: add defers for the dma-* words SPARC32: rename dvma_alloc()'s ba variable to iova SPARC32: allocate contiguous physical memory for DVMA SPARC32: implement dvma_map_in() for DMA IOVA to phys translation SPARC32: move pgtsrmmu.h from arch/sparc32 to include/arch/sparc32 SPARC32: implement dvma_sync() function for synchronising DMA memory SPARC32: implement dma-* words PPC: add flush_dcache_range() to start.S PPC: implement dma-* words SPARC64: implement dma-* words macio: add missing REGISTER_NODE for New World macio devices pci: add dma-* call-parent chain to all PCI devices and bridges sbus: add dma-* call-parent chain to all PCI devices and bridges esp: switch creation of esp device over to use new-device esp: switch over to using dma-alloc/dma-map-in
arch/ppc/qemu/init.c | 35 +++++++ arch/ppc/qemu/kernel.h | 1 + arch/ppc/qemu/start.S | 21 ++++ arch/ppc/qemu/tree.fs | 40 ++++++++ arch/sparc32/lib.c | 2 +- arch/sparc32/ofmem_sparc32.c | 2 +- arch/sparc32/openbios.c | 47 ++++++++- arch/sparc32/tree.fs | 56 +++++++++++ arch/sparc64/openbios.c | 40 ++++++++ arch/sparc64/tree.fs | 47 +++++++++ drivers/esp.c | 159 ++++++++++++++++++++---------- drivers/ide.c | 40 ++++++++ drivers/iommu.c | 95 +++++++++++++++--- drivers/macio.c | 36 +++++++ drivers/pci.c | 40 ++++++++ forth/device/other.fs | 8 +- forth/device/table.fs | 2 +- forth/util/util.fs | 9 ++ {arch => include/arch}/sparc32/pgtsrmmu.h | 0 include/drivers/drivers.h | 4 +- packages/disk-label.fs | 39 ++++++++ 21 files changed, 646 insertions(+), 77 deletions(-) rename {arch => include/arch}/sparc32/pgtsrmmu.h (100%)
No further comments, and this has passed all my local boot tests across SPARC32, SPARC64 and PPC so I've pushed it to master.
ATB,
Mark.