making identify_hypervisor arch independent

From: John-Mark Gurney <jmg_at_funkthat.com>
Date: Wed, 22 Feb 2023 04:05:56 UTC
Hello,

I have a pending diff (https://reviews.freebsd.org/D38721) that will make
SMBIOS work on arm64 systems (specifically under qemu, but likely it may
add support for other EFI arm64 systems that have SMBIOS as well).

The goal is to support identifying that we are running as a guest under
QEMU so that we automatically switch to hz=100 on arm64.

Currently there is code in x86/x86/identcpu.c that has code to identify
hypervisers via SMBIOS, so I'd like to move most of identify_hypervisor
to a new location so that arm64 code can call it as well.

Where should I put it?  kern/subr_identsmbios.c?  And make it optional
on EFIRT for arm64 and standard on x86?

I briefly thought of dev/smbios, BUT, that brings up another issue,
I think we should deorbit dev/smbios, and move smbios.h to dev/ipmi,
because as far as I can tell, the device does nothing useful.  It
allocates the resource, but nothing that I can find in the tree attempts
to use/access the device, and it doesn't expose any interface.  The
header is only used by dev/ipmi for the structure, but not the device,
as ipmi does it's own parsing of the table.

All of the uses of smbios data is getting it via kenv which is populated
via loader (libsa).

Thanks.

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."