Skip to contentSkip to conversation

fix DMI for EFI

PATCH In review Brian Maly 2 participants 2 messages Mar 1, 2009 x86

lore
Share & tools
lore

Brian Maly

author
#0 lore raw

PATCH 1/1 fix DMI for EFI

DMI tables are loaded by EFI, so the dmi calls must happen after efi_init() and not before. Currently Apple hardware uses DMI to determine the framebuffer mappings for efifb. Without DMI working you also have no video on MacBook Pro. This patch resolves the DMI issue for EFI hardware (DMI is now properly detected at boot), and additionally efifb now loads on Apple hardware (i.e. video works).

setup.c | 8 ++++----

1 file changed, 4 insertions(+), 4 deletions(-)
arch/x86/kernel/setup.c +4 -4
@@ -770,10 +770,6 @@ void __init setup_arch(char **cmdline_p)
 
 	finish_e820_parsing();
 
-	dmi_scan_machine();
-
-	dmi_check_system(bad_bios_dmi_table);
-
 	/*
 	 * VMware detection requires dmi to be available, so this
 	 * needs to be done after dmi_scan_machine, for the BP.
@@ -792,6 +788,10 @@ void __init setup_arch(char **cmdline_p)
 	if (efi_enabled)
 		efi_init();
 
+	dmi_scan_machine();
+	
+	dmi_check_system(bad_bios_dmi_table);
+
 #ifdef CONFIG_X86_32
 	if (ppro_with_ram_bug()) {
 		e820_update_range(0x70000000ULL, 0x40000ULL, E820_RAM,
#1 lore raw

arch/x86/kernel/setup.c void __init setup_arch(char **cmdline_p) · line 775

Quoted 7 lines · Brian Maly
arch/x86/kernel/setup.c +0 -4
-	dmi_scan_machine();
-
-	dmi_check_system(bad_bios_dmi_table);
-
 	/*
 	 * VMware detection requires dmi to be available, so this
 	 * needs to be done after dmi_scan_machine, for the BP.

This init_hypervisor comment looks important, no? Possibly it needs to be moved after the new placement? Doesn't look like the probe_roms will be an issue.

regards, Kyle

Quoted 11 lines
arch/x86/kernel/setup.c +4 -0
@@ -792,6 +788,10 @@ void __init setup_arch(char **cmdline_p)
 	if (efi_enabled)
 		efi_init();
 
+	dmi_scan_machine();
+	
+	dmi_check_system(bad_bios_dmi_table);
+
 #ifdef CONFIG_X86_32
 	if (ppro_with_ram_bug()) {
 		e820_update_range(0x70000000ULL, 0x40000ULL, E820_RAM,