rtas.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697
  1. /*
  2. *
  3. * Procedures for interfacing to the RTAS on CHRP machines.
  4. *
  5. * Peter Bergner, IBM March 2001.
  6. * Copyright (C) 2001 IBM.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License
  10. * as published by the Free Software Foundation; either version
  11. * 2 of the License, or (at your option) any later version.
  12. */
  13. #include <stdarg.h>
  14. #include <linux/kernel.h>
  15. #include <linux/types.h>
  16. #include <linux/spinlock.h>
  17. #include <linux/module.h>
  18. #include <linux/init.h>
  19. #include <asm/prom.h>
  20. #include <asm/rtas.h>
  21. #include <asm/semaphore.h>
  22. #include <asm/machdep.h>
  23. #include <asm/page.h>
  24. #include <asm/param.h>
  25. #include <asm/system.h>
  26. #include <asm/delay.h>
  27. #include <asm/uaccess.h>
  28. #include <asm/lmb.h>
  29. #ifdef CONFIG_PPC64
  30. #include <asm/systemcfg.h>
  31. #endif
  32. struct rtas_t rtas = {
  33. .lock = SPIN_LOCK_UNLOCKED
  34. };
  35. EXPORT_SYMBOL(rtas);
  36. DEFINE_SPINLOCK(rtas_data_buf_lock);
  37. char rtas_data_buf[RTAS_DATA_BUF_SIZE] __cacheline_aligned;
  38. unsigned long rtas_rmo_buf;
  39. /*
  40. * If non-NULL, this gets called when the kernel terminates.
  41. * This is done like this so rtas_flash can be a module.
  42. */
  43. void (*rtas_flash_term_hook)(int);
  44. EXPORT_SYMBOL(rtas_flash_term_hook);
  45. /*
  46. * call_rtas_display_status and call_rtas_display_status_delay
  47. * are designed only for very early low-level debugging, which
  48. * is why the token is hard-coded to 10.
  49. */
  50. void call_rtas_display_status(unsigned char c)
  51. {
  52. struct rtas_args *args = &rtas.args;
  53. unsigned long s;
  54. if (!rtas.base)
  55. return;
  56. spin_lock_irqsave(&rtas.lock, s);
  57. args->token = 10;
  58. args->nargs = 1;
  59. args->nret = 1;
  60. args->rets = (rtas_arg_t *)&(args->args[1]);
  61. args->args[0] = (int)c;
  62. enter_rtas(__pa(args));
  63. spin_unlock_irqrestore(&rtas.lock, s);
  64. }
  65. void call_rtas_display_status_delay(unsigned char c)
  66. {
  67. static int pending_newline = 0; /* did last write end with unprinted newline? */
  68. static int width = 16;
  69. if (c == '\n') {
  70. while (width-- > 0)
  71. call_rtas_display_status(' ');
  72. width = 16;
  73. udelay(500000);
  74. pending_newline = 1;
  75. } else {
  76. if (pending_newline) {
  77. call_rtas_display_status('\r');
  78. call_rtas_display_status('\n');
  79. }
  80. pending_newline = 0;
  81. if (width--) {
  82. call_rtas_display_status(c);
  83. udelay(10000);
  84. }
  85. }
  86. }
  87. void rtas_progress(char *s, unsigned short hex)
  88. {
  89. struct device_node *root;
  90. int width, *p;
  91. char *os;
  92. static int display_character, set_indicator;
  93. static int display_width, display_lines, *row_width, form_feed;
  94. static DEFINE_SPINLOCK(progress_lock);
  95. static int current_line;
  96. static int pending_newline = 0; /* did last write end with unprinted newline? */
  97. if (!rtas.base)
  98. return;
  99. if (display_width == 0) {
  100. display_width = 0x10;
  101. if ((root = find_path_device("/rtas"))) {
  102. if ((p = (unsigned int *)get_property(root,
  103. "ibm,display-line-length", NULL)))
  104. display_width = *p;
  105. if ((p = (unsigned int *)get_property(root,
  106. "ibm,form-feed", NULL)))
  107. form_feed = *p;
  108. if ((p = (unsigned int *)get_property(root,
  109. "ibm,display-number-of-lines", NULL)))
  110. display_lines = *p;
  111. row_width = (unsigned int *)get_property(root,
  112. "ibm,display-truncation-length", NULL);
  113. }
  114. display_character = rtas_token("display-character");
  115. set_indicator = rtas_token("set-indicator");
  116. }
  117. if (display_character == RTAS_UNKNOWN_SERVICE) {
  118. /* use hex display if available */
  119. if (set_indicator != RTAS_UNKNOWN_SERVICE)
  120. rtas_call(set_indicator, 3, 1, NULL, 6, 0, hex);
  121. return;
  122. }
  123. spin_lock(&progress_lock);
  124. /*
  125. * Last write ended with newline, but we didn't print it since
  126. * it would just clear the bottom line of output. Print it now
  127. * instead.
  128. *
  129. * If no newline is pending and form feed is supported, clear the
  130. * display with a form feed; otherwise, print a CR to start output
  131. * at the beginning of the line.
  132. */
  133. if (pending_newline) {
  134. rtas_call(display_character, 1, 1, NULL, '\r');
  135. rtas_call(display_character, 1, 1, NULL, '\n');
  136. pending_newline = 0;
  137. } else {
  138. current_line = 0;
  139. if (form_feed)
  140. rtas_call(display_character, 1, 1, NULL,
  141. (char)form_feed);
  142. else
  143. rtas_call(display_character, 1, 1, NULL, '\r');
  144. }
  145. if (row_width)
  146. width = row_width[current_line];
  147. else
  148. width = display_width;
  149. os = s;
  150. while (*os) {
  151. if (*os == '\n' || *os == '\r') {
  152. /* If newline is the last character, save it
  153. * until next call to avoid bumping up the
  154. * display output.
  155. */
  156. if (*os == '\n' && !os[1]) {
  157. pending_newline = 1;
  158. current_line++;
  159. if (current_line > display_lines-1)
  160. current_line = display_lines-1;
  161. spin_unlock(&progress_lock);
  162. return;
  163. }
  164. /* RTAS wants CR-LF, not just LF */
  165. if (*os == '\n') {
  166. rtas_call(display_character, 1, 1, NULL, '\r');
  167. rtas_call(display_character, 1, 1, NULL, '\n');
  168. } else {
  169. /* CR might be used to re-draw a line, so we'll
  170. * leave it alone and not add LF.
  171. */
  172. rtas_call(display_character, 1, 1, NULL, *os);
  173. }
  174. if (row_width)
  175. width = row_width[current_line];
  176. else
  177. width = display_width;
  178. } else {
  179. width--;
  180. rtas_call(display_character, 1, 1, NULL, *os);
  181. }
  182. os++;
  183. /* if we overwrite the screen length */
  184. if (width <= 0)
  185. while ((*os != 0) && (*os != '\n') && (*os != '\r'))
  186. os++;
  187. }
  188. spin_unlock(&progress_lock);
  189. }
  190. EXPORT_SYMBOL(rtas_progress); /* needed by rtas_flash module */
  191. int rtas_token(const char *service)
  192. {
  193. int *tokp;
  194. if (rtas.dev == NULL)
  195. return RTAS_UNKNOWN_SERVICE;
  196. tokp = (int *) get_property(rtas.dev, service, NULL);
  197. return tokp ? *tokp : RTAS_UNKNOWN_SERVICE;
  198. }
  199. #ifdef CONFIG_RTAS_ERROR_LOGGING
  200. /*
  201. * Return the firmware-specified size of the error log buffer
  202. * for all rtas calls that require an error buffer argument.
  203. * This includes 'check-exception' and 'rtas-last-error'.
  204. */
  205. int rtas_get_error_log_max(void)
  206. {
  207. static int rtas_error_log_max;
  208. if (rtas_error_log_max)
  209. return rtas_error_log_max;
  210. rtas_error_log_max = rtas_token ("rtas-error-log-max");
  211. if ((rtas_error_log_max == RTAS_UNKNOWN_SERVICE) ||
  212. (rtas_error_log_max > RTAS_ERROR_LOG_MAX)) {
  213. printk (KERN_WARNING "RTAS: bad log buffer size %d\n",
  214. rtas_error_log_max);
  215. rtas_error_log_max = RTAS_ERROR_LOG_MAX;
  216. }
  217. return rtas_error_log_max;
  218. }
  219. EXPORT_SYMBOL(rtas_get_error_log_max);
  220. char rtas_err_buf[RTAS_ERROR_LOG_MAX];
  221. int rtas_last_error_token;
  222. /** Return a copy of the detailed error text associated with the
  223. * most recent failed call to rtas. Because the error text
  224. * might go stale if there are any other intervening rtas calls,
  225. * this routine must be called atomically with whatever produced
  226. * the error (i.e. with rtas.lock still held from the previous call).
  227. */
  228. static char *__fetch_rtas_last_error(char *altbuf)
  229. {
  230. struct rtas_args err_args, save_args;
  231. u32 bufsz;
  232. char *buf = NULL;
  233. if (rtas_last_error_token == -1)
  234. return NULL;
  235. bufsz = rtas_get_error_log_max();
  236. err_args.token = rtas_last_error_token;
  237. err_args.nargs = 2;
  238. err_args.nret = 1;
  239. err_args.args[0] = (rtas_arg_t)__pa(rtas_err_buf);
  240. err_args.args[1] = bufsz;
  241. err_args.args[2] = 0;
  242. save_args = rtas.args;
  243. rtas.args = err_args;
  244. enter_rtas(__pa(&rtas.args));
  245. err_args = rtas.args;
  246. rtas.args = save_args;
  247. /* Log the error in the unlikely case that there was one. */
  248. if (unlikely(err_args.args[2] == 0)) {
  249. if (altbuf) {
  250. buf = altbuf;
  251. } else {
  252. buf = rtas_err_buf;
  253. if (mem_init_done)
  254. buf = kmalloc(RTAS_ERROR_LOG_MAX, GFP_ATOMIC);
  255. }
  256. if (buf)
  257. memcpy(buf, rtas_err_buf, RTAS_ERROR_LOG_MAX);
  258. }
  259. return buf;
  260. }
  261. #define get_errorlog_buffer() kmalloc(RTAS_ERROR_LOG_MAX, GFP_KERNEL)
  262. #else /* CONFIG_RTAS_ERROR_LOGGING */
  263. #define __fetch_rtas_last_error(x) NULL
  264. #define get_errorlog_buffer() NULL
  265. #endif
  266. int rtas_call(int token, int nargs, int nret, int *outputs, ...)
  267. {
  268. va_list list;
  269. int i;
  270. unsigned long s;
  271. struct rtas_args *rtas_args;
  272. char *buff_copy = NULL;
  273. int ret;
  274. if (token == RTAS_UNKNOWN_SERVICE)
  275. return -1;
  276. /* Gotta do something different here, use global lock for now... */
  277. spin_lock_irqsave(&rtas.lock, s);
  278. rtas_args = &rtas.args;
  279. rtas_args->token = token;
  280. rtas_args->nargs = nargs;
  281. rtas_args->nret = nret;
  282. rtas_args->rets = (rtas_arg_t *)&(rtas_args->args[nargs]);
  283. va_start(list, outputs);
  284. for (i = 0; i < nargs; ++i)
  285. rtas_args->args[i] = va_arg(list, rtas_arg_t);
  286. va_end(list);
  287. for (i = 0; i < nret; ++i)
  288. rtas_args->rets[i] = 0;
  289. enter_rtas(__pa(rtas_args));
  290. /* A -1 return code indicates that the last command couldn't
  291. be completed due to a hardware error. */
  292. if (rtas_args->rets[0] == -1)
  293. buff_copy = __fetch_rtas_last_error(NULL);
  294. if (nret > 1 && outputs != NULL)
  295. for (i = 0; i < nret-1; ++i)
  296. outputs[i] = rtas_args->rets[i+1];
  297. ret = (nret > 0)? rtas_args->rets[0]: 0;
  298. /* Gotta do something different here, use global lock for now... */
  299. spin_unlock_irqrestore(&rtas.lock, s);
  300. if (buff_copy) {
  301. log_error(buff_copy, ERR_TYPE_RTAS_LOG, 0);
  302. if (mem_init_done)
  303. kfree(buff_copy);
  304. }
  305. return ret;
  306. }
  307. /* Given an RTAS status code of 990n compute the hinted delay of 10^n
  308. * (last digit) milliseconds. For now we bound at n=5 (100 sec).
  309. */
  310. unsigned int rtas_extended_busy_delay_time(int status)
  311. {
  312. int order = status - 9900;
  313. unsigned long ms;
  314. if (order < 0)
  315. order = 0; /* RTC depends on this for -2 clock busy */
  316. else if (order > 5)
  317. order = 5; /* bound */
  318. /* Use microseconds for reasonable accuracy */
  319. for (ms = 1; order > 0; order--)
  320. ms *= 10;
  321. return ms;
  322. }
  323. int rtas_error_rc(int rtas_rc)
  324. {
  325. int rc;
  326. switch (rtas_rc) {
  327. case -1: /* Hardware Error */
  328. rc = -EIO;
  329. break;
  330. case -3: /* Bad indicator/domain/etc */
  331. rc = -EINVAL;
  332. break;
  333. case -9000: /* Isolation error */
  334. rc = -EFAULT;
  335. break;
  336. case -9001: /* Outstanding TCE/PTE */
  337. rc = -EEXIST;
  338. break;
  339. case -9002: /* No usable slot */
  340. rc = -ENODEV;
  341. break;
  342. default:
  343. printk(KERN_ERR "%s: unexpected RTAS error %d\n",
  344. __FUNCTION__, rtas_rc);
  345. rc = -ERANGE;
  346. break;
  347. }
  348. return rc;
  349. }
  350. int rtas_get_power_level(int powerdomain, int *level)
  351. {
  352. int token = rtas_token("get-power-level");
  353. int rc;
  354. if (token == RTAS_UNKNOWN_SERVICE)
  355. return -ENOENT;
  356. while ((rc = rtas_call(token, 1, 2, level, powerdomain)) == RTAS_BUSY)
  357. udelay(1);
  358. if (rc < 0)
  359. return rtas_error_rc(rc);
  360. return rc;
  361. }
  362. int rtas_set_power_level(int powerdomain, int level, int *setlevel)
  363. {
  364. int token = rtas_token("set-power-level");
  365. unsigned int wait_time;
  366. int rc;
  367. if (token == RTAS_UNKNOWN_SERVICE)
  368. return -ENOENT;
  369. while (1) {
  370. rc = rtas_call(token, 2, 2, setlevel, powerdomain, level);
  371. if (rc == RTAS_BUSY)
  372. udelay(1);
  373. else if (rtas_is_extended_busy(rc)) {
  374. wait_time = rtas_extended_busy_delay_time(rc);
  375. udelay(wait_time * 1000);
  376. } else
  377. break;
  378. }
  379. if (rc < 0)
  380. return rtas_error_rc(rc);
  381. return rc;
  382. }
  383. int rtas_get_sensor(int sensor, int index, int *state)
  384. {
  385. int token = rtas_token("get-sensor-state");
  386. unsigned int wait_time;
  387. int rc;
  388. if (token == RTAS_UNKNOWN_SERVICE)
  389. return -ENOENT;
  390. while (1) {
  391. rc = rtas_call(token, 2, 2, state, sensor, index);
  392. if (rc == RTAS_BUSY)
  393. udelay(1);
  394. else if (rtas_is_extended_busy(rc)) {
  395. wait_time = rtas_extended_busy_delay_time(rc);
  396. udelay(wait_time * 1000);
  397. } else
  398. break;
  399. }
  400. if (rc < 0)
  401. return rtas_error_rc(rc);
  402. return rc;
  403. }
  404. int rtas_set_indicator(int indicator, int index, int new_value)
  405. {
  406. int token = rtas_token("set-indicator");
  407. unsigned int wait_time;
  408. int rc;
  409. if (token == RTAS_UNKNOWN_SERVICE)
  410. return -ENOENT;
  411. while (1) {
  412. rc = rtas_call(token, 3, 1, NULL, indicator, index, new_value);
  413. if (rc == RTAS_BUSY)
  414. udelay(1);
  415. else if (rtas_is_extended_busy(rc)) {
  416. wait_time = rtas_extended_busy_delay_time(rc);
  417. udelay(wait_time * 1000);
  418. }
  419. else
  420. break;
  421. }
  422. if (rc < 0)
  423. return rtas_error_rc(rc);
  424. return rc;
  425. }
  426. void rtas_restart(char *cmd)
  427. {
  428. if (rtas_flash_term_hook)
  429. rtas_flash_term_hook(SYS_RESTART);
  430. printk("RTAS system-reboot returned %d\n",
  431. rtas_call(rtas_token("system-reboot"), 0, 1, NULL));
  432. for (;;);
  433. }
  434. void rtas_power_off(void)
  435. {
  436. if (rtas_flash_term_hook)
  437. rtas_flash_term_hook(SYS_POWER_OFF);
  438. /* allow power on only with power button press */
  439. printk("RTAS power-off returned %d\n",
  440. rtas_call(rtas_token("power-off"), 2, 1, NULL, -1, -1));
  441. for (;;);
  442. }
  443. void rtas_halt(void)
  444. {
  445. if (rtas_flash_term_hook)
  446. rtas_flash_term_hook(SYS_HALT);
  447. /* allow power on only with power button press */
  448. printk("RTAS power-off returned %d\n",
  449. rtas_call(rtas_token("power-off"), 2, 1, NULL, -1, -1));
  450. for (;;);
  451. }
  452. /* Must be in the RMO region, so we place it here */
  453. static char rtas_os_term_buf[2048];
  454. void rtas_os_term(char *str)
  455. {
  456. int status;
  457. if (RTAS_UNKNOWN_SERVICE == rtas_token("ibm,os-term"))
  458. return;
  459. snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str);
  460. do {
  461. status = rtas_call(rtas_token("ibm,os-term"), 1, 1, NULL,
  462. __pa(rtas_os_term_buf));
  463. if (status == RTAS_BUSY)
  464. udelay(1);
  465. else if (status != 0)
  466. printk(KERN_EMERG "ibm,os-term call failed %d\n",
  467. status);
  468. } while (status == RTAS_BUSY);
  469. }
  470. asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
  471. {
  472. struct rtas_args args;
  473. unsigned long flags;
  474. char *buff_copy, *errbuf = NULL;
  475. int nargs;
  476. if (!capable(CAP_SYS_ADMIN))
  477. return -EPERM;
  478. if (copy_from_user(&args, uargs, 3 * sizeof(u32)) != 0)
  479. return -EFAULT;
  480. nargs = args.nargs;
  481. if (nargs > ARRAY_SIZE(args.args)
  482. || args.nret > ARRAY_SIZE(args.args)
  483. || nargs + args.nret > ARRAY_SIZE(args.args))
  484. return -EINVAL;
  485. /* Copy in args. */
  486. if (copy_from_user(args.args, uargs->args,
  487. nargs * sizeof(rtas_arg_t)) != 0)
  488. return -EFAULT;
  489. buff_copy = get_errorlog_buffer();
  490. spin_lock_irqsave(&rtas.lock, flags);
  491. rtas.args = args;
  492. enter_rtas(__pa(&rtas.args));
  493. args = rtas.args;
  494. args.rets = &args.args[nargs];
  495. /* A -1 return code indicates that the last command couldn't
  496. be completed due to a hardware error. */
  497. if (args.rets[0] == -1)
  498. errbuf = __fetch_rtas_last_error(buff_copy);
  499. spin_unlock_irqrestore(&rtas.lock, flags);
  500. if (buff_copy) {
  501. if (errbuf)
  502. log_error(errbuf, ERR_TYPE_RTAS_LOG, 0);
  503. kfree(buff_copy);
  504. }
  505. /* Copy out args. */
  506. if (copy_to_user(uargs->args + nargs,
  507. args.args + nargs,
  508. args.nret * sizeof(rtas_arg_t)) != 0)
  509. return -EFAULT;
  510. return 0;
  511. }
  512. #ifdef CONFIG_SMP
  513. /* This version can't take the spinlock, because it never returns */
  514. struct rtas_args rtas_stop_self_args = {
  515. /* The token is initialized for real in setup_system() */
  516. .token = RTAS_UNKNOWN_SERVICE,
  517. .nargs = 0,
  518. .nret = 1,
  519. .rets = &rtas_stop_self_args.args[0],
  520. };
  521. void rtas_stop_self(void)
  522. {
  523. struct rtas_args *rtas_args = &rtas_stop_self_args;
  524. local_irq_disable();
  525. BUG_ON(rtas_args->token == RTAS_UNKNOWN_SERVICE);
  526. printk("cpu %u (hwid %u) Ready to die...\n",
  527. smp_processor_id(), hard_smp_processor_id());
  528. enter_rtas(__pa(rtas_args));
  529. panic("Alas, I survived.\n");
  530. }
  531. #endif
  532. /*
  533. * Call early during boot, before mem init or bootmem, to retreive the RTAS
  534. * informations from the device-tree and allocate the RMO buffer for userland
  535. * accesses.
  536. */
  537. void __init rtas_initialize(void)
  538. {
  539. unsigned long rtas_region = RTAS_INSTANTIATE_MAX;
  540. /* Get RTAS dev node and fill up our "rtas" structure with infos
  541. * about it.
  542. */
  543. rtas.dev = of_find_node_by_name(NULL, "rtas");
  544. if (rtas.dev) {
  545. u32 *basep, *entryp;
  546. u32 *sizep;
  547. basep = (u32 *)get_property(rtas.dev, "linux,rtas-base", NULL);
  548. sizep = (u32 *)get_property(rtas.dev, "rtas-size", NULL);
  549. if (basep != NULL && sizep != NULL) {
  550. rtas.base = *basep;
  551. rtas.size = *sizep;
  552. entryp = (u32 *)get_property(rtas.dev, "linux,rtas-entry", NULL);
  553. if (entryp == NULL) /* Ugh */
  554. rtas.entry = rtas.base;
  555. else
  556. rtas.entry = *entryp;
  557. } else
  558. rtas.dev = NULL;
  559. }
  560. if (!rtas.dev)
  561. return;
  562. /* If RTAS was found, allocate the RMO buffer for it and look for
  563. * the stop-self token if any
  564. */
  565. #ifdef CONFIG_PPC64
  566. if (systemcfg->platform == PLATFORM_PSERIES_LPAR)
  567. rtas_region = min(lmb.rmo_size, RTAS_INSTANTIATE_MAX);
  568. #endif
  569. rtas_rmo_buf = lmb_alloc_base(RTAS_RMOBUF_MAX, PAGE_SIZE, rtas_region);
  570. #ifdef CONFIG_HOTPLUG_CPU
  571. rtas_stop_self_args.token = rtas_token("stop-self");
  572. #endif /* CONFIG_HOTPLUG_CPU */
  573. #ifdef CONFIG_RTAS_ERROR_LOGGING
  574. rtas_last_error_token = rtas_token("rtas-last-error");
  575. #endif
  576. }
  577. EXPORT_SYMBOL(rtas_token);
  578. EXPORT_SYMBOL(rtas_call);
  579. EXPORT_SYMBOL(rtas_data_buf);
  580. EXPORT_SYMBOL(rtas_data_buf_lock);
  581. EXPORT_SYMBOL(rtas_extended_busy_delay_time);
  582. EXPORT_SYMBOL(rtas_get_sensor);
  583. EXPORT_SYMBOL(rtas_get_power_level);
  584. EXPORT_SYMBOL(rtas_set_power_level);
  585. EXPORT_SYMBOL(rtas_set_indicator);