Page MenuHomeFreeBSD

D30007.diff
No OneTemporary

D30007.diff

diff --git a/sys/dev/ipmi/ipmi_isa.c b/sys/dev/ipmi/ipmi_isa.c
--- a/sys/dev/ipmi/ipmi_isa.c
+++ b/sys/dev/ipmi/ipmi_isa.c
@@ -38,6 +38,7 @@
#include <sys/module.h>
#include <sys/rman.h>
#include <sys/selinfo.h>
+#include <sys/efi.h>
#include <machine/pci_cfgreg.h>
#include <dev/pci/pcireg.h>
@@ -286,3 +287,6 @@
};
DRIVER_MODULE(ipmi_isa, isa, ipmi_isa_driver, ipmi_devclass, 0, 0);
+#ifdef ARCH_MAY_USE_EFI
+MODULE_DEPEND(ipmi_isa, efirt, 1, 1, 1);
+#endif
diff --git a/sys/dev/ipmi/ipmi_pci.c b/sys/dev/ipmi/ipmi_pci.c
--- a/sys/dev/ipmi/ipmi_pci.c
+++ b/sys/dev/ipmi/ipmi_pci.c
@@ -38,6 +38,7 @@
#include <sys/module.h>
#include <sys/rman.h>
#include <sys/selinfo.h>
+#include <sys/efi.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
@@ -292,3 +293,6 @@
};
DRIVER_MODULE(ipmi2_pci, pci, ipmi2_pci_driver, ipmi_devclass, 0, 0);
+#ifdef ARCH_MAY_USE_EFI
+MODULE_DEPEND(ipmi2_pci, efirt, 1, 1, 1);
+#endif
diff --git a/sys/dev/ipmi/ipmi_smbios.c b/sys/dev/ipmi/ipmi_smbios.c
--- a/sys/dev/ipmi/ipmi_smbios.c
+++ b/sys/dev/ipmi/ipmi_smbios.c
@@ -36,6 +36,7 @@
#include <sys/eventhandler.h>
#include <sys/kernel.h>
#include <sys/selinfo.h>
+#include <sys/efi.h>
#include <vm/vm.h>
#include <vm/pmap.h>
@@ -150,15 +151,27 @@
static void
ipmi_smbios_probe(struct ipmi_get_info *info)
{
+#ifdef ARCH_MAY_USE_EFI
+ struct uuid efi_smbios;
+ void *addr_efi;
+#endif
struct smbios_eps *header;
void *table;
u_int32_t addr;
+ addr = 0;
bzero(info, sizeof(struct ipmi_get_info));
- /* Find the SMBIOS table header. */
- addr = bios_sigsearch(SMBIOS_START, SMBIOS_SIG, SMBIOS_LEN,
- SMBIOS_STEP, SMBIOS_OFF);
+#ifdef ARCH_MAY_USE_EFI
+ efi_smbios = (struct uuid)EFI_TABLE_SMBIOS;
+ if (!efi_get_table(&efi_smbios, &addr_efi))
+ addr = (vm_paddr_t)addr_efi;
+#endif
+
+ if (addr == 0)
+ /* Find the SMBIOS table header. */
+ addr = bios_sigsearch(SMBIOS_START, SMBIOS_SIG, SMBIOS_LEN,
+ SMBIOS_STEP, SMBIOS_OFF);
if (addr == 0)
return;
diff --git a/sys/dev/ipmi/ipmi_smbus.c b/sys/dev/ipmi/ipmi_smbus.c
--- a/sys/dev/ipmi/ipmi_smbus.c
+++ b/sys/dev/ipmi/ipmi_smbus.c
@@ -38,6 +38,7 @@
#include <sys/module.h>
#include <sys/rman.h>
#include <sys/selinfo.h>
+#include <sys/efi.h>
#include <dev/smbus/smbconf.h>
#include <dev/smbus/smbus.h>
@@ -131,3 +132,6 @@
DRIVER_MODULE(ipmi_smbus, smbus, ipmi_smbus_driver, ipmi_devclass, 0, 0);
MODULE_DEPEND(ipmi_smbus, smbus, SMBUS_MINVER, SMBUS_PREFVER, SMBUS_MAXVER);
+#ifdef ARCH_MAY_USE_EFI
+MODULE_DEPEND(ipmi_smbus, efirt, 1, 1, 1);
+#endif

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 16, 3:59 PM (21 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15826976
Default Alt Text
D30007.diff (2 KB)

Event Timeline