aboutsummaryrefslogtreecommitdiffstats
path: root/roms/skiboot/doc/opal-api/opal-test-0.rst
blob: 107f5ce72a45b366e64c7b0a63f2b1d1d10f0d00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
.. _OPAL_TEST:

OPAL_TEST
=========

:ref:`OPAL_TEST` is a REQUIRED call for OPAL and conforming implementations MUST
have it.

It is designed to test basic OPAL call functionality.

Token:

.. code-block:: c

  #define OPAL_TEST				0

Arguments
---------
::

   uint64_t	arg

Returns
-------
::

	0xfeedf00d


Function
--------
:ref:`OPAL_TEST` MAY print a string to the OPAL log with the value of argument.

For example, the reference implementation (skiboot) implements :ref:`OPAL_TEST` as:

.. code-block:: c

  static uint64_t opal_test_func(uint64_t arg)
  {
        printf("OPAL: Test function called with arg 0x%llx\n", arg);

        return 0xfeedf00d;
  }