diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2017-08-18 11:51:36 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2017-08-18 11:51:36 +0000 |
commit | 39be65ac4665b9228d3501281a7fbeee4fa189fd (patch) | |
tree | d7376923e6e17656445ccd0d3a963bcd0f926d8f /usr/src | |
parent | ac90a18349ad21775b962971502e0fb76a4fa237 (diff) | |
parent | fdbb9738bc3cf273d0d8898e2f45f1bb76adff81 (diff) | |
download | illumos-joyent-39be65ac4665b9228d3501281a7fbeee4fa189fd.tar.gz |
[illumos-gate merge]
commit fdbb9738bc3cf273d0d8898e2f45f1bb76adff81
8442 uts: startup_bios_disk() should check for BIOS
8581 uts: startup_bios_disk() is testing for unused variable dobiosdev
commit 8f982633e2a3337f8fd33e7d2282967b05dac29c
8443 uts: progressbar_init() should check for BIOS
commit c66b891e50e71459cdb8d5d207e3aa739ba80969
8444 uts: set_console_mode() should check for BIOS
commit d75f417626bf969b9b5cad8f516067af1c886b5c
8549 svc:/system/pools/dynamic manifest and method are in the service/resource-pools package instead of service/resource-pools/poold
commit 46f02cd8618751466de9f5d6cc8ab2af5cc76ff3
8092 loader.efi: set console mode early in efi_main()
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/boot/sys/boot/efi/libefi/libefi.c | 29 | ||||
-rw-r--r-- | usr/src/boot/sys/boot/efi/loader/main.c | 2 | ||||
-rw-r--r-- | usr/src/pkg/manifests/service-resource-pools-poold.mf | 8 | ||||
-rw-r--r-- | usr/src/pkg/manifests/service-resource-pools.mf | 3 | ||||
-rw-r--r-- | usr/src/uts/i86pc/os/biosdisk.c | 4 | ||||
-rw-r--r-- | usr/src/uts/i86pc/os/ddi_impl.c | 2 | ||||
-rw-r--r-- | usr/src/uts/i86pc/os/graphics.c | 2 | ||||
-rw-r--r-- | usr/src/uts/i86pc/os/mlsetup.c | 17 |
8 files changed, 50 insertions, 17 deletions
diff --git a/usr/src/boot/sys/boot/efi/libefi/libefi.c b/usr/src/boot/sys/boot/efi/libefi/libefi.c index 77e8be96f1..8bc614af45 100644 --- a/usr/src/boot/sys/boot/efi/libefi/libefi.c +++ b/usr/src/boot/sys/boot/efi/libefi/libefi.c @@ -25,7 +25,6 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); #include <efi.h> #include <eficonsctl.h> @@ -89,6 +88,8 @@ efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table) EFI_LOADED_IMAGE *img; CHAR16 *argp, *args, **argv; EFI_STATUS status; + SIMPLE_TEXT_OUTPUT_INTERFACE *conout; + UINTN i, max_dim, best_mode, cols, rows; int argc, addprog; IH = image_handle; @@ -102,6 +103,20 @@ efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table) (void)console_control->SetMode(console_control, EfiConsoleControlScreenText); + conout = ST->ConOut; + max_dim = best_mode = 0; + for (i = 0; i <= conout->Mode->MaxMode ; i++) { + status = conout->QueryMode(conout, i, &cols, &rows); + if (EFI_ERROR(status)) + continue; + if (cols * rows > max_dim) { + max_dim = cols * rows; + best_mode = i; + } + } + if (max_dim > 0) + conout->SetMode(conout, best_mode); + heapsize = 64 * 1024 * 1024; /* 4GB upper limit, try to leave some space from 1MB */ heap = 0x0000000100000000; @@ -112,6 +127,18 @@ efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table) setheap((void *)(uintptr_t)heap, (void *)(uintptr_t)(heap + heapsize)); + status = conout->QueryMode(conout, best_mode, &cols, &rows); + if (EFI_ERROR(status)) { + setenv("LINES", "24", 1); + setenv("COLUMNS", "80", 1); + } else { + char buf[8]; + snprintf(buf, sizeof (buf), "%u", (unsigned)rows); + setenv("LINES", buf, 1); + snprintf(buf, sizeof (buf), "%u", (unsigned)cols); + setenv("COLUMNS", buf, 1); + } + /* Use exit() from here on... */ status = BS->HandleProtocol(IH, &image_protocol, (VOID**)&img); diff --git a/usr/src/boot/sys/boot/efi/loader/main.c b/usr/src/boot/sys/boot/efi/loader/main.c index 22fd9e9b62..269f7dfaeb 100644 --- a/usr/src/boot/sys/boot/efi/loader/main.c +++ b/usr/src/boot/sys/boot/efi/loader/main.c @@ -409,8 +409,6 @@ main(int argc, CHAR16 *argv[]) } efi_init_environment(); - setenv("LINES", "24", 1); /* optional */ - setenv("COLUMNS", "80", 1); /* optional */ setenv("ISADIR", "amd64", 1); /* we only build 64bit */ acpi_detect(); diff --git a/usr/src/pkg/manifests/service-resource-pools-poold.mf b/usr/src/pkg/manifests/service-resource-pools-poold.mf index 28abe1ac18..ca57697d5b 100644 --- a/usr/src/pkg/manifests/service-resource-pools-poold.mf +++ b/usr/src/pkg/manifests/service-resource-pools-poold.mf @@ -28,10 +28,18 @@ set name=pkg.description value="core software for dynamic resource pools" set name=pkg.summary value="Dynamic Resource Pools" set name=info.classification value=org.opensolaris.category.2008:System/Core set name=variant.arch value=$(ARCH) +dir path=lib variant.opensolaris.zone=global +dir path=lib/svc variant.opensolaris.zone=global +dir path=lib/svc/manifest group=sys variant.opensolaris.zone=global +dir path=lib/svc/manifest/system group=sys variant.opensolaris.zone=global +dir path=lib/svc/method variant.opensolaris.zone=global dir path=usr group=sys dir path=usr/lib dir path=usr/lib/pool dir path=usr/share/man/man1m +file path=lib/svc/manifest/system/poold.xml group=sys mode=0444 \ + variant.opensolaris.zone=global +file path=lib/svc/method/svc-poold mode=0555 variant.opensolaris.zone=global file path=usr/lib/pool/JPool.jar mode=0444 file path=usr/lib/pool/libjkstat.so.1 file path=usr/lib/pool/libjlgrp.so.1 diff --git a/usr/src/pkg/manifests/service-resource-pools.mf b/usr/src/pkg/manifests/service-resource-pools.mf index 113500a2e4..a3ba7d20ec 100644 --- a/usr/src/pkg/manifests/service-resource-pools.mf +++ b/usr/src/pkg/manifests/service-resource-pools.mf @@ -57,11 +57,8 @@ dir path=var group=sys variant.opensolaris.zone=global dir path=var/adm/pool group=sys variant.opensolaris.zone=global dir path=var/log/pool group=sys variant.opensolaris.zone=global driver name=pool perms="pool 0666 root sys" perms="poolctl 0666 root sys" -file path=lib/svc/manifest/system/poold.xml group=sys mode=0444 \ - variant.opensolaris.zone=global file path=lib/svc/manifest/system/pools.xml group=sys mode=0444 \ variant.opensolaris.zone=global -file path=lib/svc/method/svc-poold mode=0555 variant.opensolaris.zone=global file path=lib/svc/method/svc-pools mode=0555 variant.opensolaris.zone=global file path=usr/bin/poolstat mode=0555 file path=usr/include/pool.h diff --git a/usr/src/uts/i86pc/os/biosdisk.c b/usr/src/uts/i86pc/os/biosdisk.c index 297fbcdfbc..14f25f96ac 100644 --- a/usr/src/uts/i86pc/os/biosdisk.c +++ b/usr/src/uts/i86pc/os/biosdisk.c @@ -61,7 +61,6 @@ int biosdebug = 0; #endif biosdev_data_t biosdev_info[BIOSDEV_NUM]; /* from 0x80 to 0x87 */ -int dobiosdev = 1; static int bios_check_extension_present(uchar_t); @@ -82,9 +81,6 @@ startup_bios_disk() dev_info_t *devi; int extensions; - if (dobiosdev == 0) - return; - for (drivenum = 0x80; drivenum < (0x80 + BIOSDEV_NUM); drivenum++) { if (!drive_present(drivenum)) diff --git a/usr/src/uts/i86pc/os/ddi_impl.c b/usr/src/uts/i86pc/os/ddi_impl.c index 50d1e174ff..4044c0d3cd 100644 --- a/usr/src/uts/i86pc/os/ddi_impl.c +++ b/usr/src/uts/i86pc/os/ddi_impl.c @@ -2569,7 +2569,7 @@ impl_setup_ddi(void) check_driver_disable(); #if !defined(__xpv) - if (!post_fastreboot) + if (!post_fastreboot && BOP_GETPROPLEN(bootops, "efi-systab") < 0) startup_bios_disk(); #endif /* do bus dependent probes. */ diff --git a/usr/src/uts/i86pc/os/graphics.c b/usr/src/uts/i86pc/os/graphics.c index c8ae9c3e60..03e3199ff4 100644 --- a/usr/src/uts/i86pc/os/graphics.c +++ b/usr/src/uts/i86pc/os/graphics.c @@ -103,6 +103,8 @@ progressbar_init() (void) BOP_GETPROP(bootops, "console", cons); if (strncmp(cons, "graphics", strlen("graphics")) != 0) return; + if (BOP_GETPROPLEN(bootops, "efi-systab") > 0) + return; graphics_mode = 1; diff --git a/usr/src/uts/i86pc/os/mlsetup.c b/usr/src/uts/i86pc/os/mlsetup.c index 7923836f75..13ccfde671 100644 --- a/usr/src/uts/i86pc/os/mlsetup.c +++ b/usr/src/uts/i86pc/os/mlsetup.c @@ -365,12 +365,17 @@ mlsetup(struct regs *rp) if (boothowto & RB_DEBUG) kdi_idt_sync(); - /* - * Explicitly set console to text mode (0x3) if this is a boot - * post Fast Reboot, and the console is set to CONS_SCREEN_TEXT. - */ - if (post_fastreboot && boot_console_type(NULL) == CONS_SCREEN_TEXT) - set_console_mode(0x3); + if (BOP_GETPROPLEN(bootops, "efi-systab") < 0) { + /* + * In BIOS system, explicitly set console to text mode (0x3) + * if this is a boot post Fast Reboot, and the console is set + * to CONS_SCREEN_TEXT. + */ + if (post_fastreboot && + boot_console_type(NULL) == CONS_SCREEN_TEXT) { + set_console_mode(0x3); + } + } /* * If requested (boot -d) drop into kmdb. |