mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 11:55:49 +07:00
c7e64b9ce0
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 <hegdevasant@linux.vnet.ibm.com> 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 <stewart@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> |
||
---|---|---|
.. | ||
firewire-cdev | ||
o2cb | ||
syscalls | ||
sysfs-acpi-pmprofile | ||
sysfs-bus-firewire | ||
sysfs-bus-usb | ||
sysfs-bus-xen-backend | ||
sysfs-class-backlight | ||
sysfs-class-rfkill | ||
sysfs-class-tpm | ||
sysfs-class-ubi | ||
sysfs-devices-node | ||
sysfs-devices-system-xen_memory | ||
sysfs-driver-ib_srp | ||
sysfs-driver-qla2xxx | ||
sysfs-driver-usb-usbtmc | ||
sysfs-driver-w1_ds28e04 | ||
sysfs-firmware-efi-vars | ||
sysfs-firmware-opal-dump | ||
sysfs-firmware-opal-elog | ||
sysfs-module | ||
sysfs-transport-srp | ||
thermal-notification | ||
vdso |