Author Topic: dmidecode and UEFI  (Read 705 times)

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 867
  • Karma: +22/-0
    • View Profile
    • Blonde Guy
dmidecode and UEFI
« on: November 24, 2022, 08:44:39 pm »
When we look at hardware, one of the tools we use is dmidecode.exe (version 2.12) This tool displays a wealth of information about the system, and we use it to fill out hardware reports for the wiki.

https://www.os2world.com/wiki/index.php/Extracting_Hardware_Information_from_ArcaOS_and_OS/2

With UEFI support coming in ArcaOS 5.1, our port of dmidecode isn't working any more. We need dmidecode v3, apparently, which uses the UEFI to display the system information. I'm curious to know if anyone has looked into what would be required to port dmidecode v3.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Andy Willis

  • Sr. Member
  • ****
  • Posts: 250
  • Karma: +2/-0
    • View Profile
Re: dmidecode and UEFI
« Reply #1 on: November 24, 2022, 10:59:05 pm »
I've long ago ported v3.
https://github.com/abwillis/dmidecode
However, I have not yet gotten UEFI support worked out. 

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3759
  • Karma: +36/-0
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: dmidecode and UEFI
« Reply #2 on: November 24, 2022, 11:15:27 pm »
Hi Andy

Do you have any binary release of version 3 to give it a try?

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Tom

  • Full Member
  • ***
  • Posts: 130
  • Karma: +1/-0
    • View Profile
Re: dmidecode and UEFI
« Reply #3 on: November 24, 2022, 11:31:11 pm »
Hi Andy

Do you have any binary release of version 3 to give it a try?

Regards

On https://github.com/abwillis/dmidecode/releases it says "There aren't any releases here".
Source code is available (see e.g. https://github.com/abwillis/dmidecode/archive/refs/tags/dmidecode-3-3.zip), so maybe someone can try to compile that.

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 867
  • Karma: +22/-0
    • View Profile
    • Blonde Guy
Re: dmidecode and UEFI
« Reply #4 on: November 25, 2022, 05:34:16 am »
I've long ago ported v3.
https://github.com/abwillis/dmidecode
However, I have not yet gotten UEFI support worked out.

What are the obstacles? It looks to me like you need to have part running on the UEFI boot environment that leaves DMI data for the dmidecode to read (and decode).
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Andy Willis

  • Sr. Member
  • ****
  • Posts: 250
  • Karma: +2/-0
    • View Profile
Re: dmidecode and UEFI
« Reply #5 on: November 27, 2022, 11:13:32 pm »
I just found that dmidecode does work with UEFI with CSM enabled, but does not find the entry point without the CSM enabled.  Here is a 3.4 build for those interested in it.

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 867
  • Karma: +22/-0
    • View Profile
    • Blonde Guy
Re: dmidecode and UEFI
« Reply #6 on: November 28, 2022, 03:23:37 pm »
I found out that David A. smbios.dll, which is not yet generally available, is intended to find the entry point in all cases, even where CSM is not available.

I tested dmidecode with UEFI boot on, but CSM also on. This dmidecode works well. So does dmidecode 2.12.
« Last Edit: November 28, 2022, 07:35:12 pm by Neil Waldhauer »
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3759
  • Karma: +36/-0
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: dmidecode and UEFI
« Reply #7 on: November 28, 2022, 04:50:43 pm »
Thanks Andy

Is it ok if I upload the attached file to hobbes? I added the man files and a basic readme.

Reagards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

David McKenna

  • Sr. Member
  • ****
  • Posts: 474
  • Karma: +18/-0
    • View Profile
Re: dmidecode and UEFI
« Reply #8 on: November 29, 2022, 01:55:25 am »
 Thanks Andy, 3.4 works well here on my UEFI with CSM system.

Regards,

Andy Willis

  • Sr. Member
  • ****
  • Posts: 250
  • Karma: +2/-0
    • View Profile
Re: dmidecode and UEFI
« Reply #9 on: November 30, 2022, 02:29:27 am »
Thanks Andy

Is it ok if I upload the attached file to hobbes? I added the man files and a basic readme.

Reagards

Sure, there is not a lot of difference for us from version 2 but certainly no reason I can think of to not do so.

Andy Willis

  • Sr. Member
  • ****
  • Posts: 250
  • Karma: +2/-0
    • View Profile
Re: dmidecode and UEFI
« Reply #10 on: November 30, 2022, 02:32:56 am »
I've long ago ported v3.
https://github.com/abwillis/dmidecode
However, I have not yet gotten UEFI support worked out.

What are the obstacles? It looks to me like you need to have part running on the UEFI boot environment that leaves DMI data for the dmidecode to read (and decode).

I had been trying to work it in util.c... which may well be doable but looking at it again, I think that testcfg.sys may be the more appropriate place to update... though I am not sure how to do it at this point.