Skip to content

Commit

Permalink
Merge branch 'master' into jade/pciscan
Browse files Browse the repository at this point in the history
  • Loading branch information
wom-bat authored Jul 20, 2022
2 parents 4af12fd + 76873a3 commit 57a2f01
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
6 changes: 3 additions & 3 deletions libplatsupport/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
25 changes: 14 additions & 11 deletions libplatsupport/plat_include/pc99/platsupport/plat/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

#pragma once

#include <autoconf.h>
#include <platsupport/gen_config.h>

#define SERIAL_CONSOLE_COM1_PORT 0x3f8
#define SERIAL_CONSOLE_COM2_PORT 0x2f8
#define SERIAL_CONSOLE_COM3_PORT 0x3e8
Expand Down Expand Up @@ -54,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

0 comments on commit 57a2f01

Please sign in to comment.