[OpenBIOS] [PATCH] SPARC64: fix up dma-* words
Mark Cave-Ayland
mark.cave-ayland at ilande.co.uk
Sun Aug 26 15:20:42 CEST 2018
On 19/08/18 11:47, Mark Cave-Ayland wrote:
> Commit 8584d42 "SPARC64: implement dma-* words" introduced the dma-* words
> for SPARC64 but accidentally introduced an older prototype implementation
> (probably introduced during a rebase) rather than using the correct defer
> words.
>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
> ---
> arch/sparc64/tree.fs | 13 +++++--------
> 1 file changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/arch/sparc64/tree.fs b/arch/sparc64/tree.fs
> index a1d5620..af8948d 100644
> --- a/arch/sparc64/tree.fs
> +++ b/arch/sparc64/tree.fs
> @@ -52,26 +52,23 @@ include config.fs
> : decode-unit decode-unit-upa ;
>
> : dma-sync ( virt devaddr size -- )
> - s" (dma-sync)" $find if execute then
> + (dma-sync)
> ;
>
> : dma-alloc ( size -- virt )
> - \ OpenBIOS doesn't enable the sun4u IOMMU so we can fall back to using
> - \ alloc-mem
> - h# 2000 + alloc-mem dup
> - h# 2000 1 - and - \ align to 8K page size
> + (dma-alloc)
> ;
>
> : dma-free ( virt size -- )
> - 2drop
> + (dma-free)
> ;
>
> : dma-map-in ( virt size cacheable? -- devaddr )
> - 2drop
> + (dma-map-in)
> ;
>
> : dma-map-out ( virt devaddr size -- )
> - dma-sync
> + (dma-map-out)
> ;
>
> new-device
Applied to master.
ATB,
Mark.
More information about the OpenBIOS
mailing list