Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) What:		/sys/firmware/opal/elog
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) Date:		Feb 2014
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) Contact:	Stewart Smith <stewart@linux.vnet.ibm.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) 		This directory exposes error log entries retrieved
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) 		through the OPAL firmware interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) 		Each error log is identified by a unique ID and will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) 		exist until explicitly acknowledged to firmware.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) 		Each log entry has a directory in /sys/firmware/opal/elog.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 		Log entries may be purged by the service processor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 		before retrieved by firmware or retrieved/acknowledged by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 		Linux if there is no room for more log entries.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) 		In the event that Linux has retrieved the log entries
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 		but not explicitly acknowledged them to firmware and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 		the service processor needs more room for log entries,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 		the only remaining copy of a log message may be in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 		Linux.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 		Typically, a user space daemon will monitor for new
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 		entries, read them out and acknowledge them.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 		The service processor may be able to store more log
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 		entries than firmware can, so after you acknowledge
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 		an event from Linux you may instantly get another one
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 		from the queue that was generated some time in the past.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 		The raw log format is a binary format. We currently
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 		do not parse this at all in kernel, leaving it up to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 		user space to solve the problem. In future, we may
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 		do more parsing in kernel and add more files to make
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 		it easier for simple user space processes to extract
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) 		more information.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 		For each log entry (directory), there are the following
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) 		files:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) 		==============  ================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) 		id:		An ASCII representation of the ID of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) 				error log, in hex - e.g. "0x01".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) 		type:		An ASCII representation of the type id and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) 				description of the type of error log.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) 				Currently just "0x00 PEL" - platform error log.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) 				In the future there may be additional types.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) 		raw:		A read-only binary file that can be read
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) 				to get the raw log entry. These are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) 				<16kb, often just hundreds of bytes and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) 				"average" 2kb.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) 		acknowledge:	Writing 'ack' to this file will acknowledge
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) 				the error log to firmware (and in turn
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) 				the service processor, if applicable).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) 				Shortly after acknowledging it, the log
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) 				entry will be removed from sysfs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) 				Reading this file will list the supported
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) 				operations (currently just acknowledge).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) 		==============  ================================================