diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2011-07-27 22:26:15 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2011-07-29 15:12:26 -0500 |
commit | d91c2d0f5db929926584e0f47f27299eff9386e1 (patch) | |
tree | 13a32a2bda8a1e026ded3e473239a0fd824f8bbc /src/include | |
parent | a4ad138162e1c2b0e7ae008d38d91a0094393bd7 (diff) | |
download | talos-hostboot-d91c2d0f5db929926584e0f47f27299eff9386e1.tar.gz talos-hostboot-d91c2d0f5db929926584e0f47f27299eff9386e1.zip |
Add userspace syscalls for PVR.
Change-Id: I27d51e0e9f2396a4ddd45d98d6b1004a17c9db46
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/219
Tested-by: Jenkins Server
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Reviewed-by: MATTHEW S. BARTH <msbarth@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/kernel/cpuid.H | 19 | ||||
-rw-r--r-- | src/include/kernel/syscalls.H | 9 | ||||
-rw-r--r-- | src/include/sys/misc.h | 32 |
3 files changed, 40 insertions, 20 deletions
diff --git a/src/include/kernel/cpuid.H b/src/include/kernel/cpuid.H index 75287a66e..f2ee02442 100644 --- a/src/include/kernel/cpuid.H +++ b/src/include/kernel/cpuid.H @@ -3,27 +3,10 @@ #include <stdint.h> #include <arch/ppc.H> +#include <sys/misc.h> namespace CpuID { - /** @enum ProcessorCoreType - * @brief Enumeration of the different supported processor cores. - */ - enum ProcessorCoreType - { - /** Base Power7 */ - POWER7, - /** Power7+ */ - POWER7_PLUS, - - /** Power8 "Salerno" (low-end) core */ - POWER8_SALERNO, - /** Power8 "Venice" (high-end) core */ - POWER8_VENICE, - - UNKNOWN, - }; - /** @fn getCpuType() * @brief Decode the processor type from the PVR register. * diff --git a/src/include/kernel/syscalls.H b/src/include/kernel/syscalls.H index 6473f12b6..5b5e31fc3 100644 --- a/src/include/kernel/syscalls.H +++ b/src/include/kernel/syscalls.H @@ -23,7 +23,7 @@ namespace Systemcalls TASK_START, /** task_end() */ TASK_END, - + /** msgq_create() */ MSGQ_CREATE, /** msgq_destroy() */ @@ -32,7 +32,7 @@ namespace Systemcalls MSGQ_REGISTER_ROOT, /** VFS internal */ MSGQ_RESOLVE_ROOT, - + /** msg_send() */ MSG_SEND, /** msg_sendrecv() */ @@ -59,6 +59,11 @@ namespace Systemcalls /** shutdown() */ MISC_SHUTDOWN, + /** cpu_core_type() */ + MISC_CPUCORETYPE, + /** cpu_dd_level() */ + MISC_CPUDDLEVEL, + SYSCALL_MAX }; diff --git a/src/include/sys/misc.h b/src/include/sys/misc.h index 8e963ad2e..ba0db0a24 100644 --- a/src/include/sys/misc.h +++ b/src/include/sys/misc.h @@ -14,6 +14,38 @@ extern "C" */ void shutdown(uint64_t i_status); +/** @enum ProcessorCoreType + * @brief Enumeration of the different supported processor cores. + */ +enum ProcessorCoreType +{ + /** Base Power7 */ + CORE_POWER7, + /** Power7+ */ + CORE_POWER7_PLUS, + + /** Power8 "Salerno" (low-end) core */ + CORE_POWER8_SALERNO, + /** Power8 "Venice" (high-end) core */ + CORE_POWER8_VENICE, + + CORE_UNKNOWN, +}; + +/** @fn cpu_core_type() + * @brief Determine the procesore core type. + * + * @return ProcessorCoreType - Value from enumeration for this core. + */ +ProcessorCoreType cpu_core_type(); + +/** @fn cpu_dd_level() + * @brief Determine the processor DD level. + * + * @return 1 byte DD level as <major nibble, minor nibble>. + */ +uint8_t cpu_dd_level(); + #ifdef __cplusplus } #endif |