Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/stand/efiboot If an SMBIOS3 table is found, pass the add...
details: https://anonhg.NetBSD.org/src/rev/3ba87c0b3fb2
branches: trunk
changeset: 445337:3ba87c0b3fb2
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Tue Oct 23 10:12:59 2018 +0000
description:
If an SMBIOS3 table is found, pass the address to the kernel via /chosen
"netbsd,smbios-table" property.
diffstat:
sys/stand/efiboot/efiacpi.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diffs (52 lines):
diff -r f3781304a8e1 -r 3ba87c0b3fb2 sys/stand/efiboot/efiacpi.c
--- a/sys/stand/efiboot/efiacpi.c Tue Oct 23 09:30:09 2018 +0000
+++ b/sys/stand/efiboot/efiacpi.c Tue Oct 23 10:12:59 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: efiacpi.c,v 1.1 2018/10/12 22:08:04 jmcneill Exp $ */
+/* $NetBSD: efiacpi.c,v 1.2 2018/10/23 10:12:59 jmcneill Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -38,8 +38,10 @@
#define ACPI_FDT_SIZE (64 * 1024)
static EFI_GUID Acpi20TableGuid = ACPI_20_TABLE_GUID;
+static EFI_GUID Smbios3TableGuid = SMBIOS3_TABLE_GUID;
static void *acpi_root = NULL;
+static void *smbios3_table = NULL;
int
efi_acpi_probe(void)
@@ -50,6 +52,10 @@
if (EFI_ERROR(status))
return EIO;
+ status = LibGetSystemConfigurationTable(&Smbios3TableGuid, &smbios3_table);
+ if (EFI_ERROR(status))
+ smbios3_table = NULL;
+
return 0;
}
@@ -65,7 +71,10 @@
if (!efi_acpi_available())
return;
- printf("ACPI: RSDP %p\n", acpi_root);
+ printf("ACPI: RSDP %p", acpi_root);
+ if (smbios3_table)
+ printf(", SMBIOS %p", smbios3_table);
+ printf("\n");
}
int
@@ -92,6 +101,8 @@
fdt_add_subnode(fdt, fdt_path_offset(fdt, "/"), "chosen");
fdt_setprop_u64(fdt, fdt_path_offset(fdt, "/chosen"), "netbsd,acpi-root-table", (uint64_t)(uintptr_t)acpi_root);
+ if (smbios3_table)
+ fdt_setprop_u64(fdt, fdt_path_offset(fdt, "/chosen"), "netbsd,smbios-table", (uint64_t)(uintptr_t)smbios3_table);
fdt_add_subnode(fdt, fdt_path_offset(fdt, "/"), "acpi");
fdt_setprop_string(fdt, fdt_path_offset(fdt, "/acpi"), "compatible", "netbsd,acpi");
Home |
Main Index |
Thread Index |
Old Index