File tree Expand file tree Collapse file tree 3 files changed +48
-0
lines changed Expand file tree Collapse file tree 3 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -967,6 +967,17 @@ config EFI
967
967
allow the kernel to be booted as an EFI application. This
968
968
is only useful on systems that have UEFI firmware.
969
969
970
+ config DMI
971
+ bool "Enable support for SMBIOS (DMI) tables"
972
+ depends on EFI
973
+ default y
974
+ help
975
+ This enables SMBIOS/DMI feature for systems.
976
+
977
+ This option is only useful on systems that have UEFI firmware.
978
+ However, even with this option, the resultant kernel should
979
+ continue to boot on existing non-UEFI platforms.
980
+
970
981
config CC_HAVE_STACKPROTECTOR_TLS
971
982
def_bool $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=tp -mstack-protector-guard-offset=0)
972
983
Original file line number Diff line number Diff line change
1
+ /* SPDX-License-Identifier: GPL-2.0 */
2
+ /*
3
+ * Copyright (C) 2024 Intel Corporation
4
+ *
5
+ * based on arch/arm64/include/asm/dmi.h
6
+ *
7
+ * This file is subject to the terms and conditions of the GNU General Public
8
+ * License. See the file "COPYING" in the main directory of this archive
9
+ * for more details.
10
+ */
11
+
12
+ #ifndef __ASM_DMI_H
13
+ #define __ASM_DMI_H
14
+
15
+ #include <linux/io.h>
16
+ #include <linux/slab.h>
17
+
18
+ #define dmi_early_remap (x , l ) memremap(x, l, MEMREMAP_WB)
19
+ #define dmi_early_unmap (x , l ) memunmap(x)
20
+ #define dmi_remap (x , l ) memremap(x, l, MEMREMAP_WB)
21
+ #define dmi_unmap (x ) memunmap(x)
22
+ #define dmi_alloc (l ) kzalloc(l, GFP_KERNEL)
23
+
24
+ #endif
Original file line number Diff line number Diff line change @@ -152,3 +152,16 @@ void arch_efi_call_virt_teardown(void)
152
152
{
153
153
efi_virtmap_unload ();
154
154
}
155
+
156
+ static int __init riscv_dmi_init (void )
157
+ {
158
+ /*
159
+ * On riscv, DMI depends on UEFI, and dmi_setup() needs to
160
+ * be called early because dmi_id_init(), which is an arch_initcall
161
+ * itself, depends on dmi_scan_machine() having been called already.
162
+ */
163
+ dmi_setup ();
164
+
165
+ return 0 ;
166
+ }
167
+ core_initcall (riscv_dmi_init );
You can’t perform that action at this time.
0 commit comments