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>
