Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jan 2016 03:28:56 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r293303 - stable/10/sys/boot/efi/loader
Message-ID:  <201601070328.u073Sux6016777@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601070328.u073Sux6016777>