From 6f6561babb56d891e88dbcd07646c23af2563ddd Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Mon, 16 Jul 2012 21:37:56 -0500 Subject: cpu_spr_value syscall for SLW image build. Task 44887 Change-Id: If87b6e80b974bb4cbff13844d8a3f055a17282d2 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1378 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell Reviewed-by: Douglas R. Gilbert Reviewed-by: Mark W. Wenning Reviewed-by: A. Patrick Williams III --- src/include/sys/misc.h | 67 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 44 insertions(+), 23 deletions(-) (limited to 'src/include/sys') diff --git a/src/include/sys/misc.h b/src/include/sys/misc.h index 90ff57964..e1f8e42a7 100644 --- a/src/include/sys/misc.h +++ b/src/include/sys/misc.h @@ -1,25 +1,26 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/sys/misc.h $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 2011 -// -// p1 -// -// Object Code Only (OCO) source materials -// Licensed Internal Code Source Materials -// IBM HostBoot Licensed Internal Code -// -// The source code for this program is not published or other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END +/* IBM_PROLOG_BEGIN_TAG + * This is an automatically generated prolog. + * + * $Source: src/include/sys/misc.h $ + * + * IBM CONFIDENTIAL + * + * COPYRIGHT International Business Machines Corp. 2011-2012 + * + * p1 + * + * Object Code Only (OCO) source materials + * Licensed Internal Code Source Materials + * IBM HostBoot Licensed Internal Code + * + * The source code for this program is not published or other- + * wise divested of its trade secrets, irrespective of what has + * been deposited with the U.S. Copyright Office. + * + * Origin: 30 + * + * IBM_PROLOG_END_TAG + */ #ifndef __SYS_MISC_H #define __SYS_MISC_H @@ -40,7 +41,6 @@ enum ShutdownStatus SHUTDOWN_STATUS_INITSVC_FAILED = 0x01230004, }; - #ifdef __cplusplus extern "C" { @@ -112,6 +112,27 @@ size_t cpu_thread_count(); */ int cpu_start_core(uint64_t pir); +/** + * @enum CpuSprNames + * + * Names for SPR registers for cpu_spr_value(). + */ +enum CpuSprNames +{ + CPU_SPR_MSR, + CPU_SPR_LPCR, + CPU_SPR_HRMOR, +}; + +/** @fn cpu_spr_value + * @brief Reads the kernel-desired value for an SPR. + * + * This is used, for instance, in building a sleep-winkle image. + * + * @return The desired value of the SPR register. + */ +uint64_t cpu_spr_value(CpuSprNames spr); + #ifdef __cplusplus } #endif -- cgit v1.2.1