Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jan 2016 16:33:54 +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: r293162 - stable/10/sys/boot/amd64/efi
Message-ID:  <201601041633.u04GXsU3060194@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Mon Jan  4 16:33:54 2016
New Revision: 293162
URL: https://svnweb.freebsd.org/changeset/base/293162

Log:
  MFC r280351: Stop calling x86_efi_copyin and x86_efi_getdev directly
  
  In HEAD this is to help port loader.efi to both 32 and 64-bit ARM where
  we can use this file with minimal changes. Merged to stable/10 to
  simplify MFCs of later EFI commits.

Modified:
  stable/10/sys/boot/amd64/efi/bootinfo.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/amd64/efi/bootinfo.c
==============================================================================
--- stable/10/sys/boot/amd64/efi/bootinfo.c	Mon Jan  4 16:32:21 2016	(r293161)
+++ stable/10/sys/boot/amd64/efi/bootinfo.c	Mon Jan  4 16:33:54 2016	(r293162)
@@ -114,24 +114,24 @@ bi_copyenv(vm_offset_t start)
 	/* Traverse the environment. */
 	for (ep = environ; ep != NULL; ep = ep->ev_next) {
 		len = strlen(ep->ev_name);
-		if (x86_efi_copyin(ep->ev_name, addr, len) != len)
+		if (archsw.arch_copyin(ep->ev_name, addr, len) != len)
 			break;
 		addr += len;
-		if (x86_efi_copyin("=", addr, 1) != 1)
+		if (archsw.arch_copyin("=", addr, 1) != 1)
 			break;
 		addr++;
 		if (ep->ev_value != NULL) {
 			len = strlen(ep->ev_value);
-			if (x86_efi_copyin(ep->ev_value, addr, len) != len)
+			if (archsw.arch_copyin(ep->ev_value, addr, len) != len)
 				break;
 			addr += len;
 		}
-		if (x86_efi_copyin("", addr, 1) != 1)
+		if (archsw.arch_copyin("", addr, 1) != 1)
 			break;
 		last = ++addr;
 	}
 
-	if (x86_efi_copyin("", last++, 1) != 1)
+	if (archsw.arch_copyin("", last++, 1) != 1)
 		last = start;
 	return(last);
 }
@@ -155,7 +155,7 @@ bi_copyenv(vm_offset_t start)
 #define	COPY32(v, a, c) {					\
 	uint32_t x = (v);					\
 	if (c)							\
-		x86_efi_copyin(&x, a, sizeof(x));		\
+		archsw.arch_copyin(&x, a, sizeof(x));		\
 	a += sizeof(x);						\
 }
 
@@ -163,8 +163,8 @@ bi_copyenv(vm_offset_t start)
 	COPY32(t, a, c);					\
 	COPY32(strlen(s) + 1, a, c);				\
 	if (c)							\
-		x86_efi_copyin(s, a, strlen(s) + 1);		\
-	a += roundup(strlen(s) + 1, sizeof(uint64_t));		\
+		archsw.arch_copyin(s, a, strlen(s) + 1);	\
+	a += roundup(strlen(s) + 1, sizeof(u_long));		\
 }
 
 #define	MOD_NAME(a, s, c)	MOD_STR(MODINFO_NAME, a, s, c)
@@ -175,8 +175,8 @@ bi_copyenv(vm_offset_t start)
 	COPY32(t, a, c);					\
 	COPY32(sizeof(s), a, c);				\
 	if (c)							\
-		x86_efi_copyin(&s, a, sizeof(s));		\
-	a += roundup(sizeof(s), sizeof(uint64_t));		\
+		archsw.arch_copyin(&s, a, sizeof(s));		\
+	a += roundup(sizeof(s), sizeof(u_long));		\
 }
 
 #define	MOD_ADDR(a, s, c)	MOD_VAR(MODINFO_ADDR, a, s, c)
@@ -186,8 +186,8 @@ bi_copyenv(vm_offset_t start)
 	COPY32(MODINFO_METADATA | mm->md_type, a, c);		\
 	COPY32(mm->md_size, a, c);				\
 	if (c)							\
-		x86_efi_copyin(mm->md_data, a, mm->md_size);	\
-	a += roundup(mm->md_size, sizeof(uint64_t));		\
+		archsw.arch_copyin(mm->md_data, a, mm->md_size);	\
+	a += roundup(mm->md_size, sizeof(u_long));		\
 }
 
 #define	MOD_END(a, c) {						\
@@ -315,7 +315,7 @@ bi_load(char *args, vm_offset_t *modulep
 	 * tested/set by MI code before launching the kernel.
 	 */
 	rootdevname = getenv("rootdev");
-	x86_efi_getdev((void**)(&rootdev), rootdevname, NULL);
+	archsw.arch_getdev((void**)(&rootdev), rootdevname, NULL);
 	if (rootdev == NULL) {
 		printf("Can't determine root device.\n");
 		return(EINVAL);



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