Skip to contentSkip to conversation

EFI & HCDP Console auto selection

PATCH New Alex Williamson 1 participant 1 message Aug 26, 2003 EFI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 EFI & HCDP Console auto selection

Current ia64 boxes (and potentially ia32 boxes using EFI and HCDP)
have enough information in firmware to make a reasonably educated guess on where the console lives. This patch tries to make use of it and "do the right thing" when it can, without getting in the way when it shouldn't.

The code is triggered off whether there's a console port found
in the HCDP table. At that point, it tries to determine what the current command line enables for consoles. The EFI ConOut variable is also used to try to guess whether the system has VGA. In short, if the system only has one device specified for ConOut and you do not pass a "console=tty..." argument, it will just work. There's some other nice parts of it that try to print a courtesy message to the port that's not being used for the console to indicate where the console has been started. These only work for MMIO serial ports in the HCDP and boxes where the EFI memory map seems to indicate a VGA memory hole. Doing the same for I/O port space UARTs should be trivial to add, but I don't have the hardware/firmware combination to test it. FWIW, I believe early ia64 boxes set the EFI memory type wrong for the VGA hole. I don't try to figure that out so you won't get the courtesy messages on VGA for them.

Let me know what you think and if you find any unexpected behavior.
It should not adversely affect any currently working setups. The current patch is against 2.6.0-test4. Portions of this code are leveraged from a previous implementation by Khalid Aziz. Thanks,

Alex

Signature · 1 line
Alex Williamson                             HP Linux & Open Source Lab
drivers/Makefile +1 -0
diff -urN linux/drivers/Makefile linux/drivers/Makefile
@@ -49,3 +49,4 @@
 obj-$(CONFIG_MCA)		+= mca/
 obj-$(CONFIG_EISA)		+= eisa/
 obj-$(CONFIG_CPU_FREQ)		+= cpufreq/
+obj-$(CONFIG_ACPI_EFI)		+= efi/
drivers/efi/Makefile +6 -0
diff -urN linux/drivers/efi/Makefile linux/drivers/efi/Makefile
@@ -0,0 +1,6 @@
+#
+# Makefile for EFI (Extensible Firmware Interface) drivers.
+#
+
+obj-y += efi_console.o
+
drivers/efi/efi_console.c +265 -0

265 lines not on this page · raw message

drivers/serial/8250_hcdp.c +157 -0

175 lines not on this page · raw message

drivers/serial/Kconfig +1 -1
diff -urN linux/drivers/serial/Kconfig linux/drivers/serial/Kconfig
@@ -86,7 +86,7 @@
 
 config SERIAL_8250_HCDP
 	bool "8250/16550 device discovery support via EFI HCDP table"
-	depends on IA64 && SERIAL_8250
+	depends on IA64 && SERIAL_8250 && ACPI_EFI
 	---help---
 	  If you wish to make the serial console port described by the EFI
 	  HCDP table available for use as serial console or general
include/linux/efi.h +70 -0

88 lines not on this page · raw message