[SLOF] [PATCH 1/2] Move archsupport.fs into board-qemu directory

Nikunj A Dadhania nikunj at linux.vnet.ibm.com
Wed Dec 23 16:28:07 AEDT 2015


Thomas Huth <thuth at redhat.com> writes:

> The "hv-cas" hypercall is only available on board-qemu.
> Including archsupport.fs on board-js2x breaks the boot
> process there. Thus the archsupport.fs file should
> reside in the board-qemu/slof directory instead and
> only be included from there.
>
> Signed-off-by: Thomas Huth <thuth at redhat.com>

Reviewed-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>

> ---
>  board-qemu/slof/archsupport.fs | 38 ++++++++++++++++++++++++++++++++++++++
>  board-qemu/slof/tree.fs        |  2 ++
>  slof/fs/archsupport.fs         | 38 --------------------------------------
>  slof/fs/root.fs                |  1 -
>  4 files changed, 40 insertions(+), 39 deletions(-)
>  create mode 100644 board-qemu/slof/archsupport.fs
>  delete mode 100644 slof/fs/archsupport.fs
>
> diff --git a/board-qemu/slof/archsupport.fs b/board-qemu/slof/archsupport.fs
> new file mode 100644
> index 0000000..f564ab4
> --- /dev/null
> +++ b/board-qemu/slof/archsupport.fs
> @@ -0,0 +1,38 @@
> +\ *****************************************************************************
> +\ * Copyright (c) 2011 IBM Corporation
> +\ * All rights reserved.
> +\ * This program and the accompanying materials
> +\ * are made available under the terms of the BSD License
> +\ * which accompanies this distribution, and is available at
> +\ * http://www.opensource.org/licenses/bsd-license.php
> +\ *
> +\ * Contributors:
> +\ *     IBM Corporation - initial implementation
> +\ ****************************************************************************/
> +
> +\ 128KB FDT buffer size is enough to accommodate 255 CPU cores and 1TB of
> +\ maxmem specification.
> +20000 VALUE size
> +: ibm,client-architecture-support         ( vec -- err? )
> +    \ Store require parameters in nvram
> +    \ to come back to right boot device
> +    \ Allocate memory for H_CALL
> +    size alloc-mem                        ( vec memaddr )
> +    swap over size                        ( memaddr vec memaddr size )
> +    \ make h_call to hypervisor
> +    hv-cas 0= IF                          ( memaddr )
> +	dup l@ 1 >= IF                    \ Version number >= 1
> +	    \ Make required changes
> +	    " /" find-node set-node
> +	    dup 4 + fdt-init
> +	    fdt-check-header
> +	    fdt-struct fdt-fix-cas-node
> +	    fdt-fix-cas-success NOT
> +	ELSE
> +	    FALSE
> +	THEN
> +    ELSE
> +	TRUE
> +    THEN
> +    >r size free-mem r>
> +;
> diff --git a/board-qemu/slof/tree.fs b/board-qemu/slof/tree.fs
> index 4aba4c5..78dafab 100644
> --- a/board-qemu/slof/tree.fs
> +++ b/board-qemu/slof/tree.fs
> @@ -26,6 +26,8 @@
>  \ 2 encode-int s" #size-cells" property
>  \ s" chrp" device-type
>
> +#include "archsupport.fs"
> +
>  480 cp
>
>  \ See 3.6.5, and the PowerPC OF binding document.
> diff --git a/slof/fs/archsupport.fs b/slof/fs/archsupport.fs
> deleted file mode 100644
> index f564ab4..0000000
> --- a/slof/fs/archsupport.fs
> +++ /dev/null
> @@ -1,38 +0,0 @@
> -\ *****************************************************************************
> -\ * Copyright (c) 2011 IBM Corporation
> -\ * All rights reserved.
> -\ * This program and the accompanying materials
> -\ * are made available under the terms of the BSD License
> -\ * which accompanies this distribution, and is available at
> -\ * http://www.opensource.org/licenses/bsd-license.php
> -\ *
> -\ * Contributors:
> -\ *     IBM Corporation - initial implementation
> -\ ****************************************************************************/
> -
> -\ 128KB FDT buffer size is enough to accommodate 255 CPU cores and 1TB of
> -\ maxmem specification.
> -20000 VALUE size
> -: ibm,client-architecture-support         ( vec -- err? )
> -    \ Store require parameters in nvram
> -    \ to come back to right boot device
> -    \ Allocate memory for H_CALL
> -    size alloc-mem                        ( vec memaddr )
> -    swap over size                        ( memaddr vec memaddr size )
> -    \ make h_call to hypervisor
> -    hv-cas 0= IF                          ( memaddr )
> -	dup l@ 1 >= IF                    \ Version number >= 1
> -	    \ Make required changes
> -	    " /" find-node set-node
> -	    dup 4 + fdt-init
> -	    fdt-check-header
> -	    fdt-struct fdt-fix-cas-node
> -	    fdt-fix-cas-success NOT
> -	ELSE
> -	    FALSE
> -	THEN
> -    ELSE
> -	TRUE
> -    THEN
> -    >r size free-mem r>
> -;
> diff --git a/slof/fs/root.fs b/slof/fs/root.fs
> index 21c7109..952b00e 100644
> --- a/slof/fs/root.fs
> +++ b/slof/fs/root.fs
> @@ -77,7 +77,6 @@ finish-device
>
>  : open true ;
>  : close ;
> -#include <archsupport.fs>
>
>  \ Finish root
>  finish-device
> -- 
> 1.8.3.1



More information about the SLOF mailing list