Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / SLOF / slof / fs / archsupport.fs
1 \ *****************************************************************************
2 \ * Copyright (c) 2011 IBM Corporation
3 \ * All rights reserved.
4 \ * This program and the accompanying materials
5 \ * are made available under the terms of the BSD License
6 \ * which accompanies this distribution, and is available at
7 \ * http://www.opensource.org/licenses/bsd-license.php
8 \ *
9 \ * Contributors:
10 \ *     IBM Corporation - initial implementation
11 \ ****************************************************************************/
12
13 \ Qemu supports max 256cpus, 32K will be able to accomodate the fdt changes if
14 \ needed.
15 8000 VALUE size
16 : ibm,client-architecture-support         ( vec -- err? )
17     \ Store require parameters in nvram
18     \ to come back to right boot device
19     \ Allocate memory for H_CALL
20     size alloc-mem                        ( vec memaddr )
21     swap over size                        ( memaddr vec memaddr size )
22     \ make h_call to hypervisor
23     hv-cas 0= IF                          ( memaddr )
24         dup l@ 1 >= IF                    \ Version number >= 1
25             \ Make required changes
26             " /" find-node set-node
27             dup 4 + fdt-init
28             fdt-check-header
29             fdt-struct fdt-fix-cas-node
30             fdt-fix-cas-success NOT
31         ELSE
32             FALSE
33         THEN
34     ELSE
35         TRUE
36     THEN
37     >r size free-mem r>
38 ;