Changelog for librtas-2.0.6
=======================================
commit 238bf041152b78aa0d9dce813d360ea0731c128c
Author: Tyrel Datwyler <tyreld@linux.ibm.com>
Date:   Wed Feb 7 17:12:44 2024 -0600

    librtas: return CALL_AGAIN on RC_BUSY status in handle_delay()
    
    There is no need to delay before retrying on RC_BUSY return status. The
    kernel used to get this wrong too.
    
    https://github.com/torvalds/linux/commit/38f7b7067dae0c101be573106018e8af22a90fdf
    
    Excerpt referenced from above commit:
    
    RTAS_BUSY (-2): RTAS has suspended a potentially long-running operation in
    order to meet its latency obligation and give the OS the opportunity to
    perform other work. RTAS can resume making progress as soon as the OS
    reattempts the call.
    
    To avoid uselessly sleeping update handle_delay() to return CALL_AGAIN
    immediately when it is passed RC_BUSY.
    
    Suggested-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit d4348be098c7dc9b2ed313e51daee30246601e8d
Author: Tyrel Datwyler <tyreld@linux.ibm.com>
Date:   Wed Feb 7 17:09:03 2024 -0600

    librtas: use CALL_AGAIN for delay related return in handle_delay()
    
    The delay related return value of handle_delay() is hard coded. For
    clarity use CALL_AGAIN macro which is documented return value in the
    function comment header.
    
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit e7eff65e74ebe268a184d53d5fe94ebff5f7b4eb
Author: Tyrel Datwyler <tyreld@linux.ibm.com>
Date:   Wed Feb 7 14:13:30 2024 -0800

    librtas: deprecate rtas_delay_timeout()
    
    Despite its description rtas_delay_timeout() sets an internal timeout
    value as opposed to returning the delay time as documented. This timeout
    short cuts the logic in handle_delay(). Fortunately this is unsed by
    default. The library should run operations to completion, otherwise we
    risk leaving things in an unrecoverable state.
    
    Mark rtas_delay_timeout() with __attribute__ ((deprecated)) as
    preperation for eventual removal.
    
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit b8d34050883008a92bad84ae707de7c1b96119a8
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Feb 7 15:20:24 2024 -0600

    librtas: sync papr-sysparm.h with kernel
    
    The data member is __u8 as of 8ded03ae48b3
    ("powerpc/pseries/papr-sysparm: use u8 arrays for payloads").
    
    Verified that the object code in librtas_src/sysparm.o is unchanged by
    this.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit d8d4ee6f5052704ac82bb8aa8d8fe8816dac41cd
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Mon Sep 25 11:42:26 2023 -0500

    librtas/sysparm: prefer /dev/papr-sysparm when available
    
    Change rtas_get_sysparm() and rtas_set_sysparm() to prefer the
    /dev/papr-sysparm character device expected in Linux v6.8.
    
    On the first invocation of either function, probe for the new ABI and
    initialize internal function pointers according to the result. Use
    pthread_once() to ensure that this initialization step is performed
    atomically and only once.
    
    When /dev/papr-sysparm is available, use its PAPR_SYSPARM_IOC_GET and
    PAPR_SYSPARM_IOC_SET ioctl commands to retrieve and update system
    parameters. Most of the complexity of calling RTAS is handled
    internally to the kernel and the ioctl follows Linux conventions,
    returning 0 on success or -1 w/errno on failure. On failure,
    back-convert the errno to an RTAS status value that callers will
    recognize.
    
    For now, carry a copy of the kernel uapi header.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 57d5e1c07b40e56f6209e7b806208818464f8e8d
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Sat Aug 12 13:27:39 2023 -0500

    librtas/vpd: prefer /dev/papr-vpd when available
    
    Change rtas_get_vpd() to prefer the /dev/papr-vpd character device
    expected in Linux v6.8.
    
    On the first invocation of rtas_get_vpd(), probe for the new ABI and
    initialize an internal function pointer according to the result. Use
    pthread_once() to ensure that this probe step is performed atomically
    and only once. It would not make sense to re-probe (and potentially
    update the implementation) on every call, since the implementations
    differ in the way state for the call sequence is maintained.
    
    Assuming the new ABI is available: upon first call to rtas_get_vpd(),
    open /dev/papr-vpd and obtain a file descriptor using the
    PAPR_VPD_CREATE_HANDLE ioctl() command. This file descriptor is a
    reference to the VPD returned from a complete ibm,get-vpd call
    sequence. Subsequent calls sequentially read the VPD from the fd,
    which is closed once EOF is reached.
    
    To existing users of rtas_get_vpd(), the new implementation is
    indistinguishable from the old one, with one exception:
    
    * When using the rtas() syscall on current systems, RTAS advances the
      sequence number by a fixed interval on each call in a sequence. This
      is visible in the values returned in the 'seq_next' out parameter.
    
    * When using /dev/papr-vpd, the value returned in 'seq_next' does not
      change between calls; librtas treats it as a "handle" for a sequence
      in progress.
    
    In PAPR there is no meaning attached to the value returned in the
    'seq_next' out parameter, and there is no requirement that it must
    change or increment on each call. No user should be relying on the
    behavior of this aspect of the interface to judge the status of a
    sequence.
    
    I have verified that an unmodified vpdupdate command from a distro
    lsvpd package works correctly when linked to a librtas.so with this
    change. This is the primary (and perhaps only) user of rtas_get_vpd().
    
    For now, carry a copy of the kernel uapi header.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit c914a1a701391c565203b10603ad0fbc52438bf7
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Mon Sep 25 11:41:22 2023 -0500

    librtas: vendor papr-miscdev.h
    
    This is a common header used by other kernel uapi headers that we will
    copy into the source tree.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit c47176a5f1ce7bb16ba02b8c8520e02b285d7e9f
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Mon Sep 25 11:32:33 2023 -0500

    librtas: move system parameter code to separate module
    
    This code will gain the ability to access system parameters using a
    different interface exposed by newer kernels. This will involve adding
    a nontrivial amount of code, so move it out of syscall_calls.c.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit ee06898b1e7807a6e201b281ffc8ee3fa96136f4
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Sat Aug 12 12:44:38 2023 -0500

    librtas: move VPD code into separate module
    
    This code will gain the ability to retrieve VPD using a different
    interface exposed by newer kernels. This will be a lot of additional
    code, so move it out of syscall_calls.c.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 569da8e5f0d5009694dc2def350cb9cd2c1d81a6
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Sat Aug 12 12:41:36 2023 -0500

    librtas: expose low-level RTAS call APIs internally
    
    Make these functions available outside of syscall_calls.c, marking
    them hidden so that they aren't exposed in the library ABI.
    
    The implementations of librtas APIs will move into separate C files as
    they gain support for new interfaces offered by the kernel.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 0ca359b34221465dac6999ad957a41ac4f5edc92
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Mon Sep 25 21:11:59 2023 -0500

    tools: add activate-firmware-regress script
    
    Add a utility that can quickly validate a development build against
    the activate_firmware command from powerpc-utils, which exercises the
    rtas_get_sysparm() API. This is a high-level test that needs superuser
    priveleges to run, so it's not suitable for the development test
    suite. (Note that despite its name, the way we invoke the command does
    not alter any system or firmware configuration, it only queries a
    system parameter.)
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 4c44465e6d54acdd31ac28334441468375496e4f
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Thu Aug 10 13:31:10 2023 -0500

    tools: add vpdupdate-regress script
    
    Add a utility that can quickly validate a development build against
    vpdupdate, which exercises the rtas_get_vpd() API. This is a
    high-level test that needs superuser priveleges to run, so it's not
    suitable for the development test suite.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

Changelog for librtas-2.0.5
=======================================
commit 8aee694e8070be4f16db9d52556f1fd33421ed35
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Mon Oct 9 14:35:10 2023 -0700

    ci: update package index in qemu jobs
    
    Looks like this is necessary after all.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 0bba0c5282960cb8fbf57de72973a158ca7e1c53
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Mon Oct 9 14:35:09 2023 -0700

    librtas: fix buffer length determination in rtas_set_sysparm()
    
    The data passed by callers has this layout:
    
      struct {
          uint8_t len_msb;
          uint8_t len_lsb;
          char payload[];
      };
    
    I.e. the length of valid data in payload[] is stored in the first two
    bytes of the buffer. However, rtas_set_sysparm() wrongly assumes that
    the length is in host-endian, leading to miscalculation of allocation
    and copy sizes.
    
    For example, given this code in rtas_set_sysparm():
    
      int rtas_set_sysparm(unsigned int parameter, char *data) {
          ...
          size = *(short *)data;
          ...
          memcpy(kernbuf, data, size + sizeof(short));
          ...
      }
    
    on little-endian targets, the following code:
    
        struct {
            uint16_t len_be;
            char data[1024];
        } sp_block = {
            .len_be = htobe16(sizeof"hello"),
            .data = "hello",
        };
        rtas_set_sysparm(0, (char *)&sp_block);
    
    results in a copy of size ((6 << 8) + 2) = 1538, reading beyond the
    end of the passed object.
    
    Similarly, objects with an encoded size of 256 or greater will result
    in copying too little data.
    
    Extract the size from the buffer correctly, always treating it as
    big-endian.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 0a8a540e1fb8855febbfbc6d15ed494aa16c53d8
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Thu Aug 10 09:47:52 2023 -0500

    ci: switch Fedora registry locations
    
    I had thought registry.fedoraproject.org was preferable for their
    images, but with rawhide (not latest) pulls we're seeing:
    
    Trying to pull registry.fedoraproject.org/fedora:rawhide...
    Error: choosing an image from manifest list
    docker://registry.fedoraproject.org/fedora:rawhide: no image found in
    manifest list for architecture amd64, variant "", OS linux
    
    And it's happening for me locally too. Switch to docker.io.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 4b23104d5c91975d44ae1b13b94046b1eb0452d9
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Aug 9 19:04:47 2023 -0500

    new test: rtas_set_debug
    
    Ensure rtas_set_debug() returns 0 without altering errno for a range
    of reasonable values.  Anything other behavior would be an ABI break
    at this point.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 617bc187bc6543a6ece2031985aad52aa287e5e0
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Aug 9 16:26:19 2023 -0500

    librtas: revert unintended printf in rtas_get_vpd()
    
    Commit 629856c6f661 ("librtas: fix printf format signedness
    mismatches") inadvertently replaced a use of the dbg() macro in
    rtas_get_vpd() with a call to printf(). Revert that part of the
    commit, and add a necessary newline to the debug message.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit fac8fcf98695edcad2cd8f44b162c12393d96c6e
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Aug 9 13:29:07 2023 -0500

    ci: ensure -Werror in runner-native builds
    
    Commit 7874574f5026 ("ci: parameterize runner-native builds on
    cflags") inadvertently disabled -Werror for the runner-native builds
    since it uses build-with's --cflags option to override the default.
    
    Add -Werror to both cases in the matrix.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit ca4c1d20c4061352330bd653d373715220488552
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Mon Aug 7 13:23:42 2023 -0500

    ci: add cppcheck workflow
    
    Run cppcheck twice:
    
    * First with relatively narrow criteria that will fail the run when
      violated.
    
    * Next with a wider set of checks that is a superset of the
      first. This reports a variety of issues that may or may not be worth
      fixing, and will never fail the run.
    
    When a class of issues in the second set is fixed, the first cppcheck
    run should be ratcheted up to match. E.g. if all portability
    diagnostics are addressed, the 'portability' key should be added to
    the --enable=... argument of the first cppcheck invocation.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit b7c5f844aacf0d824c567d89e677c180f5043993
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Tue Aug 8 15:01:33 2023 -0500

    configure.ac: set default compile flags at configure time
    
    Define default compiler flags at configure time, using
    ax_append_compile_flags() from the Autoconf archive to apply only
    those supported by the selected compiler.
    
    At this point the project builds cleanly with recent Clang and GCC
    using -Wall and -Wextra. So far the only warning from -Wextra we need
    to suppress is -Wno-unused-parameter.
    
    Some warnings depend on higher optimization levels to work, and -O2 is
    commonly used by distros. Use -O2 as the default optimization level.
    
    Much of this code was written in the early 2000s, before C11, and has
    been relatively undisturbed since. For now, specify gnu99 for the C
    dialect instead of accepting the compiler default. I believe it should
    be relatively easy to update this though.
    
    Users and packagers are of course free to supplement or override these
    default flags using the conventional methods, e.g.:
    
      $ ./configure CFLAGS=-Werror # treat warnings as errors
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit f060d6b6fa6e9c94ad07d34690d37c8c76881a70
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Mon Aug 7 17:00:12 2023 -0500

    librtasevent: 'format' function attribute for printf-style functions
    
    Clang (but not GCC) says:
    
    librtasevent_src/print_rtas_event.c:146:61: error: format string is
    not a string literal [-Werror,-Wformat-nonliteral]
        offset += vsnprintf(buf + offset, sizeof(buf) - offset, fmt, ap);
                                                                ^~~
    librtasevent_src/print_rtas_event.c:314:52: error: format string is
    not a string literal [-Werror,-Wformat-nonliteral]
        tmpbuf_len = vsnprintf(tmpbuf, sizeof(tmpbuf), fmt, ap);
    
    Adding a 'format' function attribute to print_scn_title() and
    rtas_print() yields the following warnings:
    
    *** fixme ***
    
    Fix the fallout.
    
    Notably, this found longstanding bugs in print_re_post_scn(), which
    passes pointers where integers are specified by format strings. These
    sites have been fixed to print the contents of the structure fields
    they were intended to report.
    
    See discussion of -Wformat-nonliteral at
    https://clang.llvm.org/docs/AttributeReference.html#format
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 742ca68b2cb330a7252d6d8c936115d4687feed0
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Thu Aug 3 07:42:23 2023 -0500

    fix -Wsign-compare warnings
    
    librtas_src/syscall_calls.c:1381:33: error: comparison of integer
    expressions of different signedness: '__uint32_t' {aka 'unsigned int'}
    and 'int' [-Werror=sign-compare]
     1381 |         if (be32toh(resp_bytes) > *work_area_bytes) {
          |                                 ^
    
    librtas_src/syscall_rmo.c: In function 'get_phys_region':
    librtas_src/syscall_rmo.c:242:42: error: comparison of integer
    expressions of different signedness: 'int' and 'uint32_t' {aka
    'unsigned int'} [-Werror=sign-compare]
      242 |                 if ((i * WORK_AREA_SIZE) >= kregion->size)
          |                                          ^~
    
    librtas_src/syscall_rmo.c: In function 'release_phys_region':
    librtas_src/syscall_rmo.c:291:18: error: comparison of integer
    expressions of different signedness: 'uint64_t' {aka 'long unsigned
    int'} and 'int' [-Werror=sign-compare]
      291 |         if (bits != ((1 << n_pages) - 1)) {
          |                  ^~
    
    librtasevent_src/get_rtas_event.c: In function 'parse_rtas_event':
    librtasevent_src/get_rtas_event.c:411:26: error: comparison of integer
    expressions of different signedness: 'uint32_t' {aka 'unsigned int'}
    and 'int' [-Werror=sign-compare]
      411 |     if (re->event_length > buflen) {
          |                          ^
    
    librtasevent_src/rtas_srcfru.c: In function 'print_fru_mr_scn':
    librtasevent_src/rtas_srcfru.c:518:19: error: comparison of integer
    expressions of different signedness: 'int' and 'uint32_t' {aka
    'unsigned int'} [-Werror=sign-compare]
      518 |     for (i = 0; i < frumr_num_callouts(fru_mr); i++) {
          |                   ^
    
    This is a step toward enabling a more strict set of warnings by
    default.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 7129aa91e1899eddc5d2116f16e611ceae162b85
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Thu Aug 3 07:37:47 2023 -0500

    librtas: fix printf format signedness mismatches
    
    Fix all instances of signed/unsigned format mismatches with use of the
    dbg() macro, e.g.
    
    librtas_src/syscall_calls.c:1209:13: error: format '%d' expects
    argument of type 'int', but argument 2 has type 'unsigned int'
    [-Werror=format=]
     1209 |         dbg("(%d, %p) = %d\n", parameter, data, rc ? rc : status);
          |             ^~~~~~~~~~~~~~~~~  ~~~~~~~~~
          |                                |
          |                                unsigned int
    
    This is a step toward enabling a more strict set of warnings by
    default.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 58e24d71ea30e9507350f4ede10f99a1b77cad5d
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Aug 2 11:45:18 2023 -0500

    librtas: fix cppcheck uninitialized variable warning
    
    cppcheck (somewhat dubiously) warns:
    
    Checking librtas_src/syscall_rmo.c ...
    librtas_src/syscall_rmo.c:76:6: warning: Uninitialized variable: fd [uninitvar]
     if (fd < 0)
         ^
    librtas_src/syscall_rmo.c:69:16: note: Assuming condition is false
     for (i = 0; i < npaths; i++) {
    
    But it's easy enough to satisfy it by making npaths const. This makes
    the project "clean" for cppcheck's default behavior, without
    additional checks enabled.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit f463aa42278a3ce0b328dd75c45e337f1c7cbc72
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Mon Jul 17 13:45:09 2023 -0500

    tests: add simple link and rtld tests
    
    link_librtas: ensure we can link librtas and call a function in it.
    
    dlopen_librtas: ensure we can dlopen librtas.so and look up all API
    symbols.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit b62ecd42180d7ac7b32cac6a50802455850a857a
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Mon Jul 17 11:24:51 2023 -0500

    build system: add support for cmocka-based tests
    
    Add an --enable-tests switch to configure, which is off by
    default. When enabled, check for a recent version of
    cmocka (https://cmocka.org/) libraries to build tests with.
    
    It is intended that 'configure --enable-tests' without a suitable
    cmocka installation results in an error.
    
    For now, the set of tests is empty.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 2cb840af56da4e592fee3a5dfe7e6c26eb6640cd
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Jul 19 17:32:54 2023 -0500

    ci: parameterize runner-native builds on cflags
    
    Add a matrix dimension for compiler flags, allowing us to run+test
    with typical production flags as well as sanitizers. Just install the
    necessary sanitizer libraries unconditionally.
    
    Ideally we would run with sanitizers enabled in emulation, but
    combining sanitizers and qemu gave me no end of trouble. I have found
    various reports that sanitizers and user space qemu emulation on Linux
    are basically incompatible.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit eddc8a2bc74e2f215ecffa5b2fad1f2fdf8f23b4
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Jul 19 17:31:40 2023 -0500

    ci: skip distcheck in qemu runs
    
    I don't think it's too irresponsible to omit distcheck when running in
    emulation; the runner-native jobs exercise it fine. This substantially
    reduces overall CI runtime.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 9612f6ac0fda9af21cc81c65c3ae71b8ab23af64
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Jul 19 13:38:33 2023 -0500

    ci: disable unit tests for cross compiles
    
    So far 'make check' hasn't done anything; we haven't had any
    testcases. Changes to follow will add real testcases which we won't be
    able to easily build or execute when using these toolchains.
    
    We will get test coverage in the runner-native and qemu-based jobs.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 6626fd7e1b5e55050f861dc0914d8c59fcef7353
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Tue Jul 18 17:46:42 2023 -0500

    tools/build-with: various updates
    
    * Add pkgconf and cmocka package lists, for enabling tests.
    
    * Remove the created container by default. This can be overridden with
      the new '--keep' option.
    
    * Add --abi-check boolean option, removing the special case for
      Alpine. Defaults to true. Update the CI configuration to use this.
    
    * Build configure arguments outside of the here document, making them
      easier to manipulate.
    
    * Add --tests boolean option, which determines whether to run 'make
      check'. Defaults to true.
    
    * Add --distcheck boolean option, which determines whether to run
      'make distcheck'. Defaults to true.
    
    * Add --cflags option, which enables the user to control compiler
      flags for the build. This will allow us to flexibly experiment with
      things like sanitizers in CI.
    
    * Run 'make check' with VERBOSE=1, so failed test outputs are
      displayed.
    
    * Run autoreconf before entering the container, which allows us to use
      a read-only volume.
    
    * Use unprivileged user for build and test, which better matches
      typical local development practice.
    
    * Implement a workaround for LeakSanitizer internal errors seen only
      in CI. When using -fanitize=address, we consistently get spurious test
      failures due to some issue with the leak detection pass at the end of
      execution:
    
      [==========] tests: Running 1 test(s).
      [ RUN      ] call_rtas_set_debug
      [       OK ] call_rtas_set_debug
      [==========] tests: 1 test(s) run.
      [  PASSED  ] 1 test(s).
      ==2492==LeakSanitizer has encountered a fatal error.
      ==2492==HINT: For debugging, try setting environment variable
                    LSAN_OPTIONS=verbosity=1:log_threads=1
      ==2492==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
      FAIL tests/link_librtas (exit status: 1)
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 133ddcfba6ec8dc44867bcacb8360a096bf0f169
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed May 10 22:48:23 2023 -0500

    fixes for -Wstrict-prototypes
    
    We should always specify the argument list and types.
    
    librtas_src/librtas.h:55:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
       55 | int rtas_activate_firmware();
          | ^~~
    librtas_src/internal.h:50:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
       50 | int interface_exists();
          | ^~~
    librtas_src/syscall_calls.c:254:5: warning: function declaration isn't a prototype [-Wstrict-prototypes]
      254 | int rtas_activate_firmware()
          |     ^~~~~~~~~~~~~~~~~~~~~~
    librtas_src/syscall_rmo.c:309:12: warning: function declaration isn't a prototype [-Wstrict-prototypes]
      309 | static int init_workarea_config()
          |            ^~~~~~~~~~~~~~~~~~~~
    librtas_src/syscall_rmo.c:388:5: warning: function declaration isn't a prototype [-Wstrict-prototypes]
      388 | int interface_exists()
          |     ^~~~~~~~~~~~~~~~
    librtasevent_src/print_rtas_event.c:62:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
       62 | static int (*re_print_fns[])() = {
          | ^~~~~~
    
    The only thing noteworthy here is rtas_activate_firmware(), which is
    declared in a public header. But updating the declaration to
    rtas_activate_firmware(void), which matches the implementation and all
    known callers, should not pose any compatibility issues.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 753a2e01dbd2f9da7fcf45302e23d5f73312d522
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Tue Jan 17 13:14:29 2023 -0600

    librtas.h: drop extern from function declarations
    
    Reduce clutter in librtas.h by removing all the unnecessary
    extern's. No functional change.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit b97bdd69e0f1e70de95446ad6e4f6769f0e6f385
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Mon Apr 24 17:00:54 2023 -0500

    Makefile.am: separate library interface versions
    
    Since librtas and librtasevent can experience ABI-related changes
    independently, it only makes sense to manage their interface versions
    separately. This is consistent with libtool's guidance: the version
    tuple supplied to -version-info should be maintained independently of
    the package/release version.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 742bef09f06a3dd370de331796e06700f5b7a69c
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Fri Jun 23 11:34:36 2023 -0500

    ci: add "native" and QEMU-emulated jobs
    
    Add two more job categories to the workflow:
    
    - qemu-ppc64le-builds: Runs the build as ppc64le code on Fedora latest
      and rawhide, as well as on Alpine latest (which achieves musl-libc
      coverage). These seem to typically run between seven and twenty
      minutes.
    - native-builds: These run the build in Fedora latest and rawhide
      containers matching the machine architecture of the
      runner (presumably x86_64). These take roughly two minutes or
      less (rawhide seems consistently faster for some reason).
    
    GCC and Clang are used in both cases.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit ad56fe263f9f39ac4e1cee6501c4150d0476c316
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Fri Apr 28 17:33:36 2023 -0500

    ci: cross build matrix rework
    
    - Drop x86_64; we will get that coverage back in a change to come.
    - Use the "build-with" script, which enables us to expand coverage to
      each of Debian's stable, testing, and unstable tags.
    
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit c09d6589ee65d0bf1046d1c569abf9441b143cfe
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Mon Jul 3 11:50:55 2023 -0500

    ci: tidy workflow configuration
    
    Sort the workflow trigger list, dropping comments that duplicate what
    can be found easily in the GH Actions documentation.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit ad163aa18e28e3f5f6b304c5220c70634b09c920
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Fri Jun 30 14:36:42 2023 -0500

    add tools/build-with for container-based build and test
    
    This script runs a build (and any tests/checks) from scratch in a
    container. The user can specify:
    
    - The distro as well as any additional packages to install.
    - The compiler command (e.g. "clang" or "powerpc64le-linux-gnu-gcc").
    - Whether to run under QEMU user mode emulation. Currently, this may
      be the best option for running ppc64le code in GitHub Actions.
    
    Benefits:
    - Enables consistency between local development and CI.
    - Can build with a variety of distros and compilers, allowing us to
      easily construct build matrices and experiment quickly.
    - Allows for build and test in emulation, assuming user has performed
      the appropriate QEMU+binfmt setup.
    
    About half of the script is code generated by the argbash utility for
    handling command-line arguments:
    
    https://argbash.readthedocs.io/en/latest/
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit e645594877491abfe4b438b767531e519003e2c2
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Thu Apr 27 09:09:20 2023 -0500

    add build system support for ABI regression checks
    
    Add a custom abi-check Makefile target that uses the libabigail
    abidiff tool to check for ABI breakage.
    
    If an ABI definition for the target arch is not found, such as when
    building for x86, emit a message that clearly says the check has been
    skipped.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 6f97982fa04a76c5cf78cbc6aa5f937bb5e6d30b
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Thu Apr 27 08:35:08 2023 -0500

    add ABI definitions as of v2.0.4
    
    Generated against a v2.0.4 checkout using tools/generate-abi-defs.
    
    Note: these include many visible symbols that are clearly intended for
    internal use since they do not have declarations in the shipped
    headers: basically every symbol without "rtas" in the name. The
    question of whether these can be hidden in future releases is not
    addressed in this change.
    
    Future changes to the ABIs of librtas and librtasevent should be
    accompanied by updates to these definitions.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit d3a16ed45a1a2050b9e8df7b6e0442f8e6c4b69b
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Thu Apr 27 09:08:30 2023 -0500

    add tools/generate-abi-defs script for ABI maintenance
    
    This tool is invoked manually outside of the build system to generate
    ABI definitions using the libabigail project's abidw tool:
    
    https://sourceware.org/libabigail/manual/libabigail-overview.html
    
    ABI definitions are generated in a Debian stable/bookworm container
    for each of the PowerPC targets that the project has supported over
    its life.
    
    About half of the script is code generated by the argbash utility for
    handling command line arguments.
    
    https://argbash.readthedocs.io/en/latest/
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 83ff23b51e7e486286c552822140dcdd6cee9ffe
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Apr 19 15:11:25 2023 -0700

    convert PAGE_SIZE to WORK_AREA_SIZE
    
    By defining PAGE_SIZE, librtas.h risks conflicts with system
    headers. Substitute a new internal constant WORK_AREA_SIZE throughout
    the source tree, and update comments accordingly.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Fixes #7
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit b00bfc5402921b0872aaac6741b165dc14a8855d
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Apr 19 15:11:24 2023 -0700

    ensure non-powerpc builds do not attempt a real syscall
    
    While we allow non-powerpc builds for the sake of coverage, the fact
    that we force __NR_rtas to be defined means that such builds will
    generate calls to nonsensical system calls. For example, syscall 255
    is inotify_rm_watch on x86_64.
    
    We don't anticipate anyone actually running non-powerpc librtas builds
    to the point of attempting the rtas syscall, but it's best to ensure
    that the syscall() invocation here always fails in an easily
    understood way.
    
    * Drop the local definition of __NR_rtas.
    
    * When targeting powerpc, use SYS_rtas, which should always be
      defined.
    
    * When targeting other architectures, use an invalid syscall number to
      ensure ENOSYS at runtime.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 620efff512ec1a4bca9b49379e2b42094a22e74c
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Apr 19 15:11:23 2023 -0700

    drop obsolete _syscall() usage
    
    This method of invoking a system call without library support has been
    deprecated for years (decades?):
    
    https://man7.org/linux/man-pages/man2/_syscall.2.html
    
    It should be safe to drop this in favor of the syscall() facility
    implemented by glibc and musl.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit bbfe6453e68a692c0222be559e1243211a331048
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Apr 19 15:11:22 2023 -0700

    librtas: internal.h cleanups
    
    Remove trailing whitespace and unnecessary 'extern' for function
    declarations.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit e12a3bb2117a106cde2dbe9a1819f9eacf3cb2b1
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Apr 19 15:11:21 2023 -0700

    avoid reserved names for inclusion guards in internal header
    
    All identifiers that begin with an underscore and either an uppercase
    letter or another underscore are reserved in the C standard.
    
    The identifier changed here is just an inclusion guard and nothing
    should be referring to it directly. Alter it to reflect the header
    file name, adding a corresponding comment to the #endif that
    terminates the guard.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Fixes #4
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit efc3d7091117eb37941b84554945313e2828e5bc
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Apr 19 15:11:20 2023 -0700

    rename syscall.h to internal.h
    
    This is librtas's sole internal header and it has more than
    syscall-related declarations. Rename it so its function is clear,
    updating its inclusion guard to use a non-reserved identifier.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Fixes #4
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 9077f0833cc06606897cb023accac9ba268dad48
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Apr 19 15:11:19 2023 -0700

    avoid reserved names for inclusion guards in shipped headers
    
    All identifiers that begin with an underscore and either an uppercase
    letter or another underscore are reserved in the C standard.
    
    The identifiers changed here are just inclusion guards and nothing
    should be referring to them directly. Alter them to reflect the header
    file names, adding corresponding comments to the #endif directives
    where missing.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Fixes #4
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit de2dda2fa96cedbc80cd9ec777c79b1afc532d51
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Apr 19 15:11:18 2023 -0700

    ci: bump GH actions/checkout to v3
    
    v2 is deprecated.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

Changelog for librtas-2.0.4
=======================================
commit 33aa9aee37cfc4bdc93ba4aff25afb962b6a7606
Author: Tyrel Datwyler <tyreld@linux.ibm.com>
Date:   Mon Jan 23 11:48:23 2023 -0800

    ci: rev Ubuntu action runner from 20.04 -> 22.04
    
    Move from previous LTS release to the latest LTS release. This has the
    benefit of also moving gcc-toolchain from gcc-10 -> gcc-11.
    
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 44d189b070eb04af6d237d52084e703327ea6243
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Tue Aug 2 15:39:02 2022 -0500

    rtas_platform_dump: fix uninitialized use of local variable
    
    The Clang Static Analyzer correctly identifies an uninitialized use:
    
    librtas_src/syscall_calls.c:930:6: warning: Branch condition evaluates to a
    garbage value [core.uninitialized.Branch]
            if (kernbuf)
                ^~~~~~~
    
    When rtas_platform_dump() is called with a NULL buffer argument,
    rtas_free_rmo_buffer() is called with a stack garbage value for the buffer
    address, which is ultimately passed to munmap().
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 1116a74b8ed01722957098eb934c0a8c186e2b27
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Mon Aug 1 09:52:51 2022 -0500

    configure.ac: discard LOCAL_CHECK_FLAGS
    
    As pointed out by Thomas Petazzoni, unconditionally setting build flags in
    this manner is problematic for downstreams, potentially conflicting with
    distribution policies.
    
    Drop LOCAL_CHECK_FLAGS and associated m4 code, preserving -Wall in
    AM_CFLAGS. This leaves m4/ empty, but removing altogether provokes a
    warning from autoreconf, so leave an empty file in the directory.
    
    Fixes #25.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 7e2216265ce2621e48036f4dcd2ea23b032d7eb5
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Jul 13 15:01:33 2022 -0500

    update .gitignore
    
    'git status' in a built tree gives:
    
    Untracked files:
      (use "git add <file>..." to include in what will be committed)
            config.h
            config.h.in
            librtas.la
            librtas_src/ofdt.lo
            librtas_src/syscall_calls.lo
            librtas_src/syscall_rmo.lo
            librtasevent.la
            librtasevent_src/get_rtas_event.lo
            librtasevent_src/print_rtas_event.lo
            librtasevent_src/rtas_cpu.lo
            librtasevent_src/rtas_dump.lo
            librtasevent_src/rtas_epow.lo
            librtasevent_src/rtas_hotplug.lo
            librtasevent_src/rtas_io.lo
            librtasevent_src/rtas_lri.lo
            librtasevent_src/rtas_mem.lo
            librtasevent_src/rtas_post.lo
            librtasevent_src/rtas_sp.lo
            librtasevent_src/rtas_srcfru.lo
            librtasevent_src/rtas_v6_misc.lo
            librtasevent_src/rtas_vend.lo
            libtool
            m4/libtool.m4
            m4/ltoptions.m4
            m4/ltsugar.m4
            m4/ltversion.m4
            m4/lt~obsolete.m4
            stamp-h1
    
    Ideally 'git status' should not report any untracked files after a build.
    This reduces the likelihood of accidentally checking in build outputs when
    making changes.
    
    Update .gitignore. Add things that aren't ignored but should be,
    remove irrelevant patterns, remove comments which don't match current
    practice (the git ls-files.. command just gives an error).
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit b51c540e15d00ec0e079d55d83e97ebc9c08fece
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Thu Feb 17 08:27:35 2022 -0600

    librtas: drop inline function attributes
    
    There's no real need to specify inline on file-static functions in this
    code. The compiler will inline these as it sees fit.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 29ad6be0b4a595441c3093457aaa7432d38ba4be
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Fri Feb 18 08:09:47 2022 -0600

    use AC_CONFIG_SRCDIR
    
    This allows configure to verify that the specified source directory
    actually contains the project source code.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit ad5868616777037350c2abd720dc547c6141bb52
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Feb 16 16:45:12 2022 -0600

    drop AM_PROG_AR
    
    $(AR) isn't used in our build system, so this isn't needed.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 755943eb5d8fabb11977b1d690187f51342328d9
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Feb 16 16:28:47 2022 -0600

    drop AC_CANONICAL_TARGET
    
    In autoconf parlance, "target" refers to the type of system for which any
    compiler tools in the package produce code. No compiler-like tools here,
    drop it.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit e473e2991f4a69438f618aa1c8e55d2f65229a4f
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Feb 16 10:21:26 2022 -0600

    remove position-independent executable flags
    
    Seems odd to specify -fPIE, -pie at the top level for a library project.
    Libtool takes care of adding -fPIC where it's appropriate.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit a0d932bbbdf23999c6e2d13a5a3b9e796b470263
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Feb 16 09:53:11 2022 -0600

    drop redundant ssp-buffer-size specification
    
    It appears that setting ssp-buffer-size to the minimum changes the code
    emitted with -fstack-protector but not -fstack-protector-strong or
    -fstack-protector-all. We're using -fstack-protector-all so our use of
    --param=ssp-buffer-size=1 is redundant.
    
    Examples/background:
    https://bugzilla.redhat.com/show_bug.cgi?id=1105456
    https://lore.kernel.org/all/1471862567.5256.18.camel@linux.intel.com
    https://lwn.net/Articles/584225/
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit f30ebfe896de3712b922fe8a26444bfd29497da4
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Thu Feb 10 13:19:20 2022 -0600

    use AM_CPPFLAGS for include directives
    
    Preprocessor search paths are more appropriately set in AM_CPPFLAGS than
    AM_CFLAGS.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 05c043f59d2cae5378a705c1d674c9bad432643b
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Thu Feb 17 08:36:31 2022 -0600

    require Autoconf 2.69
    
    Autoscan suggests requiring a minimum version of 2.69, which is a decade
    old as of this writing. All Linux distributions we care about supporting
    satisfy this.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit ee8ed1384b15f24df83f3c9de6eabcac03a2d698
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Fri Feb 18 08:50:32 2022 -0600

    drop useless librtas.pc
    
    It's impossible that anyone actually uses the librtas.pc generated by the
    build since all the flags are completely wrong and don't match the library
    name(s) or the installed header paths.
    
    We don't use pkg-config to configure dependencies during our build so we
    can drop PKG_PROG_PKG_CONFIG from configure.ac as well.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

Changelog for librtas-2.0.3
=======================================
commit c8a4104ac76ceb0eb61d36c6a1b6043ec92e2eb3
Author: Than Ngo <than@redhat.com>
Date:   Thu Mar 25 16:13:20 2021 +0100

    librtasevent: Fix coverity issues found by Covscan
    
    Error: RESOURCE_LEAK (CWE-772): [#def1]
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: alloc_fn: Storage is returned from allocation function "malloc".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: var_assign: Assigning: "src_raw" = storage returned from "malloc(88UL)".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:216: noescape: Resource "src_raw" is not freed or pointed-to in "memset". [Note: The source code implementation of the function has been overridden by a builtin model.]
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:219: noescape: Resource "src_raw" is not freed or pointed-to in "rtas_copy".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:220: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "parse_v6_hdr".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:239: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "re_scn_id".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:242: leaked_storage: Variable "src_raw" going out of scope leaks the storage it points to.
    240|
    241|       if (!src_subscns_included(src))
    242|->         return 0;
    243|
    244|       rtas_copy( (char *) src_raw + RE_SRC_SCN_SZ + 4, re, RE_SRC_SUBSCN_SZ);
    
    Error: RESOURCE_LEAK (CWE-772): [#def2]
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: alloc_fn: Storage is returned from allocation function "malloc".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: var_assign: Assigning: "src_raw" = storage returned from "malloc(88UL)".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:216: noescape: Resource "src_raw" is not freed or pointed-to in "memset". [Note: The source code implementation of the function has been overridden by a builtin model.]
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:219: noescape: Resource "src_raw" is not freed or pointed-to in "rtas_copy".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:220: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "parse_v6_hdr".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:239: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "re_scn_id".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:244: noescape: Resource "(char *)src_raw + 80 + 4" is not freed or pointed-to in "rtas_copy".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:263: leaked_storage: Variable "src_raw" going out of scope leaks the storage it points to.
    261|               cleanup_rtas_event(re);
    262|               errno = ENOMEM;
    263|->             return 1;
    264|           }
    265|
    
    Error: RESOURCE_LEAK (CWE-772): [#def3]
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:259: alloc_fn: Storage is returned from allocation function "malloc".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:259: var_assign: Assigning: "fru" = storage returned from "malloc(120UL)".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:266: noescape: Resource "fru" is not freed or pointed-to in "memset". [Note: The source code implementation of the function has been overridden by a builtin model.]
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:269: noescape: Resource "fru" is not freed or pointed-to in "parse_fru_scn".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:291: leaked_storage: Variable "fru" going out of scope leaks the storage it points to.
    289|               if (cur_fruhdr == NULL) {
    290|                   cleanup_rtas_event(re);
    291|->                 return -1;
    292|               }
    293|
    
    Error: RESOURCE_LEAK (CWE-772): [#def4]
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: alloc_fn: Storage is returned from allocation function "malloc".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: var_assign: Assigning: "src_raw" = storage returned from "malloc(88UL)".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:216: noescape: Resource "src_raw" is not freed or pointed-to in "memset". [Note: The source code implementation of the function has been overridden by a builtin model.]
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:219: noescape: Resource "src_raw" is not freed or pointed-to in "rtas_copy".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:220: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "parse_v6_hdr".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:239: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "re_scn_id".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:244: noescape: Resource "(char *)src_raw + 80 + 4" is not freed or pointed-to in "rtas_copy".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:291: leaked_storage: Variable "src_raw" going out of scope leaks the storage it points to.
    289|               if (cur_fruhdr == NULL) {
    290|                   cleanup_rtas_event(re);
    291|->                 return -1;
    292|               }
    293|
    
    Error: RESOURCE_LEAK (CWE-772): [#def5]
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: alloc_fn: Storage is returned from allocation function "malloc".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:208: var_assign: Assigning: "src_raw" = storage returned from "malloc(88UL)".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:216: noescape: Resource "src_raw" is not freed or pointed-to in "memset". [Note: The source code implementation of the function has been overridden by a builtin model.]
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:219: noescape: Resource "src_raw" is not freed or pointed-to in "rtas_copy".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:220: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "parse_v6_hdr".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:239: noescape: Resource "&src_raw->v6hdr" is not freed or pointed-to in "re_scn_id".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:244: noescape: Resource "(char *)src_raw + 80 + 4" is not freed or pointed-to in "rtas_copy".
    librtas-2.0.2/librtasevent_src/rtas_srcfru.c:312: leaked_storage: Variable "src_raw" going out of scope leaks the storage it points to.
    310|       } while (total_len < srcsub_len);
    311|
    312|->     return 0;
    313|   }
    314|
    
    Error: RESOURCE_LEAK (CWE-772): [#def6]
    librtas-2.0.2/librtasevent_src/rtas_vend.c:104: alloc_fn: Storage is returned from allocation function "malloc".
    librtas-2.0.2/librtasevent_src/rtas_vend.c:104: var_assign: Assigning: "ve" = storage returned from "malloc(40UL)".
    librtas-2.0.2/librtasevent_src/rtas_vend.c:111: noescape: Resource "(char *)ve + 24UL" is not freed or pointed-to in "rtas_copy".
    librtas-2.0.2/librtasevent_src/rtas_vend.c:119: leaked_storage: Variable "ve" going out of scope leaks the storage it points to.
    117|           if (ve->vendor_data == NULL) {
    118|               errno = ENOMEM;
    119|->             return -1;
    120|           }
    121|
    
    Signed-off-by: Than Ngo <than@rehat.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 2d2ac80a3b413e0e7ad3ebb47426923a9bf39b33
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Fri Feb 18 09:17:19 2022 -0600

    ci: override CFLAGS in configure
    
    Set CFLAGS to something fairly conventional and include -Werror so jobs
    will fail on compiler warnings. For CI purposes this should be an
    acceptable way to start enforcing a no new warnings policy.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 92d3fb040b25d931357a46f3d161e27d653caeb4
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Fri Feb 18 09:25:25 2022 -0600

    ci: make builds more verbose
    
    While we're experimenting with the CI configuration (compiler flags etc)
    we'll need the ability to inspect the exact commands used even in
    successful builds. So, for now at least, use V=1 with our make invocations.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 4fc1d726c5db4412a43a01a0cc0e21069c05271f
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Feb 9 22:01:46 2022 -0600

    librtas: fix printf format mismatches for 32-bit build
    
    Several issues of this form:
    
    Warning: librtas_src/syscall.h:68:11: warning: format ‘%lx’ expects
    argument of type ‘long unsigned int’, but argument 4 has type ‘uint64_t’
    {aka ‘long long unsigned int’} [-Wformat=]
       68 |    printf("librtas %s(): " _fmt, __func__, ##_args); \
          |           ^~~~~~~~~~~~~~~~
    librtas_src/syscall_calls.c:516:2: note: in expansion of macro ‘dbg’
      516 |  dbg("(0x%x, 0x%lx, %d) = %d, 0x%x\n", config_addr, phb_id, func,
          |  ^~~
    librtas_src/syscall_calls.c:516:18: note: format string is defined here
      516 |  dbg("(0x%x, 0x%lx, %d) = %d, 0x%x\n", config_addr, phb_id, func,
          |                ~~^
          |                  |
          |                  long unsigned int
          |                %llx
    
    Convert this and others to PRIx64 to accommodate uint64_t.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 6e4535968b1667eca0569621d3c9f0fd234429de
Author: Nathan Lynch <nathanl@linux.ibm.com>
Date:   Wed Feb 9 21:30:54 2022 -0600

    librtasevent: fix 'taking address of packed member' warnings
    
    Address the following warnings:
    
    Warning: librtasevent_src/get_rtas_event.c:282:37: warning: taking address
    of packed member of ‘struct rtas_event_exthdr_raw’ may result in an
    unaligned pointer value [-Waddress-of-packed-member]
      282 |     parse_rtas_time(&rex_hdr->time, &rawhdr->time);
          |                                     ^~~~~~~~~~~~~
    Warning: librtasevent_src/get_rtas_event.c:283:37: warning: taking address
    of packed member of ‘struct rtas_event_exthdr_raw’ may result in an
    unaligned pointer value [-Waddress-of-packed-member]
      283 |     parse_rtas_date(&rex_hdr->date, &rawhdr->date);
          |                                     ^~~~~~~~~~~~~
    librtasevent_src/rtas_v6_misc.c: In function ‘parse_priv_hdr_scn’:
    Warning: librtasevent_src/rtas_v6_misc.c:119:37: warning: taking address of
    packed member of ‘struct rtas_priv_hdr_scn_raw’ may result in an unaligned
    pointer value [-Waddress-of-packed-member]
      119 |     parse_rtas_date(&privhdr->date, &rawhdr->date);
          |                                     ^~~~~~~~~~~~~
    Warning: librtasevent_src/rtas_v6_misc.c:120:37: warning: taking address of
    packed member of ‘struct rtas_priv_hdr_scn_raw’ may result in an unaligned
    pointer value [-Waddress-of-packed-member]
      120 |     parse_rtas_time(&privhdr->time, &rawhdr->time);
          |                                     ^~~~~~~~~~~~~
    
    by passing the small "raw" date/time objects by value instead of taking their
    addresses.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 5c207ca281b93e47a3f751fa1b6f1f610357a71d
Author: Nathan Lynch <ntl@pobox.com>
Date:   Mon Jan 31 13:45:22 2022 -0600

    ci: add GitHub Actions build tests
    
    GitHub's hosted x86 Ubuntu runners have cross toolchains suitable for
    building librtas for its targeted architectures. Add a matrix build
    including these (32- and 64-bit big-endian, 64-bit little-endian) which
    performs a basic build and distcheck.
    
    Also perform a native x86 build since it "works": it produces nothing you
    would want to run, but the build succeeds. If we are to add tests in the
    future, running them as native code on the build host may be the best
    option. So it's in our interest to keep the x86 build working.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 6447b24d9f8d892e750b9517f7c136855967ea61
Author: Fabian Groffen <grobian@gentoo.org>
Date:   Mon May 24 10:06:54 2021 +0200

    librtasevent: include endian.h for beXXtoh macros
    
    In particular using musl libc, without this include, the calls to
    be16toh/be32toh result in a compiler warning about an undefined symbol.
    Since in musl these are actually implemented by macros, the symbols
    remain undefined in the final shared library, making the library
    unusable.
    
    Issue: https://github.com/ibm-power-utilities/librtas/issues/10
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>
    Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
    Reviewed-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit 0bb5704e6452886f8d93ed905efe058f13e26a6a
Author: Andrew Donnellan <ajd@linux.ibm.com>
Date:   Sat Apr 25 00:32:57 2020 +1000

    syscall_calls: fix typo in comment
    
    Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
    Reviewed-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

commit f8a1f6df25263afc75cabb9c40ddb8e54cf086e3
Author: Tyrel Datwyler <tyreld@linux.ibm.com>
Date:   Thu Dec 16 13:37:15 2021 -0800

    librtasevent: Fix memory page address print issue
    
    The logical resource address lo and hi fields are currently printed by rtas_dump
    infering that their naming refers to significance when in fact they refer to the
    bit numbering.
    
    lri_mem_addr_lo == Memory Logical Address (bit 0-31)
    lri_mem_addr_hi == Memory Logical Address (bit 32-64))
    
    Hence rtas_dump command is printing the logical address output with those two
    fields swapped.
    
    This patch fixes rtas_lri_scn fields so that we get legitimate addresses.
    
    Current output:
    --------------
    Logical Address:        2ab0a0000000014f
    
    Correct output:
    -------------
    Logical Address:  0x0000014F2AB0A000
    
    Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
    Reviewed-by: Nathan Lynch <nathanl@linux.ibm.com>
    [tyreld: reworded commit message]
    Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>

Changelog for librtas-2.0.2
=======================================
commit 26970c42bc017ad68b864e7134cf941c07443aa8
Author: Chris Engel <cengel@linux.vnet.ibm.com>
Date:   Tue Aug 22 14:59:06 2017 -0500

    Interface for ibm,physical-attestation rtas call
    
    The physical attestation interfaces are provided to allow a
    trusted 3rd party client to retrieve information about the
    trusted boot state of the target PowerVM system.  This makes
    use of the systems physical TPM(s).  These TPM(s) are used
    by system firmware to extend measurements during the
    boot process.
    
    Signed-off-by: Chris Engel <cengel@linux.vnet.ibm.com>
    Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
    Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>

Changelog for librtas-2.0.1
=======================================
commit 7f841902eb50ca77c3aa884e3fd924c2bbd817ca
Author: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Date:   Mon Jun 13 09:33:57 2016 -0400

    librtas: Fix endianess issue in errinjct rtas call
    
    Unlike other RTAS calls, first output parameter of "ibm,open-errinjct"
    is "open token", not status value.
    
    With commit ee457b1c, we endedup calling be32toh twice for otoken and
    didn't convert status from BE to host format.
    
    This patch fixes above issue.
    
    Fixes: ee457b1c (librtas: consolidate common actions in making a rtas call)
    
    Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
    Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
    Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>

commit e6f35aaee6ad1d674a1b0498e7144340f4abe926
Author: Michael Bringmann <mwb@linux.vnet.ibm.com>
Date:   Mon Jun 13 09:29:59 2016 -0400

    librtas/configure.ac: Fix for builds on older distros
    
    Fix problem generating configure script / Makefile on platforms/distros
    that have versions of 'automake' older than 1.11.1.
    
    Signed-off-by: Michael Bringmann <mwb@linux.vnelibrtas/configure.ac: Fix for
    
    Fix problem generating configure script / Makefile on platforms/distros
    that have versions of 'automake' older than 1.11.1.
    
    Signed-off-by: Michael Bringmann <mwb@linux.vnet.ibm.com>
    Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com>

commit ac6330c17bcbc955b9cb13d7073d89d3d87a3a50
Author: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date:   Wed May 18 16:43:14 2016 -0400

    Correcting to add files that should have been added as part of
    commit e0582a6af7c33e867edca.
    
    Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

commit e0582a6af7c33e867edca882b28a1544d2ef08b4
Author: Stewart Smith <stewart@linux.vnet.ibm.com>
Date:   Wed May 11 13:26:51 2016 -0400

    From: Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
    
    Switch to modern autotools based build system
    
    The patch removes the custom Makefiles and replaces them with a modern
    autotools based build system.
    
    In the process, several bugs are fixed and enhancements made:
    - build dependencies are sorted out okay
    - the makefiles are now much smaller
    - make dist works
    - make distcheck works
    - out of source builds work
    - autogenerating of version in spec file is much simpler
    - configure script checks for needed functions, header files and types
    - we now build with hardening gcc flags (if available)
    - libraries are now properly .so versioned
    - build+install is good for multiarch
    - some rpmlint warnings fixed
    - split rpm into librtas and librtas-devel
    - provide pkg-config foo
    
    Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
    Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

Changelog for librtas-2.0.0
=======================================

commit da9f484ab2429525101432d57176f376576c3dac
Author: Adam Conrad <adconrad@0c3.net>
Date:   Tue Apr 5 04:11:23 2016 -0600

    Modernize and parameterize the RPM specfile slightly.
    
    Signed-off-by: Adam Conrad <adconrad@0c3.net>

commit 9c1591cd262116290b5a651bc09192b6c34da9ce
Author: Adam Conrad <adconrad@0c3.net>
Date:   Tue Apr 5 01:38:33 2016 -0600

    librtasevent: Fix build failure with -Wformat -Werror=format-security
    
    Signed-off-by: Adam Conrad <adconrad@0c3.net>

commit 2644f9d269be8b852aa024f1364a5199aac268db
Author: Adam Conrad <adconrad@0c3.net>
Date:   Tue Apr 5 01:35:51 2016 -0600

    librtas*/Makefile: install/uninstall static libs
    
    Signed-off-by: Adam Conrad <adconrad@0c3.net>

commit f9bb81502e5fa3894caa1761292ec69580dc087e
Author: Adam Conrad <adconrad@0c3.net>
Date:   Tue Apr 5 01:30:41 2016 -0600

    librtasevent: Generate static library.
    
    Signed-off-by: Adam Conrad <adconrad@0c3.net>

commit 2b43240db6fe721288bf09a6f2c75743ae4f8855
Author: Adam Conrad <adconrad@0c3.net>
Date:   Fri Apr 1 08:34:16 2016 -0600

    Use MAJOR_NO to define the SONAME symlinks, instead of hardcoding "1"
    
    Signed-off-by: Adam Conrad <adconrad@0c3.net>

Changelog for librtas-1.4.1
=======================================

commit af07fde662985cb574fe56497847c4c6cdf1d1a8
Author: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Date:   Thu Mar 17 18:53:48 2016 -0400

    librtas: Do not enable debug message by default
    
    Commit eae18de3 removed dbg1 macro. But accidently enabled logging debug
    message by default. This is confusing end users. Hence remove logging
    debug message by default.
    
    Fixes: eae18de3 (librtas: Update the dbg() macro)
    Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
    CC: Nathan Fontenot <nfont@linux.vnet.ibm.com>

commit c5e9dcf993e9e20bbe14bc06fb0ec6dd5031f935
Author: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Date:   Mon Feb 15 07:33:14 2016 -0500

    librtas: Release lock in error path
    
    Release RMO buffer lock in error path. Otherwise we will continue to hold
    the lock and subsequent RMO buffer allocation request fails.
    
    Reported-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
    Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>

commit 9683c7b393d48922a14b09a898fbe3cf698cd71a
Author: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Date:   Wed Feb 10 16:15:19 2016 -0500

    librtas: Fix Makefile
    
    Commit 90f24679 switched package license from CPL to LGPL. But we forgot
    to update Makefile. So creating tarball from source fails. This patch
    replaces COPYRIGHT with COPYING.LESSER in Makefile.
    
    Also updated Makefile header with proper license text.
    
    Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>

Changelog for librtas-1.4.0
=======================================

commit 2a279559111e4f68ed270f28e21a042a97ad41cd
Author: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date:   Thu Jan 7 11:55:47 2016 -0500

    Update README for correct contact information.
    
    Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

commit 90f24679c795ea8224ba836994366dec31529663
Author: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date:   Thu Jan 7 11:19:33 2016 -0500

    Switch librtas package to LGPL License.
    
    Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

commit 5bbe4e9382b2e298227af13d1b600c59a5f1768b
Author: Rafael Fonseca <rdossant@redhat.com>
Date:   Tue Dec 15 15:06:10 2015 -0500

    From: Rafael Fonseca <rdossant@redhat.com>
    
    Fix print formats for width-based types.
    
    Signed-off-by: NAthan Fontenot <nfont@linux.vnet.ibm.com>

commit 9d930daa58c3c6f2fc2fb6e82c005726d22ef8b5
Author: Rafael Fonseca <rdossant@redhat.com>
Date:   Tue Dec 15 14:58:20 2015 -0500

    From: Rafael Fonseca <rdossant@redhat.com>
    
    Fix potential memory leaks
    
    Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

commit 1d0ec08104077bcc4dd8f76524cb2493aaf04a60
Author: Sam Bobroff <sam.bobroff@au1.ibm.com>
Date:   Tue Dec 15 14:53:55 2015 -0500

    librtasevent: correct files left after uninstall
    
    Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
    Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>

commit 22b418b8758c60c9e250f495e2d58db2394ee3c4
Author: Sam Bobroff <sam.bobroff@au1.ibm.com>
Date:   Tue Dec 15 14:52:49 2015 -0500

    librtas: correct files left after uninstall
    
    Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
    Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>

commit 9c1403ab4da25db47fcdfa7cfa26c0b465e0a5ed
Author: Sam Bobroff <sam.bobroff@au1.ibm.com>
Date:   Tue Dec 15 14:50:02 2015 -0500

    librtas: install librtas.so.1 symlink
    
    Add a line to the librtas Makefile to create librtas.so.1 when
    performing "make install". This matches the librtasevent.so.1 that is
    already created.
    
    This allows systems that rely on the existance of that link to
    successfully build programs using librtas when it is installed
    directly from the source.
    
    Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>

commit 0afce7b27cc5e1581f7ec6c0acf3d7b3b6419b5b
Author: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date:   Tue Dec 15 14:46:54 2015 -0500

    librtas: Correct multiple build warnings
    
    Correct the warnings produced during the build of librtas.
    
    Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

commit bb77762b4f3310854bdf07ef3fcebc01ddd0d798
Author: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date:   Tue Dec 15 14:37:17 2015 -0500

    librtas: deprecate libofdt
    
    The libofdt library is a project that was started a long time ago in
    the hopes of providing a common infrastructure for accessing the device
    tree. The code is mostly complete andd I really don't think there are
    any users of it so I am proposing to deprecate the library.
    
    Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

commit 015c0f95fc10e595cd1a90634ac831d93d9ba4e2
Author: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date:   Tue Dec 15 14:30:13 2015 -0500

    librtas: coding style updates
    
    Correct a few style issues to give the code a more consistant look.
    
    No functional changes.
    
    Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

commit 21de2c69433e23450d4fad4f9c48fbf8d2f5d04a
Author: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date:   Tue Dec 15 14:27:56 2015 -0500

    librtas: Make SANITY_CHECKS() a real function
    
    Make the SANITY_CHECKS() macro a regular function.
    
    Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

commit e5451d028d6981728840e1960f2d1de90e994f60
Author: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date:   Tue Dec 15 14:24:53 2015 -0500

    librtas: Move rtas_token() declaration to internal header
    
    Move rtas_token decalration to internal header file.
    
    Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

commit f06f03493a3f4c8e8cc5a96db857f0ba01a66e6c
Author: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date:   Tue Dec 15 14:23:41 2015 -0500

    librtas: Remove declaration of open_proc_rtas_file()
    
    Make the open_proc_rtas_file() routine static and remove its
    declaration from librtas.h.
    
    Signed-off-by: Nathan Fotnenot <nfont@linux.vnet.ibm.com>

commit c01583d8bde5dd4c3e1ce7d0b4d5ced4008bffd4
Author: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date:   Tue Dec 15 14:21:45 2015 -0500

    librtas: Move declaration of read_entire_file()
    
    Move declaration of read_entire_file() to an internal header.
    
    Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

commit 52222bf6c8fb1d3ce6fdf5ba7e97653771ea9843
Author: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date:   Tue Dec 15 14:19:14 2015 -0500

    librtas: Break up the librtas_config struct
    
    Break up the librtas_config struct into its two pieces and remove
    the definitions from the public header.
    
    Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

commit eae18de31155d109a0160485ee7d93bbdb32d2e0
Author: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Date:   Tue Dec 15 14:14:26 2015 -0500

    librtas: Update the dbg() macro
    
    Remove the useless indirect of dbg1() macro and move the definition
    to an internal .h file.
    
    Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

commit ee457b1c21bd913913243e54c5a7dca63d3545a4
Author: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date:   Tue Dec 15 14:11:16 2015 -0500

    librtas: consolidate common actions in making a rtas call
    
    Consolidate common actions, such as getting the rtas token and
    handling extended delays, when making a rtas call into a routine.
    
    This change presents to new ways to make a rtas call;
    rtas_call() - Which handles any delays
    rtas_call_no_delay() - Which does not handle any delays
    
    The no delay variant was needed for the few instances where some work
    needs to be done in between rtas calls when a delay occurs.
    
    Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

commit 4b18e100dcf1672590aee49b2c1bbc15debee4a7
Author: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Date:   Tue Dec 15 13:54:45 2015 -0500

    librtas: rtas calls fully   implemented in syscalls
    
    Since the procfs and common interfaces are being removed,
    all rtas calls will be fully implemented in the syscall_calls.c
    and syscall_rmo.c files.
    
    Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>

commit 94efe8cb14637820af35bba555997d5bd5f92704
Author: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Date:   Tue Dec 15 13:25:40 2015 -0500

    librtas: common.h merged into librtas.h
    
    Code in common.h was added to librtas.h
    
    Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>

commit 3bc2d9277c6ac6679f7ee308127f90255453d76e
Author: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Date:   Tue Dec 15 13:23:51 2015 -0500

    librtas: removal of common code
    
    The common files are being removed with the removal of procfs
    in order to simplify librtas.
    
    Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>

commit b8ad1ec918230379f612a4e976e74600660cebdc
Author: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Date:   Tue Dec 15 13:20:06 2015 -0500

    librtas: removing procfs interface
    
    The procfs interface is no longer used.  As a result, it is being
    removed to simplify librtas.
    
    Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>

Changelog for librtas-1.3.14
=======================================
commit 4e46c718f42bf05e797c7fcfdd6cfc2a21fb4c91
Author: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Date:   Wed Jan 7 14:26:15 2015 -0500

    PAPR requires that the status word is the first parameter in the return
    buffer for rtas calls. Due to this requirement the librtas sc_rtas_call
    function always performs a be32toh operation on the first parameter in the
    return buffer. However, the ibm,open-errinjct rtas is special in that its
    return buffer is switched. The "Open Token" is the first return parameter
    while the "Status" word is second.
    
    This patch fixes this special case in the sc_errinjct_open function such
    that the byteswapping of "status" and "otoken" are handled correctly.
    
    Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>

Changelog for librtas-1.3.13
=======================================
commit 1d54a4a346f9111e1326dfdec756fd78360add42
Author: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date:   Fri Oct 17 10:18:40 2014 -0400

    When we pass _hi and _lo 32bits of a 64bit value, we
    should convert the host endian value carefully.
    
    i.e,
            X_hi = htobe32(BITS32_HI(X))
            X_lo = htobe32(BITS32_LO(X))
    
    and not :
            X_hi = BITS32_HI(htobe64(X))
    
    NOTE: This patch is untested, but I believe this patch
    is good to have than the current faulty conversion.
    
    This patch fixes all such occurrences in librtas.
    
    Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com>

commit e5541e1a5c83ce47cc492abcd7343d65763dcefe
Author: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date:   Fri Oct 17 10:17:28 2014 -0400

    Use rpm macros for standard paths
    
    Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com>

commit 8ef7f827e28e3cd284f6be5686a987786be7502d
Author: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date:   Fri Oct 17 10:16:16 2014 -0400

    This patch fixes the conversion of args for paltform-dump call.
    platform dump passes 64bit values as, a pair of 32bit values.
    val_hi and val_lo. So when we convert a value 'X' to 32bit hi and lo
    values in BE, we should follow the below approach :
    
    X_hi = htobe32(BITS32_HI(X))
    X_lo = htobe32(BITS32_LO(X))
    
    and NOT
    X_tmp = htobe64(X);
    X_hi = BITS32_HI(X_tmp), X_lo = BITS32_LO(X_tmp)
    
    This patch has been tested with rtas_errd/extract_platdump to retrieve a
    dump from FSP.
    
    Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com>

commit 52263814c46210b51e564748050299620726dfd1
Author: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date:   Fri Oct 17 10:12:54 2014 -0400

    Fix LE parsing of SRC/FRU events
    
    Signed-off-by: Thomas L Falcon <tlfalcon@linux.vnet.ibm.com>
    Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com>

commit ac0a91d2730740cd279d80ccd4c83b0a04827d1d
Author: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date:   Fri Oct 17 10:10:29 2014 -0400

    LE Support for SRC/FRU events
    
    Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

Changelog for librtas-1.3.12
=======================================
commit 1f045d8df135cfdc232a49f0992ab60913c0b043
Author: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Date:   Wed Aug 13 13:04:29 2014 -0500

    get_sensor, set_sensor: Handle big endian data in little endian
    
    This patch handles big endian location code length data in little endian
    platform. This enables the tools to work on little endian platform after
    having passed big endian buffer data.
    
    Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
    Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>

commit 18f353d3477fb137e9773bcda0c1f60fb071d5b7
Author: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Date:   Wed Aug 13 13:02:17 2014 -0500

    librtas: fix for sc_platform_dump endian handling
    
    Some mistakes were made in adding little endian support for the
    sc_platform_dump function. As the values being handled are 64-bit integers,
    it makes much more sense to use the 64-bit byteswap function. The
    endianness of seq_next also needs to be handled.
    
    Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
