These changes are the raw update to qemu-2.6.
[kvmfornfv.git] / qemu / roms / SLOF / board-qemu / slof / 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 \ 2 MiB FDT buffer size is enough to accommodate 255 CPU cores
14 \ and 16 TiB of maxmem specification.
15 200000 CONSTANT cas-buffer-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     cas-buffer-size alloc-mem             ( vec memaddr )
21     dup 0= IF ." out of memory during ibm,client-architecture-support" cr THEN
22     swap over cas-buffer-size             ( memaddr vec memaddr size )
23     \ make h_call to hypervisor
24     hv-cas 0= IF                          ( memaddr )
25         dup l@ 1 >= IF                    \ Version number >= 1
26             \ Make required changes
27             " /" find-node set-node
28             dup 4 + fdt-init
29             fdt-check-header
30             fdt-struct fdt-fix-cas-node
31             fdt-fix-cas-success NOT
32         ELSE
33             FALSE
34         THEN
35     ELSE
36         TRUE
37     THEN
38     >r cas-buffer-size free-mem r>
39 ;