Bug 1509938

Summary: python-dmidecode provides no information on aarch64 and raises some warnings
Product: Red Hat Enterprise Linux 7 Reporter: Lukáš Doktor <ldoktor>
Component: python-dmidecodeAssignee: lijiang
Status: CLOSED WONTFIX QA Contact: Mike Gahagan <mgahagan>
Severity: high Docs Contact:
Priority: high    
Version: 7.4CC: jbastian, lijiang, yselkowi
Target Milestone: rc   
Target Release: 7.6   
Hardware: aarch64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-27 00:46:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1498541, 1540294, 1566707, 1566708, 1568722    

Description Lukáš Doktor 2017-11-06 11:55:47 UTC
Description of problem:
The python-dmidecode returns empty dicts instead of the expected information and raises some odd warnings on exit. The dmidecode itself works well.

Version-Release number of selected component (if applicable):
python-dmidecode-3.12.2-1.el7.aarch64

How reproducible:
Always

Steps to Reproduce:
python
Python 2.7.5 (default, May  3 2017, 08:00:59) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-14)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import dmidecode
>>> dmidecode.bios()

Actual results:
{}
>>> 

** COLLECTED WARNINGS **
/sys/firmware/efi/systab: SMBIOS entry point missing
No SMBIOS nor DMI entry point found, sorry.
Permission denied to memory file/device (/dev/mem)
Permission denied to memory file/device (/dev/mem)
** END OF WARNINGS **

Expected results:
dict with the data available from `dmidecode`

Additional info:
The `dmidecode` works well on that machine:

# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 3.0.0 present.
Table at 0x4FF79E0000.

Handle 0x0000, DMI type 7, 19 bytes
Cache Information
        Socket Designation: L1-Cache
        Configuration: Enabled, Socketed, Level 1
...

Comment 2 Mike Gahagan 2017-11-14 20:05:12 UTC
This would be due to access to /dev/mem is only allowed on x86. I think /sys/firmware/dmi is the proper pseudofile to use.

Comment 3 Jeff Bastian 2017-11-14 20:55:31 UTC
The /sys/firmware/dmi tree is actually a series of files, one per DMI type, that make parsing much easier.  For example:

[root@hp-moonshot-03-c01 ~]# strings /sys/firmware/dmi/entries/1-0/raw
\jKY
ProLiant m400 Server
CN7506VB0T
721717-B21
ProLiant


[root@hp-moonshot-03-c01 ~]# strings /sys/firmware/dmi/entries/4-0/raw
`	`	A
Proc 1
AppliedMicro
X-Gene

Comment 4 lijiang 2018-03-22 06:37:06 UTC
see bug 1456956, "/dev/mem" is disabled for aarch64. It doesn't try to read "/sys/firmware/dmi/tables/DMI" and "/sys/firmware/dmi/tables/smbios_entry_point".

Comment 5 lijiang 2018-03-27 00:46:52 UTC
(In reply to lijiang from comment #4)
> see bug 1456956, "/dev/mem" is disabled for aarch64. It doesn't try to read
> "/sys/firmware/dmi/tables/DMI" and
> "/sys/firmware/dmi/tables/smbios_entry_point".

In addition, Our previous submission of patch has never responded, and it looks like the upstream doesn't maintain the project(python-dmidecode). So i recommend dmidecode.