Skip to content

Commit

Permalink
Support disabling serial output
Browse files Browse the repository at this point in the history
On systems without serial port, currently efiwrapper still tries
to initialize serial output, causing boot hang. A new serail_type 0
is added to support disabling serial output by command line.

Tracked-On: OAM-114713
Signed-off-by: Jiaqing Zhao <[email protected]>
  • Loading branch information
jiaqingz-intel committed Jan 9, 2024
1 parent bdd4f65 commit a5a8ecc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/s8250mem32/s8250mem32.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
#define SBL_SERIAL_TYPE "serail_type"
#define SBL_SERIAL_REGWIDTH "serail_regwidth"

#define SBL_SERIAL_TYPE_DISABLED 0

#ifndef SERIAL_BASEADDR
#include <pci/pci.h>
#define SERIAL_BASEADDR GetPciUartBase(SERIAL_PCI_DID)
Expand Down Expand Up @@ -83,6 +85,10 @@ static EFI_STATUS s8250mem32_init(__attribute__((__unused__)) EFI_SYSTEM_TABLE *
s.regwidth = HW_SERIAL_REG_WIDTH;
}

if (s.type == SBL_SERIAL_TYPE_DISABLED) {
return EFI_SUCCESS;
}

lib_sysinfo.serial = &s;

serial_console_init();
Expand Down

0 comments on commit a5a8ecc

Please sign in to comment.