From 7761eefbf4180e4a37e5be87e330b81a9c645a69 Mon Sep 17 00:00:00 2001 From: Nikunj A Dadhania Date: Thu, 12 Sep 2013 13:47:52 +0530 Subject: Update device tree returned by CAS hypercall Add device tree parsing code and setting properties. Signed-off-by: Nikunj A Dadhania --- slof/fs/archsupport.fs | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'slof/fs') diff --git a/slof/fs/archsupport.fs b/slof/fs/archsupport.fs index 4d18c74..6964620 100644 --- a/slof/fs/archsupport.fs +++ b/slof/fs/archsupport.fs @@ -1,18 +1,32 @@ -4096 VALUE size +\ ***************************************************************************** +\ * 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 +\ ****************************************************************************/ + +1000 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 - \ FIXME: convert memaddr to phys - size ( memaddr vec memaddr size ) + swap over size ( memaddr vec memaddr size ) \ make h_call to hypervisor - hv-cas 0= IF - ." hv-cas succeeded " cr - \ Make required changes - FALSE + hv-cas 0= IF ( memaddr ) + dup @ 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 + THEN + drop FALSE ELSE ." hv-cas failed " TRUE THEN -- cgit v1.1