|
|
|
|
Quelle rtas.c
Sprache: C
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
/*
*
* Procedures for interfacing to the RTAS on CHRP machines.
*
* Peter Bergner, IBM March 2001.
* Copyright (C) 2001 IBM.
*/
#define pr_fmt(fmt) "rtas: " fmt
#include <linux/bsearch.h>
#include <linux/capability.h>
#include <linux/delay.h>
#include <linux/export.h>
#include <linux/init.h>
#include <linux/kconfig.h>
#include <linux/kernel.h>
#include <linux/lockdep.h>
#include <linux/memblock.h>
#include <linux/mutex.h>
#include <linux/nospec.h>
#include <linux/of.h>
#include <linux/of_fdt.h>
#include <linux/reboot.h>
#include <linux/sched.h>
#include <linux/security.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/stdarg.h>
#include <linux/syscalls.h>
#include <linux/types.h>
#include <linux/uaccess.h>
#include <linux/xarray.h>
#include <asm/delay.h>
#include <asm/firmware.h>
#include <asm/interrupt.h>
#include <asm/machdep.h>
#include <asm/mmu.h>
#include <asm/page.h>
#include <asm/rtas-work-area.h>
#include <asm/rtas.h>
#include <asm/time.h>
#include <asm/trace.h>
#include <asm/udbg.h>
struct rtas_filter {
/* Indexes into the args buffer, -1 if not used */
const int buf_idx1;
const int size_idx1;
const int buf_idx2;
const int size_idx2;
/*
* Assumed buffer size per the spec if the function does not
* have a size parameter, e.g. ibm,errinjct. 0 if unused.
*/
const int fixed_size;
};
/**
* struct rtas_function - Descriptor for RTAS functions.
*
* @token: Value of @name if it exists under the /rtas node.
* @name: Function name.
* @filter: If non-NULL, invoking this function via the rtas syscall is
* generally allowed, and @filter describes constraints on the
* arguments. See also @banned_for_syscall_on_le.
* @banned_for_syscall_on_le: Set when call via sys_rtas is generally allowed
* but specifically restricted on ppc64le. Such
* functions are believed to have no users on
* ppc64le, and we want to keep it that way. It does
* not make sense for this to be set when @filter
* is NULL.
* @lock: Pointer to an optional dedicated per-function mutex. This
* should be set for functions that require multiple calls in
* sequence to complete a single operation, and such sequences
* will disrupt each other if allowed to interleave. Users of
* this function are required to hold the associated lock for
* the duration of the call sequence. Add an explanatory
* comment to the function table entry if setting this member.
*/
struct rtas_function {
s32 token;
const bool banned_for_syscall_on_le:1;
const char * const name;
const struct rtas_filter *filter;
struct mutex *lock;
};
/*
* Per-function locks for sequence-based RTAS functions.
*/
static DEFINE_MUTEX(rtas_ibm_activate_firmware_lock);
static DEFINE_MUTEX(rtas_ibm_lpar_perftools_lock);
DEFINE_MUTEX(rtas_ibm_physical_attestation_lock);
DEFINE_MUTEX(rtas_ibm_get_vpd_lock);
DEFINE_MUTEX(rtas_ibm_get_indices_lock);
DEFINE_MUTEX(rtas_ibm_set_dynamic_indicator_lock);
DEFINE_MUTEX(rtas_ibm_get_dynamic_sensor_state_lock);
static struct rtas_function rtas_function_table[] __ro_after_init = {
[RTAS_FNIDX__CHECK_EXCEPTION] = {
.name = "check-exception",
},
[RTAS_FNIDX__DISPLAY_CHARACTER] = {
.name = "display-character",
.filter = &(const struct rtas_filter) {
.buf_idx1 = -1, .size_idx1 = -1,
.buf_idx2 = -1, .size_idx2 = -1,
},
},
[RTAS_FNIDX__EVENT_SCAN] = {
.name = "event-scan",
},
[RTAS_FNIDX__FREEZE_TIME_BASE] = {
.name = "freeze-time-base",
},
[RTAS_FNIDX__GET_POWER_LEVEL] = {
.name = "get-power-level",
.filter = &(const struct rtas_filter) {
.buf_idx1 = -1, .size_idx1 = -1,
.buf_idx2 = -1, .size_idx2 = -1,
},
},
[RTAS_FNIDX__GET_SENSOR_STATE] = {
.name = "get-sensor-state",
.filter = &(const struct rtas_filter) {
.buf_idx1 = -1, .size_idx1 = -1,
.buf_idx2 = -1, .size_idx2 = -1,
},
},
[RTAS_FNIDX__GET_TERM_CHAR] = {
.name = "get-term-char",
},
[RTAS_FNIDX__GET_TIME_OF_DAY] = {
.name = "get-time-of-day",
.filter = &(const struct rtas_filter) {
.buf_idx1 = -1, .size_idx1 = -1,
.buf_idx2 = -1, .size_idx2 = -1,
},
},
[RTAS_FNIDX__IBM_ACTIVATE_FIRMWARE] = {
.name = "ibm,activate-firmware",
.filter = &(const struct rtas_filter) {
.buf_idx1 = -1, .size_idx1 = -1,
.buf_idx2 = -1, .size_idx2 = -1,
},
/*
* PAPR+ as of v2.13 doesn't explicitly impose any
* restriction, but this typically requires multiple
* calls before success, and there's no reason to
* allow sequences to interleave.
*/
.lock = &rtas_ibm_activate_firmware_lock,
},
[RTAS_FNIDX__IBM_CBE_START_PTCAL] = {
.name = "ibm,cbe-start-ptcal",
},
[RTAS_FNIDX__IBM_CBE_STOP_PTCAL] = {
.name = "ibm,cbe-stop-ptcal",
},
[RTAS_FNIDX__IBM_CHANGE_MSI] = {
.name = "ibm,change-msi",
},
[RTAS_FNIDX__IBM_CLOSE_ERRINJCT] = {
.name = "ibm,close-errinjct",
.filter = &(const struct rtas_filter) {
.buf_idx1 = -1, .size_idx1 = -1,
.buf_idx2 = -1, .size_idx2 = -1,
},
},
[RTAS_FNIDX__IBM_CONFIGURE_BRIDGE] = {
.name = "ibm,configure-bridge",
},
[RTAS_FNIDX__IBM_CONFIGURE_CONNECTOR] = {
.name = "ibm,configure-connector",
.filter = &(const struct rtas_filter) {
.buf_idx1 = 0, .size_idx1 = -1,
.buf_idx2 = 1, .size_idx2 = -1,
.fixed_size = 4096,
},
},
[RTAS_FNIDX__IBM_CONFIGURE_KERNEL_DUMP] = {
.name = "ibm,configure-kernel-dump",
},
[RTAS_FNIDX__IBM_CONFIGURE_PE] = {
.name = "ibm,configure-pe",
},
[RTAS_FNIDX__IBM_CREATE_PE_DMA_WINDOW] = {
.name = "ibm,create-pe-dma-window",
},
[RTAS_FNIDX__IBM_DISPLAY_MESSAGE] = {
.name = "ibm,display-message",
.filter = &(const struct rtas_filter) {
.buf_idx1 = 0, .size_idx1 = -1,
.buf_idx2 = -1, .size_idx2 = -1,
},
},
[RTAS_FNIDX__IBM_ERRINJCT] = {
.name = "ibm,errinjct",
.filter = &(const struct rtas_filter) {
.buf_idx1 = 2, .size_idx1 = -1,
.buf_idx2 = -1, .size_idx2 = -1,
.fixed_size = 1024,
},
},
[RTAS_FNIDX__IBM_EXTI2C] = {
.name = "ibm,exti2c",
},
[RTAS_FNIDX__IBM_GET_CONFIG_ADDR_INFO] = {
.name = "ibm,get-config-addr-info",
},
[RTAS_FNIDX__IBM_GET_CONFIG_ADDR_INFO2] = {
.name = "ibm,get-config-addr-info2",
.filter = &(const struct rtas_filter) {
.buf_idx1 = -1, .size_idx1 = -1,
.buf_idx2 = -1, .size_idx2 = -1,
},
},
[RTAS_FNIDX__IBM_GET_DYNAMIC_SENSOR_STATE] = {
.name = "ibm,get-dynamic-sensor-state",
.filter = &(const struct rtas_filter) {
.buf_idx1 = 1, .size_idx1 = -1,
.buf_idx2 = -1, .size_idx2 = -1,
},
/*
* PAPR+ v2.13 R1–7.3.19–3 is explicit that the OS
* must not call ibm,get-dynamic-sensor-state with
* different inputs until a non-retry status has been
* returned.
*/
.lock = &rtas_ibm_get_dynamic_sensor_state_lock,
},
[RTAS_FNIDX__IBM_GET_INDICES] = {
.name = "ibm,get-indices",
.filter = &(const struct rtas_filter) {
.buf_idx1 = 2, .size_idx1 = 3,
.buf_idx2 = -1, .size_idx2 = -1,
},
/*
* PAPR+ v2.13 R1–7.3.17–2 says that the OS must not
* interleave ibm,get-indices call sequences with
* different inputs.
*/
.lock = &rtas_ibm_get_indices_lock,
},
[RTAS_FNIDX__IBM_GET_RIO_TOPOLOGY] = {
.name = "ibm,get-rio-topology",
},
[RTAS_FNIDX__IBM_GET_SYSTEM_PARAMETER] = {
.name = "ibm,get-system-parameter",
.filter = &(const struct rtas_filter) {
.buf_idx1 = 1, .size_idx1 = 2,
.buf_idx2 = -1, .size_idx2 = -1,
},
},
[RTAS_FNIDX__IBM_GET_VPD] = {
.name = "ibm,get-vpd",
.filter = &(const struct rtas_filter) {
.buf_idx1 = 0, .size_idx1 = -1,
.buf_idx2 = 1, .size_idx2 = 2,
},
/*
* PAPR+ v2.13 R1–7.3.20–4 indicates that sequences
* should not be allowed to interleave.
*/
.lock = &rtas_ibm_get_vpd_lock,
},
[RTAS_FNIDX__IBM_GET_XIVE] = {
.name = "ibm,get-xive",
},
[RTAS_FNIDX__IBM_INT_OFF] = {
.name = "ibm,int-off",
},
[RTAS_FNIDX__IBM_INT_ON] = {
.name = "ibm,int-on",
},
[RTAS_FNIDX__IBM_IO_QUIESCE_ACK] = {
.name = "ibm,io-quiesce-ack",
},
[RTAS_FNIDX__IBM_LPAR_PERFTOOLS] = {
.name = "ibm,lpar-perftools",
.filter = &(const struct rtas_filter) {
.buf_idx1 = 2, .size_idx1 = 3,
.buf_idx2 = -1, .size_idx2 = -1,
},
/*
* PAPR+ v2.13 R1–7.3.26–6 says the OS should allow
* only one call sequence in progress at a time.
*/
.lock = &rtas_ibm_lpar_perftools_lock,
},
[RTAS_FNIDX__IBM_MANAGE_FLASH_IMAGE] = {
.name = "ibm,manage-flash-image",
},
[RTAS_FNIDX__IBM_MANAGE_STORAGE_PRESERVATION] = {
.name = "ibm,manage-storage-preservation",
},
[RTAS_FNIDX__IBM_NMI_INTERLOCK] = {
.name = "ibm,nmi-interlock",
},
[RTAS_FNIDX__IBM_NMI_REGISTER] = {
.name = "ibm,nmi-register",
},
[RTAS_FNIDX__IBM_OPEN_ERRINJCT] = {
.name = "ibm,open-errinjct",
.filter = &(const struct rtas_filter) {
.buf_idx1 = -1, .size_idx1 = -1,
.buf_idx2 = -1, .size_idx2 = -1,
},
},
[RTAS_FNIDX__IBM_OPEN_SRIOV_ALLOW_UNFREEZE] = {
.name = "ibm,open-sriov-allow-unfreeze",
},
[RTAS_FNIDX__IBM_OPEN_SRIOV_MAP_PE_NUMBER] = {
.name = "ibm,open-sriov-map-pe-number",
},
[RTAS_FNIDX__IBM_OS_TERM] = {
.name = "ibm,os-term",
},
[RTAS_FNIDX__IBM_PARTNER_CONTROL] = {
.name = "ibm,partner-control",
},
[RTAS_FNIDX__IBM_PHYSICAL_ATTESTATION] = {
.name = "ibm,physical-attestation",
.filter = &(const struct rtas_filter) {
.buf_idx1 = 0, .size_idx1 = 1,
.buf_idx2 = -1, .size_idx2 = -1,
},
/*
* This follows a sequence-based pattern similar to
* ibm,get-vpd et al. Since PAPR+ restricts
* interleaving call sequences for other functions of
* this style, assume the restriction applies here,
* even though it's not explicit in the spec.
*/
.lock = &rtas_ibm_physical_attestation_lock,
},
[RTAS_FNIDX__IBM_PLATFORM_DUMP] = {
.name = "ibm,platform-dump",
.filter = &(const struct rtas_filter) {
.buf_idx1 = 4, .size_idx1 = 5,
.buf_idx2 = -1, .size_idx2 = -1,
},
/*
* PAPR+ v2.13 7.3.3.4.1 indicates that concurrent
* sequences of ibm,platform-dump are allowed if they
* are operating on different dump tags. So leave the
* lock pointer unset for now. This may need
* reconsideration if kernel-internal users appear.
*/
},
[RTAS_FNIDX__IBM_POWER_OFF_UPS] = {
.name = "ibm,power-off-ups",
},
[RTAS_FNIDX__IBM_QUERY_INTERRUPT_SOURCE_NUMBER] = {
.name = "ibm,query-interrupt-source-number",
},
[RTAS_FNIDX__IBM_QUERY_PE_DMA_WINDOW] = {
.name = "ibm,query-pe-dma-window",
},
[RTAS_FNIDX__IBM_READ_PCI_CONFIG] = {
.name = "ibm,read-pci-config",
},
[RTAS_FNIDX__IBM_READ_SLOT_RESET_STATE] = {
.name = "ibm,read-slot-reset-state",
.filter = &(const struct rtas_filter) {
.buf_idx1 = -1, .size_idx1 = -1,
.buf_idx2 = -1, .size_idx2 = -1,
},
},
[RTAS_FNIDX__IBM_READ_SLOT_RESET_STATE2] = {
.name = "ibm,read-slot-reset-state2",
},
[RTAS_FNIDX__IBM_REMOVE_PE_DMA_WINDOW] = {
.name = "ibm,remove-pe-dma-window",
},
[RTAS_FNIDX__IBM_RESET_PE_DMA_WINDOW] = {
/*
* Note: PAPR+ v2.13 7.3.31.4.1 spells this as
* "ibm,reset-pe-dma-windows" (plural), but RTAS
* implementations use the singular form in practice.
*/
.name = "ibm,reset-pe-dma-window",
},
[RTAS_FNIDX__IBM_SCAN_LOG_DUMP] = {
.name = "ibm,scan-log-dump",
.filter = &(const struct rtas_filter) {
.buf_idx1 = 0, .size_idx1 = 1,
.buf_idx2 = -1, .size_idx2 = -1,
},
},
[RTAS_FNIDX__IBM_SET_DYNAMIC_INDICATOR] = {
.name = "ibm,set-dynamic-indicator",
.filter = &(const struct rtas_filter) {
.buf_idx1 = 2, .size_idx1 = -1,
.buf_idx2 = -1, .size_idx2 = -1,
},
/*
* PAPR+ v2.13 R1–7.3.18–3 says the OS must not call
* this function with different inputs until a
* non-retry status has been returned.
*/
.lock = &rtas_ibm_set_dynamic_indicator_lock,
},
[RTAS_FNIDX__IBM_SET_EEH_OPTION] = {
.name = "ibm,set-eeh-option",
.filter = &(const struct rtas_filter) {
.buf_idx1 = -1, .size_idx1 = -1,
.buf_idx2 = -1, .size_idx2 = -1,
},
},
[RTAS_FNIDX__IBM_SET_SLOT_RESET] = {
.name = "ibm,set-slot-reset",
},
[RTAS_FNIDX__IBM_SET_SYSTEM_PARAMETER] = {
.name = "ibm,set-system-parameter",
.filter = &(const struct rtas_filter) {
.buf_idx1 = 1, .size_idx1 = -1,
.buf_idx2 = -1, .size_idx2 = -1,
},
},
[RTAS_FNIDX__IBM_SET_XIVE] = {
.name = "ibm,set-xive",
},
[RTAS_FNIDX__IBM_SLOT_ERROR_DETAIL] = {
.name = "ibm,slot-error-detail",
},
[RTAS_FNIDX__IBM_SUSPEND_ME] = {
.name = "ibm,suspend-me",
.banned_for_syscall_on_le = true,
.filter = &(const struct rtas_filter) {
.buf_idx1 = -1, .size_idx1 = -1,
.buf_idx2 = -1, .size_idx2 = -1,
},
},
[RTAS_FNIDX__IBM_TUNE_DMA_PARMS] = {
.name = "ibm,tune-dma-parms",
},
[RTAS_FNIDX__IBM_UPDATE_FLASH_64_AND_REBOOT] = {
.name = "ibm,update-flash-64-and-reboot",
},
[RTAS_FNIDX__IBM_UPDATE_NODES] = {
.name = "ibm,update-nodes",
.banned_for_syscall_on_le = true,
.filter = &(const struct rtas_filter) {
.buf_idx1 = 0, .size_idx1 = -1,
.buf_idx2 = -1, .size_idx2 = -1,
.fixed_size = 4096,
},
},
[RTAS_FNIDX__IBM_UPDATE_PROPERTIES] = {
.name = "ibm,update-properties",
.banned_for_syscall_on_le = true,
.filter = &(const struct rtas_filter) {
.buf_idx1 = 0, .size_idx1 = -1,
.buf_idx2 = -1, .size_idx2 = -1,
.fixed_size = 4096,
},
},
[RTAS_FNIDX__IBM_VALIDATE_FLASH_IMAGE] = {
.name = "ibm,validate-flash-image",
},
[RTAS_FNIDX__IBM_WRITE_PCI_CONFIG] = {
.name = "ibm,write-pci-config",
},
[RTAS_FNIDX__NVRAM_FETCH] = {
.name = "nvram-fetch",
},
[RTAS_FNIDX__NVRAM_STORE] = {
.name = "nvram-store",
},
[RTAS_FNIDX__POWER_OFF] = {
.name = "power-off",
},
RTAS_FNIDX__PUT_TERM_CHAR] ={
.="utterm-char"
},
[RTAS_FNIDX__QUERY_CPU_STOPPED_STATE
.name querycpustopped"java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
},
[RTAS_FNIDX__READ_PCI_CONFIG] = {
.name = "read-pci-config",
},
[RTAS_FNIDX__RTAS_LAST_ERROR] = {
.name ="rtas-last-rror",
},
#include <linux/.h>
#nclude <linux/kconfig.h>
.filter = &(const struct rtas_filter) {
.buf_idx1 = -1, .size_idx1 = -1,
.buf_idx2 = -1#include</.>
# <memblock.h
},
[RTAS_FNIDX__SET_POWER_LEVEL] = # linux/of.>
= set--level",
.=&const rtas_filter){
.buf_idx1 = -1, .size_idx1 = -1,
.buf_idx2 =-, .size_idx2 1java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
},
},
[R_POWER_ON] ={
.name = "set-java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
=&(const struct rtas_filter){
.buf_idx1 -, size_idx1 = -1,
.buf_idx2 = -1, .size_idx2 = -1,
},
}
[RTAS_FNIDX__SET_TIME_OF_DAY]= {
.name = "set-time-of-day",
filter = &(const struct rtas_filter) {
.buf_idx1 #include <asm/rtas-work-area.h>
buf_idx2 = 1,.size_idx2 = -1,
},
},
[#include <udbg.h>
.name s,
,
[]={
name = "stop-self",
const size_idx2;
[] ={
.name = "system-reboot",
},
R]={
.name = "thaw-time-base",
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
[RTAS_FNIDX__WRITE_PCI_CONFIG] = {
.name = "write-pci-config",
},
};
#define for_each_rtas_function(funcp java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
for (funcp=&rtas_function_table[];
funcp < &rtas_function_table[ARRAY_SIZE(rtas_function_table)]; \
++funcp)
/*
* Nearly all RTAS calls need to be serialized. All uses of the
* default rtas_args block must hold rtas_lock.
*
* Exceptions * @filter: If n- java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 71
* must use a separate rtas_args structure. @ describesconstraintson the
*/
static @banned_for_syscall_on_lejava.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 77
static * but specificallyrestricted ppc64le
/**
* rtas_function_token() - RTAS function token lookup.
* ,and want toit that It does
*
* Context: Any context.
*Return:the token alue function if implemented by platform,
* otherwise RTAS_UNKNOWN_SERVICE.
*/
s32 rtas_function_token(const rtas_fn_handle_t handle)
{
const size_t index = handle.index;
const bool out_of_bounds = index >= ARRAY_SIZE(rtas_function_table);
if (ARN_ONCEout_of_bounds, "invalid function index %zu", index))
return RTAS_UNKNOWN_SERVICE;
/*
*Various attempt lookups onnon-RTAS
* platforms.
*/
if (!rtas.dev)
return RTAS_UNKNOWN_SERVICE;
eturn rtas_function_table[].oken;
}
EXPORT_SYMBOL_GPL(rtas_function_token);
static int rtas_function_cmp(const void *a, const void *b)
{
const struct rtas_function f1 =;
const struct rtas_function *f2 = b;
return strcmp(f1-name,f2>name);
}
/*
time of java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 69
* -- rtas_name_to_function)
* *
*/
static(const java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 70
{
static()
.name = name,
};
;
=&, r,
p)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
return .ame check"java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
}
*java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 74
{
returnjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
}
. cstructjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 41
java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 35
err=
.buf_idx2 = -1java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 35
constjava.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 32
if filter c java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 41
=xjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 55
- 1
if (err)
break;
}
return err;
}
arch_initcall(java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 5
/*
usebysys_rtas( token value is by
and we't want failed lookups.
*/
static *(s32 )
{
return xa_load&rtas_token_to_function_xarray token;
}
/*
* ,. 1
* known-good java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 4
* RTAS_FNIDX__IBM_CONFIGURE_PE]={
* prior against function table.
*/
constjava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 68
{
conststruct func
if if (WARN_ONCE(errinjct"
return ;
func = .buf_idx1 = 2 java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 34
ifRjava.lang.StringIndexOutOfBoundsException: Range [29, 24) out of bounds for length 29
return func;
/*
*Fall back to linear scan in case the reverse mapping hasn't
* been initialized [RTAS_FNIDX__IBM_GET_CONFIG_ADDR_INFO2] = {
.ame ="getconfigaddrinfo2,
if ( filter=&conststructrtas_filter{
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 32
(func>oken== token
funcjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Range [2, 3) out of bounds for length 2
true unexpected failed lookupfor d,token;
return =3java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
} PAPR7317 must
/* This is here deliberately so it's only used in this file */
java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 31
static void,
{
enter_rtas .ame ="ibm,get-system-parameter"java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
s(;/* rtas uses SRRs, invalidate */
}
static void,etv"
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
const .buf_idx2 ,.java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 33
/*
* java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 5
* java.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 11
/
if (func name = ibm,o,
-l)
if(args =&)
lockdep_assert_held ,
trace_rtas_input(args, func->name);
trace_rtas_ll_entry(args);
__do_enter_rtas(args);
trace_rtas_ll_exit(args);
trace_rtas_output(args,func->);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
static void do_enter_rtas,
{
const only callsequencein at a time.
/*
* Situations where we want to
*safety reasons:
*
* .ame ibmmanage-lashi"java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
e 'reabouttostop.The'
* function name lookup uses java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 3
t to call an .Any
emitted
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
* 2 c java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 41
* b = 1,.ize_idx2 1,
* buffers or the ,
* java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 3
*
long =MSR_IR |MSR_DR;
likely((aw_smp_processor_id &
(java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 3
/*
. ibm,-"
enter_rtas
*/
BUG_ON(!(msr const ){
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 4
if (can_trace)
_java.lang.StringIndexOutOfBoundsException: Range [28, 23) out of bounds for length 30
*eventhoughitsnot thespec
_(;
}
struct rtas_t rtas;
();
rtas_data_buf_lock;
rtas_data_bufRTAS_DATA_BUF_SIZE_()
EXPORT_SYMBOL_GPL( /*
unsigned long rtas_rmo_buf;
/*
* calledwhen
* This is done like this so rtas_flash can be a module.
*/
void (*rtas_flash_term_hook)(int);
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 3
/*java.lang.StringIndexOutOfBoundsException: Range [49, 47) out of bounds for length 52
[java.lang.StringIndexOutOfBoundsException: Range [42, 37) out of bounds for length 42
RTAS_FNIDX__IBM_READ_PCI_CONFIG java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
to 10.
*/
static void call_rtas_display_status(unsigned char c)
{
unsigned long flags;
if (!rtas.base)
return}
raw_spin_lock_irqsave(&rtas_lock, flags);
(rtas_args,10 1,1 NULL,c;
raw_spin_unlock_irqrestore(rtas_lock,flags;
}
static void call_rtas_display_status_delay(char c)
{
static int pending_newline = 0; /* did last write end with unprinted newline? */
int ;
if (c == '\n') {
while (width-- > 0*java.lang.StringIndexOutOfBoundsException: Range [24, 20) out of bounds for length 55
*
;
[ java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 22
{
ifpending_newline{
call_rtas_display_statusr)
call_rtas_display_status(\'java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
}
pending_newline = 0;
if (width--) {
call_rtas_display_status *PAPR+13R–3183theO not
udelay(10000);
}
}
}
_init()
{
udbg_putc java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
}
( * )
{
s device_node *oot;
int width;
const __be32 }
char *os;
static int display_character, set_indicator;
static int display_width name "bmslot,
RTAS_FNIDX__IBM_SET_SYSTEM_] java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
DEFINE_SPINLOCK);
static int current_line;
static int }
if (!rtas.base)
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 3
if ([TAS_FNIDX__IBM_SUSPEND_ME java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
display_width xjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
if (root =of_find_node_by_path( -and"
p=r,
"ibm ,.java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 35
display_width = . java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 35
if(=of_get_property(java.lang.StringIndexOutOfBoundsException: Range [33, 34) out of bounds for length 33
ifeed, )
java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
if ( =(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
--,)
(
.name = name poweroff,
idisplayjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 44
()java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
=(java.lang.StringIndexOutOfBoundsException: Range [69, 67) out of bounds for length 69
=();
}
java.lang.StringIndexOutOfBoundsException: Range [0, 46) out of bounds for length 26
/* use hex display if available */
if 1 =-java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
rtas_call n set,
return;
}
spin_lock(&progress_lock);
/*
, butwe 't
* it .buf_idx1 1 size_idx1=-1
* instead.
*
bjava.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
* java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 3
*/
if
rtas_call(java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 3
rtas_call(java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 3
p=;
} else {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (form_feed)
display_character , 1 ,
(char)form_feed);
else
rtas_call(, 1,1 ,'r'java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
}
if (row_width)
width = row_width[current_line];
else
width = display_width;
os = s;
while(os){
if (*os == '\n' || *os == '\r') {
/* If newline is the last character, save it
* until next call */
* display * display output.
*/
(os = \'& os] {
pending_newline = 1;
current_line++;
if (current_line > display_lines-1)
*
spin_unlock(&progress_lock);
return;
}
/* RTAS wants CR-LF, not just LF */
if (*os == '\n') {
rtas_call(display_character, 1, 1, NULL, '\r');
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 76
} else {
/* CR might be used to re-draw a line, so we'll
* * RTAS_UNKNOWN_SERVICE
*/
onstsize_t java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 35
if (java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 3
width = row_width[current_line];
else
width = display_width;
} else {
width--; *
rtas_call(display_character, 1, 1, NULL, *os);
}
os++;
/* if we overwrite the screen length */
if(idth<= 0)
while ((*os != 0) && (*os != '\n') && (*os != '\r'))
os++;
}
spin_unlock(&progress_lock) onststructrtas_function f2=b
}
EXPORT_SYMBOL_GPL
)
{
const struct return nonconstqualified object rtas_name_to_functionjava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
const __be32 *tokp;
if (rtas.dev == NULL)
return RTAS_UNKNOWN_SERVICEstatic struct rtas_function *_(constchar name)
func =.ame= ame,
if (func)
return funcjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/*
upa that not
* RTAS function. Either it'
* added static DEFINE_XARRAY(rtas_token_to_function_xarray);
* - properties the /rtas node. Warn and
* fall back to the for_each_rtas_function(func) {
*/
WARN_ONCE(1, "unknown function `%s`
service)java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
tokp = java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 10
return tokp ? java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
}
EXPORT_SYMBOL_GPL(rtas_token);
#fdef CONFIG_RTAS_ERROR_LOGGING
java.lang.StringIndexOutOfBoundsException: Range [32, 29) out of bounds for length 67
/*
* Return the firmware- *
require buffer java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 61
includesc-java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 58
*
int * Reversefor thefunction
{
returnrtas_error_log_max
}
static void __init init_error_log_max(void)
{
static const char propname[] __initconst = "rtas-error-log-max";
u32 max;
if (of_property_read_u32(rtas.dev, propname, &max)) { /
default %u",
propname, RTAS_ERROR_LOG_MAX);
max = RTAS_ERROR_LOG_MAXif((token 0 invalid token %d", token))
}
if( RTAS_ERROR_LOG_MAX
pr_warn("%s = %u return java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
propname, max, RTAS_ERROR_LOG_MAX);
max = RTAS_ERROR_LOG_MAX *
}
=max;
}
static char rtas_err_buf[RTAS_ERROR_LOG_MAX];
/** Return a copy of the detailed error text associated with the
* most java.lang.StringIndexOutOfBoundsException: Range [15, 10) out of bounds for length 65
* java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* this void enter_rtas(unsigned long);
* the java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
*
_java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 24
{
consts32 )
sjava.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 38
u32 bufsz;
/*
lockdep_assert_held(&rtas_lock);
if (java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 34
return NULL;
bufsz = rtas_get_error_log_max();
err_args.token =
err_args.nargs = cpu_to_be32( java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 37
. = ()java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
e.rgs[ cpu_to_be32b;
err_args.args[2] = 0;
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 23
rtas_args = *functionnamelookup java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 62
do_enter_rtas(&rtas_args);
err_args = * 2. In real mode.java.lang.StringIndexOutOfBoundsException: Range [19, 14) out of bounds for length 60
tas_args = save_args;
/
*
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 15
buf = altbuf;
} else {
buf = rtas_err_buf;
if slab_is_available)
=kmalloc(,;
}
if (buf !m
memmove(bufjava.lang.StringIndexOutOfBoundsException: Range [14, 15) out of bounds for length 0
}
return buf;
}
# get_errorlog_buffer() kmalloc(RTAS_ERROR_LOG_MAX, GFP_KERNEL)
e /* CONFIG_RTAS_ERROR_LOGGING */
#java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 38
#define get_errorlog_buffer() EXPORT_SYMBOL_GPL(;
static void __java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#endif
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 11
va_rtas_call_unlocked(struct rtas_args *args, int token, int nargs, int nret,
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
{
int i;
args->token static(char java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
args-
args->nret = cpu_to_be32(nret);
args->rets = &(args->args (r,flags;
for(=0;i <nargs +)
(list,_u)
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 50
args->rets[i] = 0;
do_enter_rtas(args);
}
/**
* rtas_call_unlocked() while (idth- )
* @args: RTAS java.lang.StringIndexOutOfBoundsException: Range [32, 27) out of bounds for length 33
pending_newline=;
* @token: Identifies the function being if(pending_newline) {
of input parameters. Does not include token.
* @nret: Number of output parameters, including the
* pending_newline = 0;
*
* Invokes the RTAS ()
* should obtain via rtas_function_token().
*
* This function
* limited set of __init udbg_init_rtas_paneljava.lang.StringIndexOutOfBoundsException: Range [38, 39) out of bounds for length 38
* requirementjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
de stop-self and ibm,mi-interlock.
*/
device_node root;
{
va_list list;
va_start(java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 52
va_rtas_call_unlocked(args, token, nargs, java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 25
}
static bool java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
return token == rtas_function_token(
token =(;
}
*.
* @token: Identifies the function being invoked.
* if(p=of_get_property(root,
* @nret: "ibm,displayof-,NULL))
outputs:Array of nret words.
* @....: (oot,
java.lang.StringIndexOutOfBoundsException: Range [2, 3) out of bounds for length 2
* Invokes the RTAS function indicated by @token, which the caller
* should obtain via rtas_function_token().
*
* The @nargs and @ /* use hex display if available */
* output parameters rtas_call(set_indicator, 3, , ,hex);
*
* rtas_call() returns java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 0
* must anyfailure appropriateerrno
syscall RTAS can
*- 990x should use rtas_busy_delay(cjava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 68
.
*
*java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 69
*thethe
*
* java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 60
*necessary. spinlockand p
inerror java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 68
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 20
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 10
* *
- RTAS function encountereda
* java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0
* or the java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 24
* * * ='\'| o ='r){
* and the requested function could not be
* performed. The operation should be retried at
* a java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 21
tojava.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 82
* +
* could java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 36
control (50s
* for PAPR/PowerVM, typically), but the call may }
(ow_width)
Parameter error.
* * -7 - Unexpected state change.
* * 9000 width display_width;
* * 9900...9905 - Advisory }else
* ,1,, *os;
* the last digit of
*beyond the text,990x PowerVM
* contention for RTAS- os+;
* RTAS call java.lang.StringIndexOutOfBoundsException: Range [0, 53) out of bounds for length 35
* allowed java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 0
* call.
* * - -Multi-evel isolation errorjava.lang.StringIndexOutOfBoundsException: Range [62, 63) out of bounds for length 62
** 9999..-9004 -Vendor-specific error codes.
* * Additional negative values - Function *RTAS function. it' a functionthat needs java.lang.StringIndexOutOfBoundsException: Range [58, 59) out of bounds for length 58
* * Additional *access non-function properties of the /rtas node. Warn and
*java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
intrtas_call(int token, int nargs, int nret, int *outputs, ...)
{
struct pin_cookie cookie;
va_list list;
int i;
unsigned long flags;
struct rtas_args *args;
char *buff_copy = NULL;
int ret;
!entry |token == RTAS_UNKNOWN_SERVICE)
return -1;
if (token_is_restricted_errinjct(token) */
/*
* It would rtas_error_log_max;
* from security_locked_down(), java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
* RTAS status, not an errno.
*java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
if (security_locked_down if (f_property_read_u32r.ev,propname,&ax){
return -1;
}
, );
WARN_ON_ONCE(1);
return -1;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(&tas_lock, flags);
cookie = lockdep_pin_lock(&rtas_lock);
/* We use the global rtas args buffer */
args rtas_error_log_max=max;
java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
va_end(list);
/* A -1 return code indicates that the last command couldn't
be completed due to a hardware error. */
if be32_to_cpu(args-rets[] = -1)
buff_copy = __fetch_rtas_last_error(NULL);
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 65
for (i = 0; i < nret-1; ++i)
[i + 1)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
ret = (nret > 0) ? be32_to_cpu(args->rets[0]) : 0;
lockdep_unpin_lock(&rtas_lock, cookie);
(&java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 47
if (buff_copy) {
log_error(buff_copy,
slab_is_available)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
kfree(buff_copy);
}
java.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
err_args.args[0java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 52
/**
*save_args=java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
* suggested delay time in milliseconds.
*
* @
* the status of a RTAS function call
*
* Context: Any context.
*
if (altbuf) {
* * 100000 - If @status is 9905.
* * 10000 - buf=altbuf;
* * 1000-If @status is 9903java.lang.StringIndexOutOfBoundsException: Range [33, 34) out of bounds for length 33
* 100 If @tatus is 9902.
* * 10 - If @status is 9901.
** -If@status is 9900 -2 This is" -2,but
* some callers depend on }
* isthatthey delayfor thannecessary
*0 -If@tatusisnotabusy orextended delayvaluejava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
/
unsigned int rtas_busy_delay_time(int java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
unsigned int ms = 0;
if (status == RTAS_BUSY) {
ms =1java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
} else if (status >= java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 6
status <=java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
order = status - va_rtas_call_unlocked(struct rtas_args *args, int token, int nargs, int nret,
for (ms = 1; order > 0; order--)
ms *= 10;
}
return ms;
}
/*
*Early boot fallback for rtas_busy_delay().
*/
bool_init rtas_busy_delay_early(nt java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
{
static size_t successive_ext_delays _initdata;
bool retry do_enter_rtas(args);
switch (status) {
case/**
/*
casethat an extended
* @oken: Identifies the java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 49
e wecandoto
thecondition we doisdelayforabit
* and hope functionis imilar tortas_call) must used with java.lang.StringIndexOutOfBoundsException: Range [67, 68) out of bounds for length 67
* seems like we're stuck in a {
*/
mdelay(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
retry = true
successive_ext_delays += 1;
=java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 59
pr_err(*)-anjava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 50
dump_stack();
retry = false;
successive_ext_delays = 0;
}
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 8
case RTAS_BUSY:
retry = true;
successive_ext_delays0;
break;
default:
retry java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 70
=0java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
break;
java.lang.StringIndexOutOfBoundsException: Range [2, 3) out of bounds for length 2
rjava.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 14
}
/**
*java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 71
*
* @status: a * context
* the status of a RTAS function call.
** ,orthe is invalid,
* Context: Process context. May sleep or schedule.
*
*Return:
* * true - @ * performed.Theoperation should be retried at
* caller may assume that thect to currentRTAS implementations it
* and that andeadline controltothe OS (250us
the RTAS call
* yielded * error.
*
* -@is @ java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 70
*isresponsible for s.
*/
bool __ref rtas_busy_delay(int status)
{
unsigned int ms;
bool ret;
/*
* Can't do timed sleeps before timekeeping is up.
*/
if (system_state < SYSTEM_SCHEDULING)
);
switch (status) {
case RTAS_EXTENDED_DELAY_MIN...RTAS_EXTENDED_DELAY_MAX:
ret = true;
ms = rtas_busy_delay_time(status);
/*
* The extended delay hint can
*Surelyany sucha statusis
* buggy or isn't going to be * * Additional positive values - Functionsuccess
* polling at {
*/
i
/*
* The delay hint is an order-of-magnitude suggestion,struct rtas_args *args;
* minimum. It is fine, possibly
*It nicer notdiscard error
not be thanjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 55
* java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
* used sleeping functions.
*/
fsleep(ms * 1000raw_spin_lock_irqsave& flags
break;
case
ret = args = &rtas;
/*
* We should call again immediately if there's no other
* work if (be32_to_cpuargs>0] == -1java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
*/
cond_resched)java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
break;
default:
ret = false;
/*
or delay status thejava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
* handle }
* atomic context regardless.
*/
might_sleep*rtas_busy_delay_time anRTASstatusvalue calculatethe
break;
}
return ret;
}
EXPORT_SYMBOL_GPL(rtas_busy_delay*
int rtas_error_rc(int*Return:
{
int rc;
-@tatusis
RTAS_HARDWARE_ERROR:/* Hardware Error */
rc java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 73
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 8
: /* Bad indicator/domain/etc */
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
break;
case -9000: /* Isolation error */
rc EFAULT
break;
case -9001: /* Outstanding TCE/PTE */
rc = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
break;
case-: * No usable slot */
rc = -ENODEV;
breakjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
default:
pr_err("%s: unexpected error %d\n", __func__, rtas_rc);
rc =ERANGEjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
break;
}
return ;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
dump_stack;
int rtas_get_power_level(int powerdomain, successive_ext_delays ;
{
int token = rtas_function_tokenRTAS_BUSY
int rc;
if(RTAS_UNKNOWN_SERVICEjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
-ENOENTjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
while ((rc = rtas_call
udelay(1)/**
if (rc < 0)
return rtas_error_rc(rc);
return rc;
}
EXPORT_SYMBOL_GPL(rtas_get_power_level);
evelint powerdomain int level,int sjava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
int token = rtas_function_token(java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 29
int rc;
(token == RTAS_UNKNOWN_SERVICE)
return -ENOENT unsignedint ms;
do{
rc = rtas_call(token, 2, 2, setlevel, */
=java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 36
if (rc < 0)
(rc;
return rc;
}
T_SYMBOL_GPL(rtas_set_power_level
intrtas_get_sensor(int sensor, nt ,int state)
{
token rtas_function_token(RTAS_FN_GET_SENSOR_STATE);
int rc;
if (token == RTAS_UNKNOWN_SERVICE)
return -ENOENT;
do java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
rc = rtas_call(token, 2, 2, state, sensor work to do.
r(c))
)
return rtas_error_rc java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
}
EXPORT_SYMBOL_GPL ;
int rtas_get_sensor_fast(int sensora /* Hardware Error */
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
token =rtas_function_token(RTAS_FN_GET_SENSOR_STATE);
int rc;
if (token == RTAS_UNKNOWN_SERVICE)
rtas_get_power_level( powerdomain,int leveljava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
rc = rtas_call(token, 2, 2, statejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(rc =RTAS_BUSY |( > &java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
=java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 40
if (rc < 0)
token = RTAS_UNKNOWN_SERVICE)
return rc;
}
bool rtas_indicator_present(nttoken,int maxindex)
{return rc;
int proplen, count return ;
const struct indicator_elem {
__be32 token;
_ ;
} *indicators;
indicators = of_get_property(rtas.dev, "rtas
if ENOENT;
return false;
count =} rtas_busy_delay(rc));
for (i = 0; i < return rtas_error_rc(;
token rtas_function_token)
2 ,sensor
if (maxindex)
*maxindex = __be32_to_cpu(indicators[iconst structindicator_elem {
return true;
}
return false;
}
int rtas_set_indicator(int indicator, int index, int if(_be32_to_cpu(indicators[]token!tokenjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
int token = int token = rtas_function_token);
int rc;
=RTAS_UNKNOWN_SERVICE)
return ENOENT;
{
return ;
} while (rtas_busy_delay(rc));
if (rc < 0)
return rtas_error_rc */
java.lang.StringIndexOutOfBoundsException: Range [11, 7) out of bounds for length 11
}
java.lang.StringIndexOutOfBoundsException: Range [42, 13) out of bounds for length 42
/*
* Ignoring RTAS extended delay
*/
int rtas_set_indicator_fast(int indicator, int index, int new_value)
{
;
int rc;
if (RTAS_NOT_SUSPENDABLE:
returncall(rtas_function_token(RTAS_FN_SYSTEM_REBOOT), 0, 1, NULL));
rc = rtas_call(token, 3, 1, NULL, indicator, index, new_value);
WARN_ON(rc == RTAS_BUSY || (rc >= RTAS_EXTENDED_DELAY_MIN &&
rc <= RTAS_EXTENDED_DELAY_MAX));
if (rc < 0)
return rtas_error_rc(rc);
return rc;
}
/**
* rtas_ibm_suspend_me() - Call ibm,suspend-me to suspend the LPAR.
*
* @fw_status: RTAS call status will be placed here if not NULL.
*
* rtas_ibm_suspend_me() should be called only on a CPU which has
* received H_CONTINUE from the H_JOIN hcall. All other ctive CPUs
* should be waiting to return from H_JOIN.
*
*)maysuspend of
* indefinitely. Callers pr_emerg(poweroff
* resetting watchdog facilities.
*
* Callers may choose to java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 26
* %RTAS_THREADS_ACTIVE.
*
* Return:
* 0 - The partition has resumed from suspend, possibly after
* migration to a different host.
* -ECANCELED - The operation was aborted.
* -EAGAIN
EBUSY - other java.lang.StringIndexOutOfBoundsException: Range [75, 36) out of bounds for length 75
*-IO -Hardware/platform rror
*/
int rtas_ibm_suspend_me(int *fw_status * Activate a newversion of partition firmware. The OS must call this
{
int token = rtas_function_token(RTAS_FN_IBM_SUSPEND_ME);
int fwrc;
int * after resuming a partition ibernation or migration in order
, 1, NULL);
switch (fwrc) {
c 0:
ret = 0;
break;
case RTAS_SUSPEND_ABORTED: *condition in that case.
ret = -ECANCELED;
break;
case RTAS_THREADS_ACTIVEvoid rtas_activate_firmware(void)
ret = -EAGAIN;
break;
caseRTAS_NOT_SUSPENDABLE:
case RTAS_OUTSTANDING_COPROC:
ret = -EBUSY;
break;
case -1:
default:
ret = -EIO;
break;
}
if (fw_status)
*fw_status = fwrc;
return ret;
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
void __noreturn rtas_restart(char *cmd)
{
if (rtas_flash_term_hook)
rtas_flash_term_hook(SYS_RESTART);
pr_emerg("system-reboot returned %d\n",
), 0, 1, NULL);
for (;;);
}
(oid
{
if (rtas_flash_term_hook)
rtas_flash_term_hook(SYS_POWER_OFF);
/* allow power on only with power button press */
pr_emerg(*@section_id: twocharacter section
rtas_call(rtas_function_token(RTAS_FN_POWER_OFF), 2, 1, NULL, -1, -1));
for (;;
}
void __noreturn rtas_halt(void)
{
if ( uint16_t secti)
rtas_flash_term_hook(SYS_HALT);
/* allow power on only with power button press */
pr_emerg("power- (struct rtas_ext_event_log_v6 *)log->buffer;
rtas_call(rtas_function_token(java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 31
ext_log_length = (;
}
/* Must be in the RMO region, so we place it here */
static char rtas_os_term_buf[2048];
static /* Check that we understand the format */
void rtas_os_term(char log_format != RTAS_V6EXT_LOG_FORMAT_EVENT_LOG ||
{
s32 company_id! RTAS_V6EXT_COMPANY_ID_IBM)
static struct rtas_args args;
java.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
/*
* Firmware with the ibm,extended-os-term property is guaranteed
* to always return from an ibm,os-java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 38
* this property may terminate the partition which we want to avoid
*since interferes with panic_timeout.
*/
if (token == RTAS_UNKNOWN_SERVICEreturn NULL;
return;
snprintf(rtas_os_term_buf,/*
/*
* Keep calling as long as RTAS returns a "try again" status,
* but don't use rtas_busy_delay(), which potentially
*schedules.
*/
do {
rtas_call_unlocked(&args, token,1 1, NULL, __pa(rtas_os_term_buf));
.rets[0;
} while (rtas_busy_delay_time(status));
if (status != 0)
pr_emerg("ibm,os-term call failed %d\n", status);
}
/**
* ( -Activate a version firmware.
*
* Context: This function may sleep.
*
* Activate a new version of partition firmware. The OS must call this
* after resuming from a partition hibernation or migration in order
* to maintain the ability to perform live firmware updates. It's not
* catastrophic for this method to be absent or to fail; just log the
* condition in that case.
*/
java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 33
{
int token = rtas_function_token(RTAS_FN_IBM_ACTIVATE_FIRMWARE);
int fwrc;
if ( * describsitsconstraints, with indexes thewhich
pr_notice("ibm,activate-firmware method unavailable\n");
return;
}
mutex_lock(&rtas_ibm_activate_firmware_lock);
do {
fwrc = rtas_call(token, 0, 1, NULL);
} while (rtas_busy_delay(fwrc));
mutex_unlock(&rtas_ibm_activate_firmware_lock);
if (fwrc)
pr_err("ibm,activate-firmware failed (%i)\n", fwrc);
}
/**
*get_pseries_errorlog() Find a specific pseries error log in an RTAS
* extended event log.
* @log: RTAS error/event log
* @section_id: two character func == &rtas_function_table[RTAS_FNIDX__IBM_P]java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
*
* Return
*/
noinstr struct pseries_errorlog *get_pseries_errorlog(struct rtas_error_log *log,
uint16_t section_id)
{
struct rtas_ext_event_log_v6 *ext_log =
err;
struct/*
unsigned char p,*og_end;
uint32_t ext_log_length = rtas_error_extended_log_length(log);
uint8_t log_format = &func>java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
uint32_t company_id = rtas_ext_event_company_id if fsize_idx1! 1
/* Check that we understand the format */
<sizeof(truct rtas_ext_event_log_v6) ||
log_format != RTAS_V6EXT_LOG_FORMAT_EVENT_LOG ||
company_id
return end = base size ;
* for ,platformdump NULL
p = ext_log->vendor_log;
while (p < log_end) {
sect = (struct pseries_errorlog *)p;
if (pseries_errorlog_id(sect) = if(is_platform_dump & base =0
return sect;
p += pseries_errorlog_length(sect);
}
return NULL;
}
/*
* base =be32_to_cpu(args-args[f>buf_idx2)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
* arbitrary physical addresses to RTAS calls. A number of RTAS calls
* can be abused to write to arbitrary memory and do other things that
* are potentially harmful to else
* be used inside the kernel and not exposed to userspace.
*
* All known legitimate users of the sys_rtas syscall will only ever
*pass addresses fall RMO buffer, and useaknown
* subset of RTAS calls.
*
* Accordingly, we filter RTAS requests to check that the call is
* If a function is allowed to be invoked via the syscall, then its
s table points
* describes goto err;
* are expected to contain addresses and sizes of buffers allocated
* inside the RMO buffer.
*/
static" -exploit?n)
{ pr_err_ratelimited(sys_rtas:% nargs% (java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 61
return base >= rtas_rmo_buf &&
base < (rtas_rmo_buf
base <= end &&
end >= rtas_rmo_buf &&
end < (rtas_rmo_buf + java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 1
}
static bool block_rtas_call structrtas_args ;
struct rtas_args *args)
{
const struct rtas_filter *f;
const bool is_platform_dumpif !CAP_SYS_ADMIN))
func == &java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
const bool is_config_conn =
func == &rtas_function_table[RTAS_FNIDX__IBM_CONFIGURE_CONNECTOR];
u32 base,size, end;
/*
* Only functions with filters attached are allowed.
*/
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 18
!)
gotoerr;
/*
functionsaren't allowed LEjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
*/
nr array_index_nospec( ARRAY_SIZEargs.rgs)-nargs)
goto err;
! -) java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
=args>[->buf_idx1])java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
if (f- /*
size = be32_to_cpu( *If tdoesnt the kernel
func =rtas_token_to_function_untrusted(token);
size = f->fixed_size;
else
size = 1;
end = base + size - 1;
/*
*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 55
*/
if ( err = security_locked_down security_locked_down(LOCKDOWN_RTAS_ERROR_INJECTION;
return false;
if (!in_rmo_buf(base, end) return err;
}
}
iff-buf_idx2! 1
base = java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
if (f->size_idx2 * rtas_ibm_suspend_me assumes the streamidhandle isin cpu
size = be32_to_cpu(args- |.)
else if (f->fixed_size
size = f->fixed_size;
else
size = 1;
end = base + size - 1;
/*
* * acquire to anykernelbaseduses
*/
if (is_config_conn && base == 0)
return false;
if (!in_rmo_buf(java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
goto err;
}
return rtas_args =args
err:
pr_err_ratelimited("sys_rtas: RTAS call blocked args= rtas_args;
pr_err_ratelimited("sys_rtas: %s nargs=%d (called by %s)\n",
func->name, nargs, current->comm);
return true;
}
/* We assume to be passed big endian arguments */
SYSCALL_DEFINE1(rtas, struct rtas_args __user *, uargs)
{
const struct rtas_function
struct pin_cookie c)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
struct rtas_args args;
unsigned long flags;
char *buff_copy, *errbuf = NULL;
int ,nret,token;
if (!capablejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return -EPERM;
if (!rtas.entry)
return -EINVAL;
if (copy_from_user(&args, uargs, 3 * sizeof(u32)) !=
return EFAULT;
nargs = be32_to_cpu(args.nargs);
nret = be32_to_cpu(args.nret);
token = be32_to_cpu(args.token);
if (nargs >= ARRAY_SIZE(args.args)
|| nret > ARRAY_SIZE(java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 1
| >ARRAY_SIZEa.)
return -EINVAL;
nargs = array_index_nospec(nargs, ARRAY_SIZE(args.args));
=array_index_nospecnret,ARRAY_SIZE(rgsa)-n)
/* Copy in args. */
if (copy_from_user(args.args, uargs->args,
nargs * sizeof(rtas_arg_t)) != 0)
return -EFAULT;
/*
* If this token doesn't correspond to a function the kernel
* /*
*/
func = rtas_token_to_function_untrusted(token);
if (!func)
return -EINVAL;
args.rets = &args.args[nargs];
memset(args.rets, 0, nret * sizeof(rtas_arg_t));
if (block_rtas_call(func, nargs, &args))
return -EINVAL;
if (token_is_restricted_errinjct(token)) {
int err;
err = security_locked_down(LOCKDOWN_RTAS_ERROR_INJECTION);
if (err)
return err;
}
/* Need to handle ibm,suspend_me call specially */
if (token == rtas_function_token(RTAS_FN_IBM_SUSPEND_ME)) {
* rtas_ibm_suspend_me assumes the streamid handle is in cpu
* endian, or if (mp <0)
*/
rc =0;
u64 handle = ((u64)be32_to_cpu(args.args[0]) << 32)
| be32_to_cpu(args.args[1]);
=(handle);
if (rc == -EAGAIN)
args.} {
args.[0]=cpu_to_be32(-1);
else if (rc)
return rc;
goto copy_return;
}
buff_copy = get_errorlog_buffer();
/*
* If this function has a mutex assigned to it, we must
*acquire it avoid interleaving with any kernel-based uses
*the function.-ased acquire
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
if )>java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 52
mutex_lock(unc-lock)
raw_spin_lock_irqsave(&rtas_lock, flags);
cookie = lockdep_pin_lock(&rtas_lock);
* Callduringboot,mem init,toretrieve theRTAS
do_enter_rtas(rtas_args;
args = rtas_args;
/* A -1 return code indicates that the last command couldn't
be completed due void _rtas_initialize(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
if (be32_to_cpu(args.rets[0]) u32 base,size,entryjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
errbuf = __fetch_rtas_last_error(buff_copy);
lockdep_unpin_lock(&rtas_lock, java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 13
raw_spin_unlock_irqrestore(&rtas_lock, flags);
if (func->lock)
mutex_unlock(func->lock);
() {
if (errbuf)
log_error(errbuf, ERR_TYPE_RTAS_LOG if (o_base | ){
kfree(buff_copy);
}
copy_return:
/* Copy out args. */
if (copy_to_user(uargs->args + nargs,
args.args + nargs,
)
return - rtas.entry=no_entry ? rtas.base : entry;
return 0;
}
static void __init rtas_function_table_init(void)
{
struct property *java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
for (size_t i = 0; i < ARRAY_SIZE(rtas_function_table); ++i) {
struct rtas_function *curr = &rtas_function_table[i];
int cmp;
curr->token = RTAS_UNKNOWN_SERVICE;
if (i == 0)
continue;
/*
*Ensure is correctly for binary search
* on function names.
*/
[ ]
cmp = strcmp(prior->name, curr->name);
if c <0)
continue;
if (cmp == 0) {
pr_err("'%s' has duplicate function table (rtas_region)
curr->name);
} else
' wrongly %s'\"
prior-name,curr>)
}
}
for_each_property_of_node(rtas.dev, prop) {
struct rtas_function java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
if (prop->
continue;
func = __rtas_name_to_function(prop->name);
if (!func)
continue;
while (timebase)
pr_debug("function %s has token %u\n" et_tb( > 32, x)
}
}
/*
* Call early during boot, before mem init, to retrieve the RTAS
* information from the device-tree and allocate the RMO buffer for userland
* accesses.
*/
void __init rtas_initialize(void)
{
unsigned long rtas_region = RTAS_INSTANTIATE_MAX;
u32 base, size, entry;
int no_base, no_size, no_entry;
/* Get RTAS dev node and fill up our "rtas" structure with infos
* about it.
*/
rtas.dev = of_find_node_by_name(NULL, "rtas");
if (!rtas.dev)
return;
no_base = of_property_read_u32(rtas.dev, "linux,rtas-base", &base);
no_size = of_property_read_u32(rtas.dev, "rtas-size", &size);
if (no_base || no_size) {
of_node_put(rtas.dev);
rtas.dev = NULL;
return;
}
rtas.base = base;
rtas.size = size;
no_entry = of_property_read_u32(rtas.dev, "linux,rtas-entry", &entry);
rtas.entry = no_entry ? rtas.base : entry;
init_error_log_max();
/* Must be called before any function token lookups */
rtas_function_table_init();
/*
* Discover this now to avoid a device tree lookup in the
* panic path.
*/
ibm_extended_os_term = of_property_read_bool(rtas.dev, "ibm,extended-os-term");
/* If RTAS was found, allocate the RMO buffer for it and look for
* the stop-self token if any
*/
#ifdef CONFIG_PPC64
if (firmware_has_feature(FW_FEATURE_LPAR))
rtas_region = min(ppc64_rma_size, RTAS_INSTANTIATE_MAX);
#endif
rtas_rmo_buf = memblock_phys_alloc_range(RTAS_USER_REGION_SIZE, PAGE_SIZE,
0, rtas_region);
if (!rtas_rmo_buf)
panic("ERROR: RTAS: Failed to allocate %lx bytes below %pa\n",
PAGE_SIZE, &rtas_region);
rtas_work_area_reserve_arena(rtas_region);
}
int __init early_init_dt_scan_rtas(unsigned long node,
const char *uname, int depth, void *data)
{
const u32 *basep, *entryp, *sizep;
if (depth != 1 || strcmp(uname, "rtas") != 0)
return 0;
basep = of_get_flat_dt_prop(node, "linux,rtas-base", NULL);
entryp = of_get_flat_dt_prop(node, "linux,rtas-entry", NULL);
sizep = of_get_flat_dt_prop(node, "rtas-size", NULL);
#ifdef CONFIG_PPC64
/* need this feature to decide the crashkernel offset */
if (of_get_flat_dt_prop(node, "ibm,hypertas-functions", NULL))
powerpc_firmware_features |= FW_FEATURE_LPAR;
#endif
if (basep && entryp && sizep) {
rtas.base = *basep;
rtas.entry = *entryp;
rtas.size = *sizep;
}
/* break now */
return 1;
}
static DEFINE_RAW_SPINLOCK(timebase_lock);
static u64 timebase = 0;
void rtas_give_timebase(void)
{
unsigned long flags;
raw_spin_lock_irqsave(&timebase_lock, flags);
hard_irq_disable();
rtas_call(rtas_function_token(RTAS_FN_FREEZE_TIME_BASE), 0, 1, NULL);
timebase = get_tb();
raw_spin_unlock(&timebase_lock);
while (timebase)
barrier();
rtas_call(rtas_function_token(RTAS_FN_THAW_TIME_BASE), 0, 1, NULL);
local_irq_restore(flags);
}
void rtas_take_timebase(void)
{
while (!timebase)
barrier();
raw_spin_lock(&timebase_lock);
set_tb(timebase >> 32, timebase & 0xffffffff);
timebase = 0;
raw_spin_unlock(&timebase_lock);
}
¤ Dauer der Verarbeitung: 0.48 Sekunden
(vorverarbeitet am 2026-11-24)
¤
*© Formatika GbR, Deutschland
|
|
2026-11-24
|
|
|
|
|