git: bab80c12a852 - main - stand: Move eficom to libefi

From: Warner Losh <imp_at_FreeBSD.org>
Date: Thu, 11 May 2023 20:06:49 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=bab80c12a852928b572293f34210c5a19aeba17a

commit bab80c12a852928b572293f34210c5a19aeba17a
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2023-05-11 20:03:42 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-05-11 20:06:03 +0000

    stand: Move eficom to libefi
    
    Rename efiserialc to eficom.c and move it to libefi. Remove
    loader.efi.h, since it's not needed. It's architecture independent
    (though how we use it might vary). Drivers also belong in libfoo
    in the boot loader: all the BIOS drivers are in i386/libi386 and
    the console driver is in efi/libefi.
    
    Sponsored by:           Netflix
    Reviewed by:            tsoome
    Differential Revision:  https://reviews.freebsd.org/D40007
---
 stand/efi/libefi/Makefile                           | 1 +
 stand/efi/{loader/efiserialio.c => libefi/eficom.c} | 2 --
 stand/efi/loader/arch/amd64/Makefile.inc            | 1 -
 stand/efi/loader/arch/arm/Makefile.inc              | 1 -
 stand/efi/loader/arch/arm64/Makefile.inc            | 1 -
 stand/efi/loader/arch/riscv/Makefile.inc            | 1 -
 6 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/stand/efi/libefi/Makefile b/stand/efi/libefi/Makefile
index 8f1a30d86900..51970397fd86 100644
--- a/stand/efi/libefi/Makefile
+++ b/stand/efi/libefi/Makefile
@@ -11,6 +11,7 @@ SRCS=	delay.c \
 	efi_console.c \
 	efi_driver_utils.c \
 	efichar.c \
+	eficom.c \
 	efienv.c \
 	efihttp.c \
 	efinet.c \
diff --git a/stand/efi/loader/efiserialio.c b/stand/efi/libefi/eficom.c
similarity index 99%
rename from stand/efi/loader/efiserialio.c
rename to stand/efi/libefi/eficom.c
index 16f28080f80e..67f29ad99ea8 100644
--- a/stand/efi/loader/efiserialio.c
+++ b/stand/efi/libefi/eficom.c
@@ -34,8 +34,6 @@ __FBSDID("$FreeBSD$");
 #include <efi.h>
 #include <efilib.h>
 
-#include "loader_efi.h"
-
 static EFI_GUID serial = SERIAL_IO_PROTOCOL;
 
 #define	COMC_TXWAIT	0x40000		/* transmit timeout */
diff --git a/stand/efi/loader/arch/amd64/Makefile.inc b/stand/efi/loader/arch/amd64/Makefile.inc
index bd89044bd6c7..0d9e2648cb59 100644
--- a/stand/efi/loader/arch/amd64/Makefile.inc
+++ b/stand/efi/loader/arch/amd64/Makefile.inc
@@ -5,7 +5,6 @@ SRCS+=	amd64_tramp.S \
 	elf64_freebsd.c \
 	trap.c \
 	multiboot2.c \
-	efiserialio.c \
 	exc.S
 
 .PATH:	${BOOTSRC}/i386/libi386
diff --git a/stand/efi/loader/arch/arm/Makefile.inc b/stand/efi/loader/arch/arm/Makefile.inc
index 284e517bfbb8..74e6616e991b 100644
--- a/stand/efi/loader/arch/arm/Makefile.inc
+++ b/stand/efi/loader/arch/arm/Makefile.inc
@@ -1,7 +1,6 @@
 # $FreeBSD$
 
 SRCS+=	exec.c \
-	efiserialio.c \
 	start.S
 
 HAVE_FDT=yes
diff --git a/stand/efi/loader/arch/arm64/Makefile.inc b/stand/efi/loader/arch/arm64/Makefile.inc
index 9978d9c4ea9c..a71bcc2e1a1f 100644
--- a/stand/efi/loader/arch/arm64/Makefile.inc
+++ b/stand/efi/loader/arch/arm64/Makefile.inc
@@ -3,7 +3,6 @@
 HAVE_FDT=yes
 
 SRCS+=	exec.c \
-	efiserialio.c \
 	start.S
 
 .PATH:	${BOOTSRC}/arm64/libarm64
diff --git a/stand/efi/loader/arch/riscv/Makefile.inc b/stand/efi/loader/arch/riscv/Makefile.inc
index 333b789e935d..032c8a43bd51 100644
--- a/stand/efi/loader/arch/riscv/Makefile.inc
+++ b/stand/efi/loader/arch/riscv/Makefile.inc
@@ -3,5 +3,4 @@
 HAVE_FDT=yes
 
 SRCS+=	exec.c \
-	efiserialio.c \
 	start.S