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
10 \ * IBM Corporation - initial implementation
11 \ ****************************************************************************/
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
30 fdt-struct fdt-fix-cas-node
31 fdt-fix-cas-success NOT
38 >r cas-buffer-size free-mem r>