patchdmidecode - Patches: patch #9524, Enable representation of system...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #9524: Enable representation of system event logs reported by BIOS

Submitter:  Michael Shych <mshych>
Submitted:  Thu 21 Dec 2017 01:38:59 PM UTC
 
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Fri 30 Jul 2021 03:06:48 PM UTC, comment #2: 

I feel ashamed that I did not learn about this until today, but it turns out that a kernel-based implementation of this exists for 10 years already. It was added by Mike Waychison (Google) in February 2011:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=a3857a5c9893aa69d44be6e881927b0950b1d931

So it should be pretty easy to let dmidecode read the system event log from file /sys/firmware/dmi/entries/15-0/system_event_log/raw_event_log when that file is present.

Jean Delvare <khali>
Project Administrator
Tue 23 Mar 2021 08:39:37 AM UTC, comment #1: 

Thanks for your contribution. There are several issues with your patch.

1* We have a utility function for reading from /dev/mem in util.c (mem_chunk). You should use that instead of open-coding the same.

2* Your code is executed unconditionally while there are several conditions which must be met for it to work. Specifically, it only works if the log access method is through a Memory-mapped physical 32-bit address (Access Method = 0x03). Also, it can only work if decoding the DMI table of the local machine, so it should be skipped when reading from a dump file. Lastly, we may have to check the "Log area valid" bit before decoding the error log, although the spec says this bit may not always be up-to-date, so I'm not really sure what do to about it.

3* Your code relies on being able to read an arbitrary portion of /dev/mem from userspace. The Linux ecosystem is currently moving away from this approach. The DMI table itself is now read from sysfs, not /dev/mem, whenever possible. Many systems have /dev/mem access restrictions in place nowadays, some don't even have /dev/mem any more.

4* Supporting the other access methods would require poking at I/O ports from userspace. I am not sure if this can be done reliably.

Jean Delvare <khali>
Project Administrator
Thu 21 Dec 2017 01:38:59 PM UTC, original submission:  

Good day,

Proposed dmidecode patch enables representation of
system event logs reported by BIOS.
System Event Log representation is done according to SMBIOS
specification 3.1.1 DMTF DSP0134, paragraph 7.16
( System Event Log (Type15) ).
It was verified with several AMI BIOSes.
Attached is dmidecode patch and 2 logs that shows
System Event logs in BIOS setup and then these logs
shown by patched dmidecode from Linux.

Thank you,
   Michael.

Michael Shych <mshych>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #42696:  dmidecode_bios_logs_support.patch added by mshych (2KiB - application/octet-stream - Dmidecode patch and 2 example logs with different BIOSes)
file #42697:  old_ivy_bridge_logs.txt added by mshych (8KiB - text/plain - Dmidecode patch and 2 example logs with different BIOSes)
file #42698:  new_atom_rangeley_logs.txt added by mshych (10KiB - text/plain - Dmidecode patch and 2 example logs with different BIOSes)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by khali (Posted a comment)
  • -email is unavailable- added by mshych (Submitted the item)
  • -email is unavailable- added by mshych
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-12-21 mshych Attached File- Added dmidecode_bios_logs_support.patch, #42696
        Attached File- Added old_ivy_bridge_logs.txt, #42697
        Attached File- Added new_atom_rangeley_logs.txt, #42698
        Carbon-Copy- Added mshych

    Back to the top


    Powered by Savane 3.9