28 Apr, 2014

1 commit

  • We have two copies of code that creates an OPAL sg list. Consolidate
    these into a common set of helpers and fix the endian issues.

    The flash interface embedded a version number in the num_entries
    field, whereas the dump interface did did not. Since versioning
    wasn't added to the flash interface and it is impossible to add
    this in a backwards compatible way, just remove it.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Benjamin Herrenschmidt

    Anton Blanchard
     

09 Apr, 2014

1 commit


07 Mar, 2014

1 commit

  • This enables support for userspace to fetch and initiate FSP and
    Platform dumps from the service processor (via firmware) through sysfs.

    Based on original patch from Vasant Hegde

    Flow:
    - We register for OPAL notification events.
    - OPAL sends new dump available notification.
    - We make information on dump available via sysfs
    - Userspace requests dump contents
    - We retrieve the dump via OPAL interface
    - User copies the dump data
    - userspace sends ack for dump
    - We send ACK to OPAL.

    sysfs files:
    - We add the /sys/firmware/opal/dump directory
    - echoing 1 (well, anything, but in future we may support
    different dump types) to /sys/firmware/opal/dump/initiate_dump
    will initiate a dump.
    - Each dump that we've been notified of gets a directory
    in /sys/firmware/opal/dump/ with a name of the dump type and ID (in hex,
    as this is what's used elsewhere to identify the dump).
    - Each dump has files: id, type, dump and acknowledge
    dump is binary and is the dump itself.
    echoing 'ack' to acknowledge (currently any string will do) will
    acknowledge the dump and it will soon after disappear from sysfs.

    OPAL APIs:
    - opal_dump_init()
    - opal_dump_info()
    - opal_dump_read()
    - opal_dump_ack()
    - opal_dump_resend_notification()

    Currently we are only ever notified for one dump at a time (until
    the user explicitly acks the current dump, then we get a notification
    of the next dump), but this kernel code should "just work" when OPAL
    starts notifying us of all the dumps present.

    Signed-off-by: Stewart Smith
    Signed-off-by: Benjamin Herrenschmidt

    Stewart Smith