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>

Changelog for librtas-1.3.11
=======================================
commit 129fdb4875c8c679418b70c55df9b8b7fe8d6180
Author: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Date:   Wed Jun 25 09:55:52 2014 -0500

    README: documentation on handling endianness
    
    Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>

commit b13d14ff2dcbe54af61cab19d09be22edc9d74c0
Author: Maran Pakkirisamy <maranp@linux.vnet.ibm.com>
Date:   Fri Jun 6 14:04:27 2014 -0500

    librtas: avoid bashism in rules.mk
    
    Ubuntu has made dash as its default shell (/bin/sh). This leads to build
    being broken on ubuntu.
    More information at: https://wiki.ubuntu.com/DashAsBinSh
    This patch removes bashism and hence fixes the build breakage.
    
    Signed-off-by: Maran Pakkirisamy <maranp@linux.vnet.ibm.com>

commit f9b806b19bbc4df56df6b5dbab1bf9060508b5d9
Author: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Date:   Fri Jun 6 14:02:40 2014 -0500

    librtas: Little endian support in syscalls
    
    This patch attempts to make rtas syscalls compatible for Little
    Endian systems by ensuring rtas call parameters are Big Endian and
    return values are host endian.
    
    Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>

Changelog for librtas-1.3.10
=======================================
commit e0c097d3e0ab65433d4fdc6e18a820c82d909464
Author: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date:   Fri Mar 21 15:28:56 2014 -0500

    librtasevent: Enable RTAS event parsing on LE systems
    
    The librtasevent library does not work in LE environments. The
    struct's for each rtas event section are defined as a bit field
    to match layout of the rtas event. This librtasevent library
    currently functions by mapping these structs directly the raw
    rtas event that is passed. This works for BE systems because
    rtas events are in BE by definition.
    
    To fix this this patch re-defines the structs that have been
    used to just contain an int for each value in the rtas event
    sections, then adds a raw version of the struct that we can map
    directly onto the passed in rtas event. The raw structs can then
    be traversed an we can do any neccessary conversions to LE values
    in the structs that are passed back to the user.
    
    This patch updates most of the v6 rtas event sections, most notably
    src/fru sections have not been updated yet. At this time there
    are no plans to update pre-v6 rtas events for LE environments.
    
    Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

commit 7eb810757d8573ef47fdc5bd26aa3d9e9afbfd8a
Author: Greg Kurz <gkurz@linux.vnet.ibm.com>
Date:   Fri Mar 21 11:49:13 2014 -0500

    librtas: PCI hotplug support vs little endian
    
    The goal of this patch is to enable a little endian process to interact
    with RTAS which is big endian. The rationale is that librtas assumes
    to be passed cpu endian arguments and do the necessary conversions. The
    reasons for this choice are:
    - many arguments are owned by librtas (status, RMO buffer addresses...)
    - nearly all arguments are being used in cpu endian order by librtas:
      if they were assumed to be big endian, we would have to byte swap
      anyway, resulting in an even bigger patch...
    
    Of course, all rules have an exception: the RMO buffer content is not
    seen by librtas, it is up to the caller (drmgr) to do the conversions.
    
    It seems that recent kernels don't have the needed procfs files anymore,
    so this patch only cares about the rtas() syscall based implementation.
    
    As requested by Benjamin Herrenschmidt, the byte swapping should be
    performed in userland AND be careful about corner cases where non
    32-bit values are being passed:
    
    http://patchwork.ozlabs.org/patch/327089/
    
    We cannot boldly convert all arguments in the sc_rtas_call() function.
    
    For an example, let's look at sc_suspend_me() where we pass a 64 bit value
    split across two arguments. If streamid is ABCDEFGHIJKLMNOP, then it will
    be reassembled by the kernel as IJKLMNOPABCDEFGH before being passed to the
    host...
    
    As a consequence, we can only convert well known parameters in the
    sc_rtas_call() function:
    - token
    - number of input arguments
    - number of return arguments
    - return status (always the first return argument)
    
    All other values must be converted in the caller. Please note that we
    introduce intermediary variables for return values as we do not want
    big endian values to be written in memory where the code assumes they
    are cpu endian.
    
    As a starter, we focus on the RTAS calls involved in PCI hotplug.
    According to section 13.5.3 of the PAPR+, we have:
    - set-power-level
    - get-sensor-state
    - set-indicator
    - ibm,configure-connector (the RMO part is already covered in drmgr)
    <disclaimer>
    We should cover all the calls, but it requires a huge work and we
    only want to enable PCI hotplug here. So yes, all other calls are
    still broken in little endian... some more patching will be needed.
    </disclaimer>
    
    Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
    Reviewed-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>

Changelog for librtas-1.3.9
=======================================
commit 9c5bccb93aa734796df111c2e7c051860b8b30de
Author: Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Date:   Fri Feb 28 07:49:59 2014 -0600

    librtas, libofdt: fix endianness issues when accessing the device tree
    
    Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>

commit 399a1962534342c1a153445b587d3fd0c95cfc78
Merge: e2de13f a057c98
Author: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date:   Wed Feb 26 08:22:33 2014 -0600

    Merge branch 'master' of ssh://nfont@git.code.sf.net/p/librtas/code

commit e2de13f77b36aff9d55d97ec862261a329262d4a
Author: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Date:   Tue Feb 25 10:09:54 2014 -0600

    librtasevent: Add hotplug event implementation
    
    Add event definition and helper functions for hotplug events. This is
    intended for qemu to notify a pseries guest of a hotplug event.
    
    Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>

commit a057c984394ac5c0a043ecc250073b8606cd38a1
Author: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Date:   Tue Feb 25 10:09:54 2014 -0600

    librtasevent: Add hotplug event implementation
    
    Add event definition and helper functions for hotplug events. This is
    intended for qemu to notify a pseries guest of a hotplug event.
    
    Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>

Changelog for librtas-1.3.8
=======================================
commit cd1868315f728ea5e8399df5fb7689a88870d7da
Author: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date:   Thu Jan 31 12:27:48 2013 -0600

    Identify Platform Resource Reassignment Notifications (PRRN).
    
    Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>


Changelog for librtas-1.3.7
=======================================
commit 0d02142ec36e176694c90ab722aedc75c48801a0
Author: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Date:   Tue Dec 18 13:08:09 2012 -0600

    librtas allocates buffer space (required for RTAS call) in the RTAS private
    memory area through sc_get_rmo_buffer() which internally allocates memory
    and protects it by acquiring lock on the allocated memory area.
    
    Locking function :
       At present acquire_file_lock() tries to lock the particular memory
    area. If the memory area is already locked then it returns error without
    retrying.
    
    So when two process executes rtas call simultaneously one fails with
    "Unknown librtas I/O" error.
    
    This patch introduces "Wait for lock to be available" instead of
    returning with IO error.
    
    Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>

commit aea297b24ed0167970732193bbfd206a6c844dec
Author: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Date:   Tue Dec 18 13:06:21 2012 -0600

    This patch fixes minor memory leak in librtas.so
    
    Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
    Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

