diff options
author | Toomas Soome <tsoome@me.com> | 2016-10-08 22:03:16 +0300 |
---|---|---|
committer | Hans Rosenfeld <hans.rosenfeld@joyent.com> | 2017-05-17 13:17:05 +0200 |
commit | 94fe7a15aaf0a0ebb874aaff7b5d6499b79c099e (patch) | |
tree | 3692778855099b28012ad0a6a71b5e714e111849 | |
parent | c9d5afdc0f8c07fde3eb4c16c95f43e3b72b493a (diff) | |
download | illumos-joyent-94fe7a15aaf0a0ebb874aaff7b5d6499b79c099e.tar.gz |
8213 uts: get smbios from bootloader
Reviewed by: Yuri Pankov <yuri.pankov@gmail.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
-rw-r--r-- | usr/src/uts/i86pc/dboot/dboot_startkern.c | 4 | ||||
-rw-r--r-- | usr/src/uts/i86pc/os/ddi_impl.c | 3 | ||||
-rw-r--r-- | usr/src/uts/i86pc/os/fakebop.c | 7 | ||||
-rw-r--r-- | usr/src/uts/intel/sys/bootinfo.h | 1 |
4 files changed, 14 insertions, 1 deletions
diff --git a/usr/src/uts/i86pc/dboot/dboot_startkern.c b/usr/src/uts/i86pc/dboot/dboot_startkern.c index d835f2b311..396e1aafec 100644 --- a/usr/src/uts/i86pc/dboot/dboot_startkern.c +++ b/usr/src/uts/i86pc/dboot/dboot_startkern.c @@ -1602,6 +1602,9 @@ dboot_multiboot_get_fwtables(void) if (multiboot_version != 2) return; + /* only provide SMBIOS pointer in case of UEFI */ + bi->bi_smbios = NULL; + nacpitagp = (multiboot_tag_new_acpi_t *) dboot_multiboot2_find_tag(mb2_info, MULTIBOOT_TAG_TYPE_ACPI_NEW); @@ -2009,6 +2012,7 @@ startup_kernel(void) if (mb2_info != NULL) DBG(mb2_info->mbi_total_size); DBG(bi->bi_acpi_rsdp); + DBG(bi->bi_smbios); #endif /* diff --git a/usr/src/uts/i86pc/os/ddi_impl.c b/usr/src/uts/i86pc/os/ddi_impl.c index fa07371303..50d1e174ff 100644 --- a/usr/src/uts/i86pc/os/ddi_impl.c +++ b/usr/src/uts/i86pc/os/ddi_impl.c @@ -1906,6 +1906,9 @@ get_boot_properties(void) } else if (strcmp(name, "acpi-root-tab") == 0) { (void) ndi_prop_update_int64(DDI_DEV_T_NONE, devi, property_name, *((int64_t *)bop_staging_area)); + } else if (strcmp(name, "smbios-address") == 0) { + (void) ndi_prop_update_int64(DDI_DEV_T_NONE, devi, + property_name, *((int64_t *)bop_staging_area)); } else if (strcmp(name, "stdout") == 0) { (void) ndi_prop_update_int(DDI_DEV_T_NONE, devi, property_name, *((int *)bop_staging_area)); diff --git a/usr/src/uts/i86pc/os/fakebop.c b/usr/src/uts/i86pc/os/fakebop.c index 8616ef9f40..eb29b2d6cb 100644 --- a/usr/src/uts/i86pc/os/fakebop.c +++ b/usr/src/uts/i86pc/os/fakebop.c @@ -2734,11 +2734,16 @@ build_firmware_properties(struct xboot_info *xbp) ACPI_TABLE_HEADER *tp = NULL; #ifndef __xpv - if (xbp->bi_acpi_rsdp) { + if (xbp->bi_acpi_rsdp != NULL) { bsetprop64("acpi-root-tab", (uint64_t)(uintptr_t)xbp->bi_acpi_rsdp); } + if (xbp->bi_smbios != NULL) { + bsetprop64("smbios-address", + (uint64_t)(uintptr_t)xbp->bi_smbios); + } + if ((tp = find_fw_table(ACPI_SIG_MSCT)) != NULL) msct_ptr = process_msct((ACPI_TABLE_MSCT *)tp); else diff --git a/usr/src/uts/intel/sys/bootinfo.h b/usr/src/uts/intel/sys/bootinfo.h index fa60e6ac41..8f1d205a10 100644 --- a/usr/src/uts/intel/sys/bootinfo.h +++ b/usr/src/uts/intel/sys/bootinfo.h @@ -111,6 +111,7 @@ struct xboot_info { native_ptr_t bi_mb_info; /* multiboot 1 or 2 info */ int bi_mb_version; /* multiboot version */ native_ptr_t bi_acpi_rsdp; + native_ptr_t bi_smbios; #endif }; #pragma pack() |