18c2ecf20Sopenharmony_ciWhat:		/sys/firmware/opal/elog
28c2ecf20Sopenharmony_ciDate:		Feb 2014
38c2ecf20Sopenharmony_ciContact:	Stewart Smith <stewart@linux.vnet.ibm.com>
48c2ecf20Sopenharmony_ciDescription:
58c2ecf20Sopenharmony_ci		This directory exposes error log entries retrieved
68c2ecf20Sopenharmony_ci		through the OPAL firmware interface.
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci		Each error log is identified by a unique ID and will
98c2ecf20Sopenharmony_ci		exist until explicitly acknowledged to firmware.
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci		Each log entry has a directory in /sys/firmware/opal/elog.
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci		Log entries may be purged by the service processor
148c2ecf20Sopenharmony_ci		before retrieved by firmware or retrieved/acknowledged by
158c2ecf20Sopenharmony_ci		Linux if there is no room for more log entries.
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci		In the event that Linux has retrieved the log entries
188c2ecf20Sopenharmony_ci		but not explicitly acknowledged them to firmware and
198c2ecf20Sopenharmony_ci		the service processor needs more room for log entries,
208c2ecf20Sopenharmony_ci		the only remaining copy of a log message may be in
218c2ecf20Sopenharmony_ci		Linux.
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci		Typically, a user space daemon will monitor for new
248c2ecf20Sopenharmony_ci		entries, read them out and acknowledge them.
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci		The service processor may be able to store more log
278c2ecf20Sopenharmony_ci		entries than firmware can, so after you acknowledge
288c2ecf20Sopenharmony_ci		an event from Linux you may instantly get another one
298c2ecf20Sopenharmony_ci		from the queue that was generated some time in the past.
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci		The raw log format is a binary format. We currently
328c2ecf20Sopenharmony_ci		do not parse this at all in kernel, leaving it up to
338c2ecf20Sopenharmony_ci		user space to solve the problem. In future, we may
348c2ecf20Sopenharmony_ci		do more parsing in kernel and add more files to make
358c2ecf20Sopenharmony_ci		it easier for simple user space processes to extract
368c2ecf20Sopenharmony_ci		more information.
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci		For each log entry (directory), there are the following
398c2ecf20Sopenharmony_ci		files:
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci		==============  ================================================
428c2ecf20Sopenharmony_ci		id:		An ASCII representation of the ID of the
438c2ecf20Sopenharmony_ci				error log, in hex - e.g. "0x01".
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci		type:		An ASCII representation of the type id and
468c2ecf20Sopenharmony_ci				description of the type of error log.
478c2ecf20Sopenharmony_ci				Currently just "0x00 PEL" - platform error log.
488c2ecf20Sopenharmony_ci				In the future there may be additional types.
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci		raw:		A read-only binary file that can be read
518c2ecf20Sopenharmony_ci				to get the raw log entry. These are
528c2ecf20Sopenharmony_ci				<16kb, often just hundreds of bytes and
538c2ecf20Sopenharmony_ci				"average" 2kb.
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci		acknowledge:	Writing 'ack' to this file will acknowledge
568c2ecf20Sopenharmony_ci				the error log to firmware (and in turn
578c2ecf20Sopenharmony_ci				the service processor, if applicable).
588c2ecf20Sopenharmony_ci				Shortly after acknowledging it, the log
598c2ecf20Sopenharmony_ci				entry will be removed from sysfs.
608c2ecf20Sopenharmony_ci				Reading this file will list the supported
618c2ecf20Sopenharmony_ci				operations (currently just acknowledge).
628c2ecf20Sopenharmony_ci		==============  ================================================
63