From abdb1c846794b2d93fb97944d9c2adbd10b0e05f Mon Sep 17 00:00:00 2001 From: Jingyao Zhou Date: Fri, 17 Jun 2022 11:53:04 +1000 Subject: [PATCH 1/3] serial: fix serial port config fix wrong configs Signed-off-by: Jingyao Zhou --- libplatsupport/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libplatsupport/CMakeLists.txt b/libplatsupport/CMakeLists.txt index 0e7709a14..f22f9460b 100644 --- a/libplatsupport/CMakeLists.txt +++ b/libplatsupport/CMakeLists.txt @@ -29,9 +29,9 @@ config_choice( com4 -> 0x2e8 \ ega -> 80x25 text mode ega screen" "com1;LibPlatSupportX86ConsoleDeviceCom1;LIB_PLAT_SUPPORT_SERIAL_PORT_X86_COM1;KernelPlatPC99" - "com2;LibPlatSupportX86ConsoleDeviceCom2;LIB_PLAT_SUPPORT_SERIAL_PORT_X86_COM1;KernelPlatPC99" - "com3;LibPlatSupportX86ConsoleDeviceCom3;LIB_PLAT_SUPPORT_SERIAL_PORT_X86_COM1;KernelPlatPC99" - "com4;LibPlatSupportX86ConsoleDeviceCom4;LIB_PLAT_SUPPORT_SERIAL_PORT_X86_COM1;KernelPlatPC99" + "com2;LibPlatSupportX86ConsoleDeviceCom2;LIB_PLAT_SUPPORT_SERIAL_PORT_X86_COM2;KernelPlatPC99" + "com3;LibPlatSupportX86ConsoleDeviceCom3;LIB_PLAT_SUPPORT_SERIAL_PORT_X86_COM3;KernelPlatPC99" + "com4;LibPlatSupportX86ConsoleDeviceCom4;LIB_PLAT_SUPPORT_SERIAL_PORT_X86_COM4;KernelPlatPC99" "ega;LibPlatSupportX86ConsoleDeviceEGA;LIB_PLAT_SUPPORT_SERIAL_TEXT_EGA;KernelPlatPC99" ) From 298240952f0e01be4afe8416da71a6ad221ae364 Mon Sep 17 00:00:00 2001 From: Jingyao Zhou Date: Fri, 17 Jun 2022 11:53:54 +1000 Subject: [PATCH 2/3] trivial: add missing headers Signed-off-by: Jingyao Zhou --- libplatsupport/plat_include/pc99/platsupport/plat/serial.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libplatsupport/plat_include/pc99/platsupport/plat/serial.h b/libplatsupport/plat_include/pc99/platsupport/plat/serial.h index 13b0f1464..3bf7bee49 100644 --- a/libplatsupport/plat_include/pc99/platsupport/plat/serial.h +++ b/libplatsupport/plat_include/pc99/platsupport/plat/serial.h @@ -6,6 +6,9 @@ #pragma once +#include +#include + #define SERIAL_CONSOLE_COM1_PORT 0x3f8 #define SERIAL_CONSOLE_COM2_PORT 0x2f8 #define SERIAL_CONSOLE_COM3_PORT 0x3e8 From 76873a35ca4280c86eac230d40c221201db86e15 Mon Sep 17 00:00:00 2001 From: Jingyao Zhou Date: Tue, 19 Jul 2022 23:13:49 +1000 Subject: [PATCH 3/3] trivial: fixing style Signed-off-by: Jingyao Zhou --- .../pc99/platsupport/plat/serial.h | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/libplatsupport/plat_include/pc99/platsupport/plat/serial.h b/libplatsupport/plat_include/pc99/platsupport/plat/serial.h index 3bf7bee49..15d0b0297 100644 --- a/libplatsupport/plat_include/pc99/platsupport/plat/serial.h +++ b/libplatsupport/plat_include/pc99/platsupport/plat/serial.h @@ -57,20 +57,20 @@ enum chardev_id { #if defined(CONFIG_LIB_PLAT_SUPPORT_SERIAL_PORT_X86_COM1) - #define DEFAULT_SERIAL_IOPORT SERIAL_CONSOLE_COM1_PORT - #define DEFAULT_SERIAL_INTERRUPT SERIAL_CONSOLE_COM1_IRQ +#define DEFAULT_SERIAL_IOPORT SERIAL_CONSOLE_COM1_PORT +#define DEFAULT_SERIAL_INTERRUPT SERIAL_CONSOLE_COM1_IRQ #elif defined(CONFIG_LIB_PLAT_SUPPORT_SERIAL_PORT_X86_COM2) - #define DEFAULT_SERIAL_IOPORT SERIAL_CONSOLE_COM2_PORT - #define DEFAULT_SERIAL_INTERRUPT SERIAL_CONSOLE_COM2_IRQ +#define DEFAULT_SERIAL_IOPORT SERIAL_CONSOLE_COM2_PORT +#define DEFAULT_SERIAL_INTERRUPT SERIAL_CONSOLE_COM2_IRQ #elif defined(CONFIG_LIB_PLAT_SUPPORT_SERIAL_PORT_X86_COM3) - #define DEFAULT_SERIAL_IOPORT SERIAL_CONSOLE_COM3_PORT - #define DEFAULT_SERIAL_INTERRUPT SERIAL_CONSOLE_COM3_IRQ +#define DEFAULT_SERIAL_IOPORT SERIAL_CONSOLE_COM3_PORT +#define DEFAULT_SERIAL_INTERRUPT SERIAL_CONSOLE_COM3_IRQ #elif defined(CONFIG_LIB_PLAT_SUPPORT_SERIAL_PORT_X86_COM4) - #define DEFAULT_SERIAL_IOPORT SERIAL_CONSOLE_COM4_PORT - #define DEFAULT_SERIAL_INTERRUPT SERIAL_CONSOLE_COM4_IRQ +#define DEFAULT_SERIAL_IOPORT SERIAL_CONSOLE_COM4_PORT +#define DEFAULT_SERIAL_INTERRUPT SERIAL_CONSOLE_COM4_IRQ #elif defined(CONFIG_LIB_PLAT_SUPPORT_SERIAL_TEXT_EGA) - /* Don't define a port for the EGA alphanumeric mode device */ +/* Don't define a port for the EGA alphanumeric mode device */ #else - #define DEFAULT_SERIAL_IOPORT SERIAL_CONSOLE_COM1_PORT - #define DEFAULT_SERIAL_INTERRUPT SERIAL_CONSOLE_COM1_IRQ +#define DEFAULT_SERIAL_IOPORT SERIAL_CONSOLE_COM1_PORT +#define DEFAULT_SERIAL_INTERRUPT SERIAL_CONSOLE_COM1_IRQ #endif