rtas.c 16 KB

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