Lines Matching +full:used +full:- +full:by +full:- +full:rtas
1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * Procedures for interfacing to the RTAS on CHRP machines.
10 #define pr_fmt(fmt) "rtas: " fmt
42 #include <asm/rtas-work-area.h>
43 #include <asm/rtas.h>
49 /* Indexes into the args buffer, -1 if not used */
62 * struct rtas_function - Descriptor for RTAS functions.
64 * @token: Value of @name if it exists under the /rtas node.
66 * @filter: If non-NULL, invoking this function via the rtas syscall is
75 * @lock: Pointer to an optional dedicated per-function mutex. This
92 * Per-function locks for sequence-based RTAS functions.
104 .name = "check-exception",
107 .name = "display-character",
109 .buf_idx1 = -1, .size_idx1 = -1,
110 .buf_idx2 = -1, .size_idx2 = -1,
114 .name = "event-scan",
117 .name = "freeze-time-base",
120 .name = "get-power-level",
122 .buf_idx1 = -1, .size_idx1 = -1,
123 .buf_idx2 = -1, .size_idx2 = -1,
127 .name = "get-sensor-state",
129 .buf_idx1 = -1, .size_idx1 = -1,
130 .buf_idx2 = -1, .size_idx2 = -1,
134 .name = "get-term-char",
137 .name = "get-time-of-day",
139 .buf_idx1 = -1, .size_idx1 = -1,
140 .buf_idx2 = -1, .size_idx2 = -1,
144 .name = "ibm,activate-firmware",
146 .buf_idx1 = -1, .size_idx1 = -1,
147 .buf_idx2 = -1, .size_idx2 = -1,
158 .name = "ibm,cbe-start-ptcal",
161 .name = "ibm,cbe-stop-ptcal",
164 .name = "ibm,change-msi",
167 .name = "ibm,close-errinjct",
169 .buf_idx1 = -1, .size_idx1 = -1,
170 .buf_idx2 = -1, .size_idx2 = -1,
174 .name = "ibm,configure-bridge",
177 .name = "ibm,configure-connector",
179 .buf_idx1 = 0, .size_idx1 = -1,
180 .buf_idx2 = 1, .size_idx2 = -1,
185 .name = "ibm,configure-kernel-dump",
188 .name = "ibm,configure-pe",
191 .name = "ibm,create-pe-dma-window",
194 .name = "ibm,display-message",
196 .buf_idx1 = 0, .size_idx1 = -1,
197 .buf_idx2 = -1, .size_idx2 = -1,
203 .buf_idx1 = 2, .size_idx1 = -1,
204 .buf_idx2 = -1, .size_idx2 = -1,
212 .name = "ibm,get-config-addr-info",
215 .name = "ibm,get-config-addr-info2",
217 .buf_idx1 = -1, .size_idx1 = -1,
218 .buf_idx2 = -1, .size_idx2 = -1,
222 .name = "ibm,get-dynamic-sensor-state",
224 .buf_idx1 = 1, .size_idx1 = -1,
225 .buf_idx2 = -1, .size_idx2 = -1,
229 * must not call ibm,get-dynamic-sensor-state with
230 * different inputs until a non-retry status has been
236 .name = "ibm,get-indices",
239 .buf_idx2 = -1, .size_idx2 = -1,
243 * interleave ibm,get-indices call sequences with
249 .name = "ibm,get-rio-topology",
252 .name = "ibm,get-system-parameter",
255 .buf_idx2 = -1, .size_idx2 = -1,
259 .name = "ibm,get-vpd",
261 .buf_idx1 = 0, .size_idx1 = -1,
271 .name = "ibm,get-xive",
274 .name = "ibm,int-off",
277 .name = "ibm,int-on",
280 .name = "ibm,io-quiesce-ack",
283 .name = "ibm,lpar-perftools",
286 .buf_idx2 = -1, .size_idx2 = -1,
295 .name = "ibm,manage-flash-image",
298 .name = "ibm,manage-storage-preservation",
301 .name = "ibm,nmi-interlock",
304 .name = "ibm,nmi-register",
307 .name = "ibm,open-errinjct",
309 .buf_idx1 = -1, .size_idx1 = -1,
310 .buf_idx2 = -1, .size_idx2 = -1,
314 .name = "ibm,open-sriov-allow-unfreeze",
317 .name = "ibm,open-sriov-map-pe-number",
320 .name = "ibm,os-term",
323 .name = "ibm,partner-control",
326 .name = "ibm,physical-attestation",
329 .buf_idx2 = -1, .size_idx2 = -1,
332 * This follows a sequence-based pattern similar to
333 * ibm,get-vpd et al. Since PAPR+ restricts
341 .name = "ibm,platform-dump",
344 .buf_idx2 = -1, .size_idx2 = -1,
348 * sequences of ibm,platform-dump are allowed if they
351 * reconsideration if kernel-internal users appear.
355 .name = "ibm,power-off-ups",
358 .name = "ibm,query-interrupt-source-number",
361 .name = "ibm,query-pe-dma-window",
364 .name = "ibm,read-pci-config",
367 .name = "ibm,read-slot-reset-state",
369 .buf_idx1 = -1, .size_idx1 = -1,
370 .buf_idx2 = -1, .size_idx2 = -1,
374 .name = "ibm,read-slot-reset-state2",
377 .name = "ibm,remove-pe-dma-window",
382 * "ibm,reset-pe-dma-windows" (plural), but RTAS
385 .name = "ibm,reset-pe-dma-window",
388 .name = "ibm,scan-log-dump",
391 .buf_idx2 = -1, .size_idx2 = -1,
395 .name = "ibm,set-dynamic-indicator",
397 .buf_idx1 = 2, .size_idx1 = -1,
398 .buf_idx2 = -1, .size_idx2 = -1,
403 * non-retry status has been returned.
408 .name = "ibm,set-eeh-option",
410 .buf_idx1 = -1, .size_idx1 = -1,
411 .buf_idx2 = -1, .size_idx2 = -1,
415 .name = "ibm,set-slot-reset",
418 .name = "ibm,set-system-parameter",
420 .buf_idx1 = 1, .size_idx1 = -1,
421 .buf_idx2 = -1, .size_idx2 = -1,
425 .name = "ibm,set-xive",
428 .name = "ibm,slot-error-detail",
431 .name = "ibm,suspend-me",
434 .buf_idx1 = -1, .size_idx1 = -1,
435 .buf_idx2 = -1, .size_idx2 = -1,
439 .name = "ibm,tune-dma-parms",
442 .name = "ibm,update-flash-64-and-reboot",
445 .name = "ibm,update-nodes",
448 .buf_idx1 = 0, .size_idx1 = -1,
449 .buf_idx2 = -1, .size_idx2 = -1,
454 .name = "ibm,update-properties",
457 .buf_idx1 = 0, .size_idx1 = -1,
458 .buf_idx2 = -1, .size_idx2 = -1,
463 .name = "ibm,validate-flash-image",
466 .name = "ibm,write-pci-config",
469 .name = "nvram-fetch",
472 .name = "nvram-store",
475 .name = "power-off",
478 .name = "put-term-char",
481 .name = "query-cpu-stopped-state",
484 .name = "read-pci-config",
487 .name = "rtas-last-error",
490 .name = "set-indicator",
492 .buf_idx1 = -1, .size_idx1 = -1,
493 .buf_idx2 = -1, .size_idx2 = -1,
497 .name = "set-power-level",
499 .buf_idx1 = -1, .size_idx1 = -1,
500 .buf_idx2 = -1, .size_idx2 = -1,
504 .name = "set-time-for-power-on",
506 .buf_idx1 = -1, .size_idx1 = -1,
507 .buf_idx2 = -1, .size_idx2 = -1,
511 .name = "set-time-of-day",
513 .buf_idx1 = -1, .size_idx1 = -1,
514 .buf_idx2 = -1, .size_idx2 = -1,
518 .name = "start-cpu",
521 .name = "stop-self",
524 .name = "system-reboot",
527 .name = "thaw-time-base",
530 .name = "write-pci-config",
540 * Nearly all RTAS calls need to be serialized. All uses of the
543 * Exceptions to the RTAS serialization requirement (e.g. stop-self)
550 * rtas_function_token() - RTAS function token lookup.
554 * Return: the token value for the function if implemented by this platform,
565 * Various drivers attempt token lookups on non-RTAS in rtas_function_token()
568 if (!rtas.dev) in rtas_function_token()
580 return strcmp(f1->name, f2->name); in rtas_function_cmp()
584 * Boot-time initialization of the function table needs the lookup to
585 * return a non-const-qualified object. Use rtas_name_to_function()
614 const s32 token = func->token; in rtas_token_to_function_xarray_init()
630 * For use by sys_rtas(), where the token value is provided by user
640 * known-good token value in contexts where the former is not already
660 if (func->token == token) in rtas_token_to_function()
669 /* This is here deliberately so it's only used in this file */
675 srr_regs_clobbered(); /* rtas uses SRRs, invalidate */ in __do_enter_rtas()
680 const struct rtas_function *func = rtas_token_to_function(be32_to_cpu(args->token)); in __do_enter_rtas_trace()
683 * If there is a per-function lock, it must be held by the in __do_enter_rtas_trace()
686 if (func->lock) in __do_enter_rtas_trace()
687 lockdep_assert_held(func->lock); in __do_enter_rtas_trace()
692 trace_rtas_input(args, func->name); in __do_enter_rtas_trace()
698 trace_rtas_output(args, func->name); in __do_enter_rtas_trace()
709 * i.e. we're about to call stop-self. The tracepoints' in do_enter_rtas()
714 * 2. In real mode, as when invoking ibm,nmi-interlock from in do_enter_rtas()
738 struct rtas_t rtas; variable
749 * If non-NULL, this gets called when the kernel terminates.
757 * are designed only for very early low-level debugging, which
758 * is why the token is hard-coded to 10.
764 if (!rtas.base) in call_rtas_display_status()
778 while (width-- > 0) in call_rtas_display_status_delay()
789 if (width--) { in call_rtas_display_status_delay()
805 * hardcode rtas.base/entry etc.
814 if (!rtas.base) in udbg_rtascon_putc()
833 if (!rtas.base) in udbg_rtascon_getc_poll()
834 return -1; in udbg_rtascon_getc_poll()
837 return -1; in udbg_rtascon_getc_poll()
846 while ((c = udbg_rtascon_getc_poll()) == -1) in udbg_rtascon_getc()
874 if (!rtas.base) in rtas_progress()
879 if ((root = of_find_node_by_path("/rtas"))) { in rtas_progress()
881 "ibm,display-line-length", NULL))) in rtas_progress()
884 "ibm,form-feed", NULL))) in rtas_progress()
887 "ibm,display-number-of-lines", NULL))) in rtas_progress()
890 "ibm,display-truncation-length", NULL); in rtas_progress()
942 if (current_line > display_lines-1) in rtas_progress()
943 current_line = display_lines-1; in rtas_progress()
948 /* RTAS wants CR-LF, not just LF */ in rtas_progress()
954 /* CR might be used to re-draw a line, so we'll in rtas_progress()
965 width--; in rtas_progress()
979 EXPORT_SYMBOL_GPL(rtas_progress); /* needed by rtas_flash module */
986 if (rtas.dev == NULL) in rtas_token()
991 return func->token; in rtas_token()
994 * RTAS function. Either it's a function that needs to be in rtas_token()
996 * access non-function properties of the /rtas node. Warn and in rtas_token()
1002 tokp = of_get_property(rtas.dev, service, NULL); in rtas_token()
1012 * Return the firmware-specified size of the error log buffer
1013 * for all rtas calls that require an error buffer argument.
1014 * This includes 'check-exception' and 'rtas-last-error'.
1023 static const char propname[] __initconst = "rtas-error-log-max"; in init_error_log_max()
1026 if (of_property_read_u32(rtas.dev, propname, &max)) { in init_error_log_max()
1045 * most recent failed call to rtas. Because the error text
1046 * might go stale if there are any other intervening rtas calls,
1059 if (token == -1) in __fetch_rtas_last_error()
1110 args->token = cpu_to_be32(token); in va_rtas_call_unlocked()
1111 args->nargs = cpu_to_be32(nargs); in va_rtas_call_unlocked()
1112 args->nret = cpu_to_be32(nret); in va_rtas_call_unlocked()
1113 args->rets = &(args->args[nargs]); in va_rtas_call_unlocked()
1116 args->args[i] = cpu_to_be32(va_arg(list, __u32)); in va_rtas_call_unlocked()
1119 args->rets[i] = 0; in va_rtas_call_unlocked()
1125 * rtas_call_unlocked() - Invoke an RTAS firmware function without synchronization.
1126 * @args: RTAS parameter block to be used for the call, must obey RTAS addressing
1133 * Invokes the RTAS function indicated by @token, which the caller
1136 * This function is similar to rtas_call(), but must be used with a
1137 * limited set of RTAS calls specifically exempted from the general
1138 * requirement that only one RTAS call may be in progress at any
1139 * time. Examples include stop-self and ibm,nmi-interlock.
1157 * rtas_call() - Invoke an RTAS firmware function.
1164 * Invokes the RTAS function indicated by @token, which the caller
1168 * output parameters specified for the RTAS function.
1170 * rtas_call() returns RTAS status codes, not conventional Linux errno
1172 * in syscall context. Most callers of RTAS functions that can return
1173 * -2 or 990x should use rtas_busy_delay() to correctly handle those
1176 * The return value descriptions are adapted from 7.2.8 [RTAS] Return
1184 * * 0 - RTAS function call succeeded.
1185 * * -1 - RTAS function encountered a hardware or
1187 * or the function is restricted by kernel policy.
1188 * * -2 - Specs say "A necessary hardware device was busy,
1192 * respect to current RTAS implementations. What it
1194 * could not be completed while meeting RTAS's
1198 * * -3 - Parameter error.
1199 * * -7 - Unexpected state change.
1200 * * 9000...9899 - Vendor-specific success codes.
1201 * * 9900...9905 - Advisory extended delay. Caller should try
1203 * the last digit of the status [0-5]. Again going
1205 * contention for RTAS-internal resources. Other
1206 * RTAS call sequences in progress should be
1209 * * -9000 - Multi-level isolation error.
1210 * * -9999...-9004 - Vendor-specific error codes.
1211 * * Additional negative values - Function-specific error.
1212 * * Additional positive values - Function-specific success.
1224 if (!rtas.entry || token == RTAS_UNKNOWN_SERVICE) in rtas_call()
1225 return -1; in rtas_call()
1231 * RTAS status, not an errno. in rtas_call()
1234 return -1; in rtas_call()
1239 return -1; in rtas_call()
1245 /* We use the global rtas args buffer */ in rtas_call()
1252 /* A -1 return code indicates that the last command couldn't in rtas_call()
1254 if (be32_to_cpu(args->rets[0]) == -1) in rtas_call()
1258 for (i = 0; i < nret-1; ++i) in rtas_call()
1259 outputs[i] = be32_to_cpu(args->rets[i + 1]); in rtas_call()
1260 ret = (nret > 0) ? be32_to_cpu(args->rets[0]) : 0; in rtas_call()
1275 * rtas_busy_delay_time() - From an RTAS status value, calculate the
1279 * the status of a RTAS function call.
1284 * * 100000 - If @status is 9905.
1285 * * 10000 - If @status is 9904.
1286 * * 1000 - If @status is 9903.
1287 * * 100 - If @status is 9902.
1288 * * 10 - If @status is 9901.
1289 * * 1 - If @status is either 9900 or -2. This is "wrong" for -2, but
1292 * * 0 - If @status is not a busy or extended delay value.
1303 order = status - RTAS_EXTENDED_DELAY_MIN; in rtas_busy_delay_time()
1304 for (ms = 1; order > 0; order--) in rtas_busy_delay_time()
1353 * rtas_busy_delay() - helper for RTAS busy and extended delay statuses
1356 * the status of a RTAS function call.
1361 * * true - @status is RTAS_BUSY or an extended delay hint. The
1364 * Generally the caller should reattempt the RTAS call which
1367 * * false - @status is not @RTAS_BUSY nor an extended delay hint. The
1388 * buggy or isn't going to be significantly slowed by us in rtas_busy_delay()
1393 * The delay hint is an order-of-magnitude suggestion, not in rtas_busy_delay()
1399 * See Documentation/timers/timers-howto.rst for in rtas_busy_delay()
1400 * explanation of the threshold used here. In effect we use in rtas_busy_delay()
1402 * 9902-9905. in rtas_busy_delay()
1438 rc = -EIO; in rtas_error_rc()
1441 rc = -EINVAL; in rtas_error_rc()
1443 case -9000: /* Isolation error */ in rtas_error_rc()
1444 rc = -EFAULT; in rtas_error_rc()
1446 case -9001: /* Outstanding TCE/PTE */ in rtas_error_rc()
1447 rc = -EEXIST; in rtas_error_rc()
1449 case -9002: /* No usable slot */ in rtas_error_rc()
1450 rc = -ENODEV; in rtas_error_rc()
1454 rc = -ERANGE; in rtas_error_rc()
1467 return -ENOENT; in rtas_get_power_level()
1484 return -ENOENT; in rtas_set_power_level()
1502 return -ENOENT; in rtas_get_sensor()
1520 return -ENOENT; in rtas_get_sensor_fast()
1539 indicators = of_get_property(rtas.dev, "rtas-indicators", &proplen); in rtas_indicator_present()
1562 return -ENOENT; in rtas_set_indicator()
1575 * Ignoring RTAS extended delay
1583 return -ENOENT; in rtas_set_indicator_fast()
1597 * rtas_ibm_suspend_me() - Call ibm,suspend-me to suspend the LPAR.
1599 * @fw_status: RTAS call status will be placed here if not NULL.
1613 * 0 - The partition has resumed from suspend, possibly after
1615 * -ECANCELED - The operation was aborted.
1616 * -EAGAIN - There were other CPUs not in H_JOIN at the time of the call.
1617 * -EBUSY - Some other condition prevented the suspend from succeeding.
1618 * -EIO - Hardware/platform error.
1633 ret = -ECANCELED; in rtas_ibm_suspend_me()
1636 ret = -EAGAIN; in rtas_ibm_suspend_me()
1640 ret = -EBUSY; in rtas_ibm_suspend_me()
1642 case -1: in rtas_ibm_suspend_me()
1644 ret = -EIO; in rtas_ibm_suspend_me()
1658 pr_emerg("system-reboot returned %d\n", in rtas_restart()
1668 pr_emerg("power-off returned %d\n", in rtas_power_off()
1669 rtas_call(rtas_function_token(RTAS_FN_POWER_OFF), 2, 1, NULL, -1, -1)); in rtas_power_off()
1678 pr_emerg("power-off returned %d\n", in rtas_halt()
1679 rtas_call(rtas_function_token(RTAS_FN_POWER_OFF), 2, 1, NULL, -1, -1)); in rtas_halt()
1694 * Firmware with the ibm,extended-os-term property is guaranteed in rtas_os_term()
1695 * to always return from an ibm,os-term call. Earlier versions without in rtas_os_term()
1706 * Keep calling as long as RTAS returns a "try again" status, in rtas_os_term()
1716 pr_emerg("ibm,os-term call failed %d\n", status); in rtas_os_term()
1720 * rtas_activate_firmware() - Activate a new version of firmware.
1736 pr_notice("ibm,activate-firmware method unavailable\n"); in rtas_activate_firmware()
1749 pr_err("ibm,activate-firmware failed (%i)\n", fwrc); in rtas_activate_firmware()
1753 * get_pseries_errorlog() - Find a specific pseries error log in an RTAS
1755 * @log: RTAS error/event log
1764 (struct rtas_ext_event_log_v6 *)log->buffer; in get_pseries_errorlog()
1777 log_end = log->buffer + ext_log_length; in get_pseries_errorlog()
1778 p = ext_log->vendor_log; in get_pseries_errorlog()
1792 * arbitrary physical addresses to RTAS calls. A number of RTAS calls
1795 * be used inside the kernel and not exposed to userspace.
1799 * subset of RTAS calls.
1801 * Accordingly, we filter RTAS requests to check that the call is
1832 f = func->filter; in block_rtas_call()
1838 if (IS_ENABLED(CONFIG_CPU_LITTLE_ENDIAN) && func->banned_for_syscall_on_le) in block_rtas_call()
1841 if (f->buf_idx1 != -1) { in block_rtas_call()
1842 base = be32_to_cpu(args->args[f->buf_idx1]); in block_rtas_call()
1843 if (f->size_idx1 != -1) in block_rtas_call()
1844 size = be32_to_cpu(args->args[f->size_idx1]); in block_rtas_call()
1845 else if (f->fixed_size) in block_rtas_call()
1846 size = f->fixed_size; in block_rtas_call()
1850 end = base + size - 1; in block_rtas_call()
1853 * Special case for ibm,platform-dump - NULL buffer in block_rtas_call()
1854 * address is used to indicate end of dump processing in block_rtas_call()
1863 if (f->buf_idx2 != -1) { in block_rtas_call()
1864 base = be32_to_cpu(args->args[f->buf_idx2]); in block_rtas_call()
1865 if (f->size_idx2 != -1) in block_rtas_call()
1866 size = be32_to_cpu(args->args[f->size_idx2]); in block_rtas_call()
1867 else if (f->fixed_size) in block_rtas_call()
1868 size = f->fixed_size; in block_rtas_call()
1871 end = base + size - 1; in block_rtas_call()
1874 * Special case for ibm,configure-connector where the in block_rtas_call()
1886 pr_err_ratelimited("sys_rtas: RTAS call blocked - exploit attempt?\n"); in block_rtas_call()
1887 pr_err_ratelimited("sys_rtas: %s nargs=%d (called by %s)\n", in block_rtas_call()
1888 func->name, nargs, current->comm); in block_rtas_call()
1893 SYSCALL_DEFINE1(rtas, struct rtas_args __user *, uargs) in SYSCALL_DEFINE1() argument
1903 return -EPERM; in SYSCALL_DEFINE1()
1905 if (!rtas.entry) in SYSCALL_DEFINE1()
1906 return -EINVAL; in SYSCALL_DEFINE1()
1909 return -EFAULT; in SYSCALL_DEFINE1()
1918 return -EINVAL; in SYSCALL_DEFINE1()
1921 nret = array_index_nospec(nret, ARRAY_SIZE(args.args) - nargs); in SYSCALL_DEFINE1()
1924 if (copy_from_user(args.args, uargs->args, in SYSCALL_DEFINE1()
1926 return -EFAULT; in SYSCALL_DEFINE1()
1934 return -EINVAL; in SYSCALL_DEFINE1()
1940 return -EINVAL; in SYSCALL_DEFINE1()
1961 if (rc == -EAGAIN) in SYSCALL_DEFINE1()
1963 else if (rc == -EIO) in SYSCALL_DEFINE1()
1964 args.rets[0] = cpu_to_be32(-1); in SYSCALL_DEFINE1()
1974 * acquire it to avoid interleaving with any kernel-based uses in SYSCALL_DEFINE1()
1975 * of the same function. Kernel-based sequences acquire the in SYSCALL_DEFINE1()
1978 if (func->lock) in SYSCALL_DEFINE1()
1979 mutex_lock(func->lock); in SYSCALL_DEFINE1()
1988 /* A -1 return code indicates that the last command couldn't in SYSCALL_DEFINE1()
1990 if (be32_to_cpu(args.rets[0]) == -1) in SYSCALL_DEFINE1()
1996 if (func->lock) in SYSCALL_DEFINE1()
1997 mutex_unlock(func->lock); in SYSCALL_DEFINE1()
2007 if (copy_to_user(uargs->args + nargs, in SYSCALL_DEFINE1()
2010 return -EFAULT; in SYSCALL_DEFINE1()
2024 curr->token = RTAS_UNKNOWN_SERVICE; in rtas_function_table_init()
2032 prior = &rtas_function_table[i - 1]; in rtas_function_table_init()
2034 cmp = strcmp(prior->name, curr->name); in rtas_function_table_init()
2040 curr->name); in rtas_function_table_init()
2043 prior->name, curr->name); in rtas_function_table_init()
2047 for_each_property_of_node(rtas.dev, prop) { in rtas_function_table_init()
2050 if (prop->length != sizeof(u32)) in rtas_function_table_init()
2053 func = __rtas_name_to_function(prop->name); in rtas_function_table_init()
2057 func->token = be32_to_cpup((__be32 *)prop->value); in rtas_function_table_init()
2059 pr_debug("function %s has token %u\n", func->name, func->token); in rtas_function_table_init()
2064 * Call early during boot, before mem init, to retrieve the RTAS
2065 * information from the device-tree and allocate the RMO buffer for userland
2074 /* Get RTAS dev node and fill up our "rtas" structure with infos in rtas_initialize()
2077 rtas.dev = of_find_node_by_name(NULL, "rtas"); in rtas_initialize()
2078 if (!rtas.dev) in rtas_initialize()
2081 no_base = of_property_read_u32(rtas.dev, "linux,rtas-base", &base); in rtas_initialize()
2082 no_size = of_property_read_u32(rtas.dev, "rtas-size", &size); in rtas_initialize()
2084 of_node_put(rtas.dev); in rtas_initialize()
2085 rtas.dev = NULL; in rtas_initialize()
2089 rtas.base = base; in rtas_initialize()
2090 rtas.size = size; in rtas_initialize()
2091 no_entry = of_property_read_u32(rtas.dev, "linux,rtas-entry", &entry); in rtas_initialize()
2092 rtas.entry = no_entry ? rtas.base : entry; in rtas_initialize()
2103 ibm_extended_os_term = of_property_read_bool(rtas.dev, "ibm,extended-os-term"); in rtas_initialize()
2105 /* If RTAS was found, allocate the RMO buffer for it and look for in rtas_initialize()
2106 * the stop-self token if any in rtas_initialize()
2115 panic("ERROR: RTAS: Failed to allocate %lx bytes below %pa\n", in rtas_initialize()
2126 if (depth != 1 || strcmp(uname, "rtas") != 0) in early_init_dt_scan_rtas()
2129 basep = of_get_flat_dt_prop(node, "linux,rtas-base", NULL); in early_init_dt_scan_rtas()
2130 entryp = of_get_flat_dt_prop(node, "linux,rtas-entry", NULL); in early_init_dt_scan_rtas()
2131 sizep = of_get_flat_dt_prop(node, "rtas-size", NULL); in early_init_dt_scan_rtas()
2135 if (of_get_flat_dt_prop(node, "ibm,hypertas-functions", NULL)) in early_init_dt_scan_rtas()
2140 rtas.base = *basep; in early_init_dt_scan_rtas()
2141 rtas.entry = *entryp; in early_init_dt_scan_rtas()
2142 rtas.size = *sizep; in early_init_dt_scan_rtas()
2146 basep = of_get_flat_dt_prop(node, "put-term-char", NULL); in early_init_dt_scan_rtas()
2150 basep = of_get_flat_dt_prop(node, "get-term-char", NULL); in early_init_dt_scan_rtas()