diff options
| author | Toomas Soome <tsoome@me.com> | 2019-12-05 17:21:55 +0200 |
|---|---|---|
| committer | Toomas Soome <tsoome@me.com> | 2019-12-06 17:41:45 +0200 |
| commit | 5ac07b12fb4c39cb2415c0997f7c5b4dd5209f96 (patch) | |
| tree | e3df6df2674ce71f09f2256989ef1fdbda14abaa | |
| parent | 4d7988d6050abba5c1ff60e7fd196e95c22e20f4 (diff) | |
| download | illumos-joyent-5ac07b12fb4c39cb2415c0997f7c5b4dd5209f96.tar.gz | |
12058 loader.efi: use libi386/comconsole with x86
Reviewed by: John Levon <john.levon@joyent.com>
Approved by: Dan McDonald <danmcd@joyent.com>
| -rw-r--r-- | usr/src/boot/Makefile.version | 2 | ||||
| -rw-r--r-- | usr/src/boot/sys/boot/common/mb_header.S (renamed from usr/src/boot/sys/boot/common/multiboot.S) | 2 | ||||
| -rw-r--r-- | usr/src/boot/sys/boot/efi/loader/Makefile.com | 7 | ||||
| -rw-r--r-- | usr/src/boot/sys/boot/efi/loader/amd64/Makefile | 3 | ||||
| -rw-r--r-- | usr/src/boot/sys/boot/efi/loader/arch/amd64/ldscript.amd64 | 2 | ||||
| -rw-r--r-- | usr/src/boot/sys/boot/efi/loader/arch/i386/ldscript.i386 | 2 | ||||
| -rw-r--r-- | usr/src/boot/sys/boot/efi/loader/efiserialio.c (renamed from usr/src/boot/sys/boot/efi/loader/comconsole.c) | 6 | ||||
| -rw-r--r-- | usr/src/boot/sys/boot/efi/loader/i386/Makefile | 3 | ||||
| -rw-r--r-- | usr/src/boot/sys/boot/efi/loader/main.c | 2 | ||||
| -rw-r--r-- | usr/src/boot/sys/boot/i386/gptzfsboot/Makefile | 6 | ||||
| -rw-r--r-- | usr/src/boot/sys/boot/i386/isoboot/Makefile | 2 | ||||
| -rw-r--r-- | usr/src/boot/sys/boot/i386/libi386/comconsole.c | 9 |
12 files changed, 30 insertions, 16 deletions
diff --git a/usr/src/boot/Makefile.version b/usr/src/boot/Makefile.version index c4f359f686..284339de4d 100644 --- a/usr/src/boot/Makefile.version +++ b/usr/src/boot/Makefile.version @@ -33,4 +33,4 @@ LOADER_VERSION = 1.1 # Use date like formatting here, YYYY.MM.DD.XX, without leading zeroes. # The version is processed from left to right, the version number can only # be increased. -BOOT_VERSION = $(LOADER_VERSION)-2019.12.03.1 +BOOT_VERSION = $(LOADER_VERSION)-2019.12.05.1 diff --git a/usr/src/boot/sys/boot/common/multiboot.S b/usr/src/boot/sys/boot/common/mb_header.S index 391ccd76c3..411d126025 100644 --- a/usr/src/boot/sys/boot/common/multiboot.S +++ b/usr/src/boot/sys/boot/common/mb_header.S @@ -13,7 +13,7 @@ * Copyright 2018 Toomas Soome <tsoome@me.com> */ - .file "multiboot.s" + .file "mb_header.S" /* * Provide fake multiboot header to support versioning and partition diff --git a/usr/src/boot/sys/boot/efi/loader/Makefile.com b/usr/src/boot/sys/boot/efi/loader/Makefile.com index c0ce77d696..dd7141cf9c 100644 --- a/usr/src/boot/sys/boot/efi/loader/Makefile.com +++ b/usr/src/boot/sys/boot/efi/loader/Makefile.com @@ -32,7 +32,7 @@ SRCS= \ framebuffer.c \ main.c \ memmap.c \ - multiboot.S \ + mb_header.S \ multiboot2.c \ self_reloc.c \ smbios.c \ @@ -51,7 +51,7 @@ OBJS= \ framebuffer.o \ main.o \ memmap.o \ - multiboot.o \ + mb_header.o \ multiboot2.o \ self_reloc.o \ smbios.o \ @@ -177,9 +177,6 @@ clean clobber: %.o: ../../../common/linenoise/%.c $(COMPILE.c) $< -%.o: ../../../i386/libi386/%.c - $(COMPILE.c) $< - %.o: $(SRC)/common/font/%.c $(COMPILE.c) $< diff --git a/usr/src/boot/sys/boot/efi/loader/amd64/Makefile b/usr/src/boot/sys/boot/efi/loader/amd64/Makefile index 109d651772..8022b364f2 100644 --- a/usr/src/boot/sys/boot/efi/loader/amd64/Makefile +++ b/usr/src/boot/sys/boot/efi/loader/amd64/Makefile @@ -31,3 +31,6 @@ CCASFLAGS += -m64 CLEANFILES += machine x86 $(EFIPROG) $(OBJS): machine x86 + +%.o: ../../../i386/libi386/%.c + $(COMPILE.c) $< diff --git a/usr/src/boot/sys/boot/efi/loader/arch/amd64/ldscript.amd64 b/usr/src/boot/sys/boot/efi/loader/arch/amd64/ldscript.amd64 index e2374317fc..c37f655e52 100644 --- a/usr/src/boot/sys/boot/efi/loader/arch/amd64/ldscript.amd64 +++ b/usr/src/boot/sys/boot/efi/loader/arch/amd64/ldscript.amd64 @@ -9,7 +9,7 @@ SECTIONS .hash : { *(.hash) } /* this MUST come first! */ . = ALIGN(4096); .text : { - multiboot.o(.text) + mb_header.o(.text) *(.text .stub .text.* .gnu.linkonce.t.*) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) diff --git a/usr/src/boot/sys/boot/efi/loader/arch/i386/ldscript.i386 b/usr/src/boot/sys/boot/efi/loader/arch/i386/ldscript.i386 index 1e68826ed7..735fe77158 100644 --- a/usr/src/boot/sys/boot/efi/loader/arch/i386/ldscript.i386 +++ b/usr/src/boot/sys/boot/efi/loader/arch/i386/ldscript.i386 @@ -9,7 +9,7 @@ SECTIONS . = SIZEOF_HEADERS; . = ALIGN(4096); .text : { - multiboot.o(.text) + mb_header.o(.text) *(.text .stub .text.* .gnu.linkonce.t.*) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) diff --git a/usr/src/boot/sys/boot/efi/loader/comconsole.c b/usr/src/boot/sys/boot/efi/loader/efiserialio.c index c0f8669efe..9d22a5b319 100644 --- a/usr/src/boot/sys/boot/efi/loader/comconsole.c +++ b/usr/src/boot/sys/boot/efi/loader/efiserialio.c @@ -23,6 +23,12 @@ * SUCH DAMAGE. */ +/* + * We do not use this implementation with x86 till we can fix two issues: + * 1. Reliably identify the serial ports in correct order. + * 2. Ensure we get properly working reads from serial io. + */ + #include <sys/cdefs.h> #include <stand.h> diff --git a/usr/src/boot/sys/boot/efi/loader/i386/Makefile b/usr/src/boot/sys/boot/efi/loader/i386/Makefile index e0cb936fd5..42885ca81f 100644 --- a/usr/src/boot/sys/boot/efi/loader/i386/Makefile +++ b/usr/src/boot/sys/boot/efi/loader/i386/Makefile @@ -31,3 +31,6 @@ CCASFLAGS += -m32 CLEANFILES += machine x86 $(EFIPROG) $(OBJS): machine x86 + +%.o: ../../../i386/libi386/%.c + $(COMPILE.c) $< diff --git a/usr/src/boot/sys/boot/efi/loader/main.c b/usr/src/boot/sys/boot/efi/loader/main.c index 9be26a8b88..3fd902e78a 100644 --- a/usr/src/boot/sys/boot/efi/loader/main.c +++ b/usr/src/boot/sys/boot/efi/loader/main.c @@ -81,7 +81,7 @@ efi_zfs_is_preferred(EFI_HANDLE *h) EFI_DEVICE_PATH *devpath, *dp, *node; HARDDRIVE_DEVICE_PATH *hd; bool ret; - extern UINT64 start_sector; /* from multiboot.S */ + extern UINT64 start_sector; /* from mb_header.S */ /* This check is true for chainloader case. */ if (h == img->DeviceHandle) diff --git a/usr/src/boot/sys/boot/i386/gptzfsboot/Makefile b/usr/src/boot/sys/boot/i386/gptzfsboot/Makefile index b7a73288cc..6a16e62d8a 100644 --- a/usr/src/boot/sys/boot/i386/gptzfsboot/Makefile +++ b/usr/src/boot/sys/boot/i386/gptzfsboot/Makefile @@ -62,7 +62,7 @@ all: $(PROG) install: all $(ROOTBOOTPROG) -OBJS = multiboot.o zfsboot.o sio.o cons.o devopen.o \ +OBJS = mb_header.o zfsboot.o sio.o cons.o devopen.o \ part.o disk.o bcache.o zfs_cmd.o part.o := CPPFLAGS += -I$(ZLIB) @@ -108,8 +108,8 @@ $(OBJS): machine x86 %.o: ../../common/%.c $(COMPILE.c) $< -multiboot.o: ../../common/multiboot.S - $(COMPILE.S) ../../common/multiboot.S +%.o: ../../common/%.S + $(COMPILE.S) $< clobber: clean diff --git a/usr/src/boot/sys/boot/i386/isoboot/Makefile b/usr/src/boot/sys/boot/i386/isoboot/Makefile index f89cea7441..2a0992e5cc 100644 --- a/usr/src/boot/sys/boot/i386/isoboot/Makefile +++ b/usr/src/boot/sys/boot/i386/isoboot/Makefile @@ -56,7 +56,7 @@ all: $(PROG) install: all $(ROOTBOOTPROG) -OBJS= multiboot.o isoboot.o sio.o drv.o cons.o gptldr.o +OBJS= mb_header.o isoboot.o sio.o drv.o cons.o gptldr.o CLEANFILES += isoboot diff --git a/usr/src/boot/sys/boot/i386/libi386/comconsole.c b/usr/src/boot/sys/boot/i386/libi386/comconsole.c index c5f8b992ce..4c351d16bf 100644 --- a/usr/src/boot/sys/boot/i386/libi386/comconsole.c +++ b/usr/src/boot/sys/boot/i386/libi386/comconsole.c @@ -23,6 +23,11 @@ * SUCH DAMAGE. */ +/* + * This code is shared on BIOS and UEFI systems on x86 because + * we can access io ports on both platforms and the UEFI Serial IO protocol + * is not giving us reliable port order and we see issues with input. + */ #include <sys/cdefs.h> #include <stand.h> @@ -495,7 +500,7 @@ comc_rtsdtr_set(struct env_var *ev, int flags, const void *value) static uint32_t comc_parse_pcidev(const char *string) { -#ifdef NO_PCI +#ifdef EFI (void) string; return (0); #else @@ -539,7 +544,7 @@ comc_parse_pcidev(const char *string) static int comc_pcidev_handle(struct console *cp, uint32_t locator) { -#ifdef NO_PCI +#ifdef EFI (void) cp; (void) locator; return (CMD_ERROR); |
