From owner-svn-src-head@freebsd.org Sat Dec 19 19:01:44 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEE54A4C94D; Sat, 19 Dec 2015 19:01:44 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A08DF186C; Sat, 19 Dec 2015 19:01:44 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBJJ1hr5013788; Sat, 19 Dec 2015 19:01:43 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBJJ1hEP013786; Sat, 19 Dec 2015 19:01:43 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201512191901.tBJJ1hEP013786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 19 Dec 2015 19:01:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292472 - in head/sys: amd64/amd64 sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Dec 2015 19:01:44 -0000 Author: imp Date: Sat Dec 19 19:01:43 2015 New Revision: 292472 URL: https://svnweb.freebsd.org/changeset/base/292472 Log: Save the physical address passed into the kernel of the UEFI system table. Modified: head/sys/amd64/amd64/machdep.c head/sys/sys/efi.h Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sat Dec 19 19:01:42 2015 (r292471) +++ head/sys/amd64/amd64/machdep.c Sat Dec 19 19:01:43 2015 (r292472) @@ -188,6 +188,12 @@ extern char kernphys[]; struct msgbuf *msgbufp; +/* + * Physical address of the EFI System Table. Stashed from the metadata hints + * passed into the kernel and used by the EFI code to call runtime services. + */ +vm_paddr_t efi_systbl; + /* Intel ICH registers */ #define ICH_PMBASE 0x400 #define ICH_SMI_EN ICH_PMBASE + 0x30 @@ -1495,6 +1501,7 @@ native_parse_preload_data(u_int64_t modu ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t); db_fetch_ksymtab(ksym_start, ksym_end); #endif + efi_systbl = MD_FETCH(kmdp, MODINFOMD_FW_HANDLE, vm_paddr_t); return (kmdp); } @@ -1615,6 +1622,8 @@ hammer_time(u_int64_t modulep, u_int64_t /* * Use vt(4) by default for UEFI boot (during the sc(4)/vt(4) * transition). + * Once bootblocks have updated, we can test directly for + * efi_systbl != NULL here... */ if (preload_search_info(kmdp, MODINFO_METADATA | MODINFOMD_EFI_MAP) != NULL) Modified: head/sys/sys/efi.h ============================================================================== --- head/sys/sys/efi.h Sat Dec 19 19:01:42 2015 (r292471) +++ head/sys/sys/efi.h Sat Dec 19 19:01:43 2015 (r292472) @@ -151,4 +151,5 @@ struct efi_systbl { uint64_t st_cfgtbl; }; +extern vm_paddr_t efi_systbl; #endif /* _SYS_EFI_H_ */