svn commit: r293303 - stable/10/sys/boot/efi/loader
Ed Maste
emaste at FreeBSD.org
Thu Jan 7 03:28:57 UTC 2016
Author: emaste
Date: Thu Jan 7 03:28:56 2016
New Revision: 293303
URL: https://svnweb.freebsd.org/changeset/base/293303
Log:
MFC r281138: SMBIOS support for EFI
Restore smbios support lost in r293297
Modified:
stable/10/sys/boot/efi/loader/Makefile
stable/10/sys/boot/efi/loader/main.c
Modified: stable/10/sys/boot/efi/loader/Makefile
==============================================================================
--- stable/10/sys/boot/efi/loader/Makefile Thu Jan 7 02:45:41 2016 (r293302)
+++ stable/10/sys/boot/efi/loader/Makefile Thu Jan 7 03:28:56 2016 (r293303)
@@ -20,9 +20,12 @@ SRCS= autoload.c \
copy.c \
devicename.c \
main.c \
+ smbios.c \
vers.c
.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}
+# For smbios.c
+.PATH: ${.CURDIR}/../../i386/libi386
.include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc"
CFLAGS+= -fPIC
@@ -32,7 +35,8 @@ CFLAGS+= -I${.CURDIR}/../include
CFLAGS+= -I${.CURDIR}/../include/${MACHINE_CPUARCH}
CFLAGS+= -I${.CURDIR}/../../../contrib/dev/acpica/include
CFLAGS+= -I${.CURDIR}/../../..
-CFLAGS+= -DNO_PCI
+CFLAGS+= -I${.CURDIR}/../../i386/libi386
+CFLAGS+= -DNO_PCI -DEFI
.if ${MK_FORTH} != "no"
BOOT_FORTH= yes
Modified: stable/10/sys/boot/efi/loader/main.c
==============================================================================
--- stable/10/sys/boot/efi/loader/main.c Thu Jan 7 02:45:41 2016 (r293302)
+++ stable/10/sys/boot/efi/loader/main.c Thu Jan 7 03:28:56 2016 (r293303)
@@ -36,6 +36,8 @@ __FBSDID("$FreeBSD$");
#include <efilib.h>
#include <bootstrap.h>
+#include <smbios.h>
+
#include "loader_efi.h"
extern char bootprog_name[];
@@ -63,6 +65,7 @@ main(int argc, CHAR16 *argv[])
{
char vendor[128];
EFI_LOADED_IMAGE *img;
+ EFI_GUID *guid;
int i;
/*
@@ -128,6 +131,14 @@ main(int argc, CHAR16 *argv[])
archsw.arch_copyout = efi_copyout;
archsw.arch_readin = efi_readin;
+ for (i = 0; i < ST->NumberOfTableEntries; i++) {
+ guid = &ST->ConfigurationTable[i].VendorGuid;
+ if (!memcmp(guid, &smbios, sizeof(EFI_GUID))) {
+ smbios_detect(ST->ConfigurationTable[i].VendorTable);
+ break;
+ }
+ }
+
interact(); /* doesn't return */
return (EFI_SUCCESS); /* keep compiler happy */
More information about the svn-src-stable
mailing list