Date: Tue, 21 Feb 2023 20:05:56 -0800 From: John-Mark Gurney <jmg@funkthat.com> To: freebsd-arch@FreeBSD.org Subject: making identify_hypervisor arch independent Message-ID: <20230222040556.GP95670@funkthat.com>
next in thread | raw e-mail | index | archive | help
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."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20230222040556.GP95670>