American Megatrends, Inc.

Terminal

Copyright

Release Notes

© American Megatrends, Inc.


Terminal

AMIBIOS Document References

Previous Release Notes

Release Notes 50.htm

Release Notes 51.htm

Release Notes 52.htm

Release Notes 53.htm

Release Notes 54.htm

Built on 17:51:52 07/10/14


Release Notes - NDA Required

Component Information:
Component Title: Serial Redirection
Component Reference Name: Terminal
Component Type: eModule
Release Date: 2012-04-09
Source Control Label: 4.6.3_Terminal_50
Source Control Location: SS: Alaska;$/Alaska/BIN/Modules/Terminal;
Driver Dependencies
N0NE
Protocol Dependencies
N0NE
File Dependencies
N0NE
Non-Compiled BIN and LIB File(s) within this Component:

Terminal.lib
Terminalx64.lib
Component Title: Serial Redirection Sources
Component Reference Name: TerminalSrc
Component Source Control Label: 4.6.3_Terminal_50
Component Source Control Location: SS: Alaska;$/Alaska/SOURCE/Modules/Terminal;
Project Source Control Label: 4.6.3_Terminal_50
Project Source Control Location: SS: Alaska;$/Alaska/SOURCE/Modules/Terminal;
Component Description:
Terminal driver can be added to EFI BIOS to provide Serial Redirection support in Setup, Shell and various remote management consoles like Emergency Management Services. This driver supports both PCI and ISA COM ports and also MMIO type Serial devices. It can support standard ESC sequences.This driver provides the setup option to configure the Redirection port parameters. (Serial debug messages are implemented by the Status Code module and do not require this module).
Filename | Description
Main Component | Root\Core\em\Terminal
Terminal.cif | Component information file for the eModule.
Terminal.mak | Make file becomes part of the BIOS build process.
Terminal.sdl | Contains Terminal binary module BIOS build parameters
TerminalSetupVar.h | File that contains definitions for variables which keep track of which serial ports are enabled.
TerminalSetup.c | File that contains routines used by the functions in Terminal.lib/Terminalx64.lib to get user configurable Terminal/Serial setup values.
InitTerminalStrings.c | File that contains routines that does runtime modification of Terminal related Setup strings that are defined in Terminal.uni.
Terminal.sd | File that contains the constructs for the setup page "Advanced Tab\Serial Port Console Redirection."
Terminal.uni | File that contains the definitions of the Unicode strings used in the Terminal\Serial setup page.
TerminalBoard.h | File that contains board related routines.
Terminal.lib | This is the "Serial Redirection Sources" module built in IA32 mode. If the "Serial Redirection Sources" module is included in the project, this file will not be used. Instead, the "Serial Redirection Sources" module will be compiled and linked.
Terminalx64.lib | This is the "Serial Redirection Sources" module built in x64 mode. If the "Serial Redirection Sources" module is included in the project, this file will not be used. Instead, the "Serial Redirection Sources" module will be compiled and linked. The compiled version of "Serial Redirection Sources" is called "Terminal.lib." We renamed it in order to add it to this module.
TerminalSrc.cif | Component information file for the eModule.
TerminalSrc.mak | Make file becomes part of the BIOS build process.
TerminalSrc.sdl | Contains Terminal Source module BIOS build parameters
SerialIo.c | File that contains Driver routines for serial ports (both super io and pci). Installs EFI_SERIAL_IO_PROTOCOL for a serial device. Adds UART_DEVICE_PATH and UART_FLOW_CONTROL_DEVICE_PATH nodes to its device path.
Terminal.c | File that contains routines to install EFI_SIMPLE_TEXT_INPUT_PROTOCOL and EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL for a serial device. Adds a vendor messaging path for the terminal type (PcAnsi, VT100, etc) to its device path.
Terminal.h | File that contains TERMINAL_TYPE and TERMINAL_DEV and related definitions
TerminalName.c | Gets the driver name.
TerminalSimpleTextIn.c | Implements the SimpleTextIn protocol for the Terminal. Interfaces with the SerialIo protocol to get and write characters to the serial port.
TerminalSimpleTextOut.c | Implements the SimpleTextOut protocol for the Terminal.
TerminalAcpi.c | This file contains function to disable the PCI redirection at ACPI enable call.
Terminal AmiSerial
Protocol 		Root\Include\Protocol
TerminalAmiSerial.h | File that contains definitions for variables which keep track of which serial ports are enabled.
BIOS Parameters:
Parameters Name | Type | Description
Terminal_SUPPORT | Boolean | Switch to Enable/Disable Serial Redirection support in Project
SerialIo_SUPPORT | Boolean | Switch to Enable/Disable Serial Driver Support
SERIALIO_PCI_SERIAL_SUPPORT | Boolean | Switch to Enable/Disable PCI Serial Devices Support
DISABLE_TERMINAL_FOR_SCT_TEST | Integer | To disable Serial Redirection if SCT test is done
TOTAL_SIO_SERIAL_PORTS | Integer | Total number of Super IO serial ports present
TOTAL_PCI_SERIAL_PORTS | Integer | Total number of PCI serial ports present
TOTAL_SERIAL_PORTS | Integer | Total number of serial ports present (both Super IO and PCI)
MAX_SIO_SERIAL_PORTS | Integer | Maximum Number of SIO Serial Ports
MAX_PCI_SERIAL_PORTS | Integer | Maximum Number of PCI Serial Ports
PCI_SERIAL_PORT_INDEX_BASE Integer Used in Terminal.sd.
1 - EFI_SPECIFICATION_VERSION < 0x2000A
0 - EFI_SPECIFICATION_VERSION >= 0x2000A
PCI_SERIAL_PORT_0_INDEX | Integer | Used in the Terminal.sd file
PCI_SERIAL_PORT_1_INDEX | Integer | Used in Terminal.sd file. VfrCompile does not allow the use of arithmetic expressions as array indices
PCI_SERIAL_PORT_2_INDEX | Integer | Used in Terminal.sd file. VfrCompile does not allow the use of arithmetic expressions as array indices
PCI_SERIAL_PORT_3_INDEX | Integer | Used in Terminal.sd file. VfrCompile does not allow the use of arithmetic expressions as array indices
UART_DEFAULT_BAUD_RATE | Integer | UART's Default Baud Rate - 115200 bits/Sec
UART_DEFAULT_BAUD_RATE_INDEX | Integer | Index into array gAcpiSpcrTableComBaudRates
UART_DEFAULT_DATA_BITS | Integer | UART's Default number of Data bits during Transmission - 8 bits
UART_DEFAULT_PARITY | Integer | UART Default Parity - No Parity
UART_DEFAULT_STOP_BITS | Integer | UART's Default Stop bits - 1
UART_DEFAULT_FLOW_CONTROL | Integer | UART's Default Flow Control - 0
UART_DEFAULT_LOOPBACK_ENABLE | Integer | UART's Default loopback enable - 0
DEFAULT_CONSOLE_REDIRECTION_ENABLE | Boolean | Switch to Enable/Disable Console Redirection
DEFAULT_DEBUGGER_CONSOLE_REDIRECTION_ENABLE | Boolean | Rx/Redir/Debugger port found then enable/disable Console Redirection
DEFAULT_ACPI_SPCR_COM_PORT | Integer | Default ACPI SPCR com port - 0
DEFAULT_TERMINAL_TYPE | Integer | Default Terminal type - ANSI
EXTENDED_RESOLUTION_ENABLE | Boolean | Switch to Enable/Disable 100 x 31 terminal resolution
RECORDER_MODE_ENABLE | Boolean | Switch to Enable/Disable Terminal Recorder mode
DEFAULT_ACPI_SPCR_CONSOLE_REDIRECTION_ENABLE | Boolean | Switch to Enable/Disable ACPI SPCR Console Redirection
DEFAULT_ACPI_SPCR_TABLE_TERMINAL_TYPE | Integer | Default ACPI SPCR Terminal type - VT_UTF8
HARDWARE_FLOW_CONTROL_SETUP_OPTION | Integer | Hardware Flow control Setup option
SOFTWARE_FLOW_CONTROL_SETUP_OPTION | Integer | Software Flow control Setup option
TIMEOUT_FOR_DETERMINING_LONE_ESC_CHAR | Integer | TimeOut for Determining lone escape character - 10000000
NUMBER_OF_TIME_FOR_ESC_SEQUENCE_CHECKING | Integer | Number of times to check escape sequence - 20
SPCR_ACPI_OEM_ID | Expression | SPCR OEM Id, string value to be filled into SPCR ACPI table headers
SPCR_ACPI_OEM_TBL_ID | Expression | SPCR OEM table Id, string value to be filled into SPCR ACPI table headers
UART_FIFO_SIZE | Integer | UART fifo size. Maximum supported UART size is 16
REFRESH_SCREEN_KEY | Integer | Unicode Value of Key to Refresh the Screen.Default it set to Ctrl+r
spcr_interface_type | Integer | Indicate the type of the COM Port register interface
spcr_addr_spc_id | Integer | Represents UART BLK Register Id
spcr_addr_bit_width | Integer | Represents UART BLK Register Bit Width
spcr_addr_bit_offset | Integer | Represents UART BLK Register Bit Offset
spcr_access_size | Integer | UART BLK Register Bit Offset
spcr_interrupt_type | Integer | Interrupt type(s) used by the UART
spcr_global_system_int | Integer | Represents I/O APIC mode IRQ#
spcr_parity | Integer | Shows the UART parity check
spcr_stop_bits | Integer | UART stop bits
spcr_pci_device_id | Integer | Device ID,if UART is on PCI bus
spcr_pci_vendor_id | Integer | Vendor ID,if UART is on PCI bus
spcr_pci_bus_number | Integer | BUS#,if UART is on PCI bus
spcr_pci_device_number | Integer | DEVICE#,if UART is on PCI bus
spcr_pci_function_number | Integer | FUNCTION#,if UART is on PCI bus
spcr_pci_flags | Integer | PCI flags,if UART is on PCI bus
spcr_pci_segment | Integer | PCI Segment,if UART is on PCI bus
TerminalSrc_SUPPORT | Boolean | Switch to Enable/Disable Serial Redirection Source support in Project
CLEAR_TERMINAL_KB_BUFFER_AT_READYTOBOOT | Boolean | ON- Terminal KB Buffer will be cleared at ReadyToBoot.\OFF - Terminal KB Buffer will not be cleared at ReadyToBoot
PUTTY_VT100 | Integer | Putty Vt100 KeyPad Value
PUTTY_LINUX | Integer | Putty Linux KeyPad Value
PUTTY_XTERMR6 | Integer | Putty XtermR6 KeyPad Value
PUTTY_SCO | Integer | Putty SCO KeyPad Value
PUTTY_ESCN | Integer | Putty Escn KeyPad Value
PUTTY_VT400 | Integer | Putty Vt400 KeyPad Value
INSTALL_LEGACY_OS_THROUGH_REMOTE | Boolean | Install Legacy OS like Linux through redirection. To make that happen some Linux are force to install in text mode and some others are redirected in graphics mode itseld. Note: All Linux Versions cannot be installed through remote as different Linux kernel's behave differently.
OEM_ESC_SEQUENCES | Boolean | 1- Enable OEM ESC Sequence.\0 - Disable OEM ESC Sequence.
DONT_SEND_ASCII_CONTROL_PRINTABLE_CHARACTERS | Boolean | Applications like HyperTerminal supports printable characters in the ASCII control characters value's(0 - 0x1F) but Putty does not. so,to print the printable ASCII control characters we will send the equivalent ASCII printable value(whichever is applicable) if the token is enabled.
DISABLE_PCI_REDIRECTION_ON_ACPI_ENABLE_DISABLE | Boolean | When Redirection is enabled for Legacy OS, the system installation gets slow as Legacy Serial Redirection enables the PCI Serial interrupt for redirection and sometime after that OS uses its own IVT but PCI Serial interrupt is generated and not handled.So, disable redirection at OS level. we disable redirection on ACPI enable/disable call and reset the Interrupt Enable Register.
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_38, Dated: 2011-12-20
Visual eBios: RSS.5.70.0171, Dated: 2011-12-20
Compiler Tool(s): Microsoft's Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
None
General Bug Fixes:
  • EIP#75398 - Hyperterminal has some character displayed in non-debug mode.
    • EIP addressed in this label:
  • EIP#57579 - PCI legacy console redirection causes Legacy OS installation slow because when Redirection is enabled for Legacy OS, Legacy Serial Redirection enables the PCI Serial interrupt for redirection and sometime after that OS uses its own IVT but still PCI Serial interrupt is generated and not handled.So, disable redirection at OS level. we disable redirection on ACPI enable/disable call and reset the Interrupt Enable Register so that interrupt is not generated.
  • EIP#75398 - Hyperterminal has some character displayed in non-debug mode.
  • EIP#84341 - Added Separate PCI_UART_INPUT_CLOCK token for setting the Clock for PCI Serial UART.
  • EIP#86477 - PuttyKeyPad value is returned as non-zero(PUTTY_VT100) from GetSetupValuesForTerminal() if there is any error in that function.
    • Files changed for EIP fixes:
  • Root\Core\em\Terminal\Terminal.sdl (EIP #57579, #84341)
  • Root\Core\em\Terminal\TerminalSetup.c (EIP #86477, #84341)
  • Root\Core\em\Terminal\Terminal.cif (EIP #57579)
  • Root\Core\em\Terminal\Terminal.mak (EIP #57579)
  • Root\Core\em\Terminal\TerminalAcpi.c (EIP #57579 )
  • Root\Core\em\Terminal\SerialIo.c (EIP #75398, #84341 )
    • Known issues and limitations in this label:
    None
    Remaining Issues:
    None
    Unit Testing:
    Hardware : Use Serial Cable to connect System Under Test (SUT) and HOST system.
    Software : Windows - HyperTerminal and Putty.
    1. Verify in Setup, Shell and DOS
      • Aptio Setup Utility, in Advanced Tab, there is Serial Port Console Redirection Setup Question.
      • In Setup, Shell, and DOS, need verify seeing video in HOST side.
      • Keyboard could type in on both HOST and Target sides.
      • All Setup questions combinations had been tested.

    2. Verify SPCR table creation
      • Enable Console Redirection for the setup question of Serial port for Out-Of-Band Management/Windows Emergency Management Services (EMS).
      • Run Acpidump.exe in DOS. In Acpidump.log, SPCR table will be created.
      • In Shell, dump mem with the address specified in Acpidump.log will see the SPCR table.

    3. On HOST side, press Ctrl+r, will refresh the screen.
    Validation Test Report

    Validation Test Report.
    Release History:

    4.6.3_Terminal_50

  • 4.6.3_Terminal_50 Changes in BIN Driver
    •

    [TAG] - EIP57579
    [Category] - Improvement
    [Description] - PCI legacy console redirection causes Legacy OS installation slow because when Redirection is enabled for Legacy OS, Legacy Serial Redirection enables the PCI Serial interrupt for redirection and sometime after that OS uses its own IVT but still PCI Serial interrupt is generated and not handled.So, disable redirection at OS level. we disable redirection on ACPI enable/disable call and reset the Interrupt Enable Register so that interrupt is not generated.
    [Files] - Terminal.sdl, Terminal.mak, Terminal.cif, TerminalAcpi.c

    Note: This EIP change would work for the SouthBridge Source which uses SB Template (4.6.3.5_SB-Template_011) and above

    [TAG] - EIP86477
    [Category] - Improvement
    [Description] - PuttyKeyPad value is returned as non-zero(PUTTY_VT100) from GetSetupValuesForTerminal() if there is any error in that function.
    [Files] - TerminalSetup.c

    [TAG] - EIP84341
    [Category] - Improvement
    [Description] - Added Separate PCI_UART_INPUT_CLOCK token for setting the Clock for PCI Serial UART.
    [Files] - Terminal.sdl, TerminalSetup.c, SerialIo.c, LegacySredir.c, LegacySredir_Setup.c

  • 4.6.3_Terminal_50 Changes in Source Driver
    •

    [TAG] EIP75398
    [Category] Bug Fix
    [Severity] Normal
    [Symptom] Hyperterminal has some character displayed in non-debug mode .
    [RootCause] Character displayed is the character sent for checking the presence of Loop Back Device.
    [Solution] BackSpace Character is sent after the character, sent for testing LoopBack Device.
    [Files] SerialIo.c

    [TAG] - EIP84341
    [Category] - Improvement
    [Description] - Added Separate PCI_UART_INPUT_CLOCK token for setting the Clock for PCI Serial UART.
    [Files] - Terminal.sdl, TerminalSetup.c, SerialIo.c, LegacySredir.c, LegacySredir_Setup.c

    4.6.3_Terminal_49

  • 4.6.3_Terminal_49 Changes in BIN Driver
    •

    TAG] - EIP71973
    [ategory] - Bug Fix
    [everity] - Normal
    [Symptom] - ASCII Control characters that are used to display graphics characters are not redirected to remote if Putty/teraterm application is used.
    [RootCause] - Putty/Teraterm application does not use ASCII control characters as Printable characters.
    [Solution] - DONT_SEND_ASCII_CONTROL_PRINTABLE_CHARACTERS token has been created, if disabled it will not send the ASCII control characters.
    [Files] - Terminal.sdl, TerminalSetup.c, TerminalSimpleTextOut.c

    [TAG]- EIP74239
    [Category] - New Feature
    [Description] - Added "Intel Key" ESC sequence support for Serial Redirection.
    [Files] - Terminal.sdl, TerminalBoard.h

    [TAG] - EIP71636
    [Category] - New Feature
    [Description] - Implement the AMI_SERIAL_PROTOCOL for non-generic PCI Serial Device.
    [Files] - AmiSerial.c, AmiSerial.sdl, AmiSerial.mak, AmiSerial.chm, AmiSerial.dxs, AmiSerial.cif, Terminal.c, SerialIo.c, TerminalSetup.c, InitTerminalStrings.c, TerminalSetupVar.h, Terminal.cif, TerminalAmiSerial.h, LegacySredir_Setup.c

    [TAG] - EIP73026
    [Category] - Improvement
    [Description] - SetNvramVariable used on line 1039, conditionally not set
    [Files] - TerminalSetup.c

    [TAG] - EIP75982
    [Category] - New Feature
    [Description] - Redirection After BIOS POST item on the setup menu
    [Files] - Terminal.sd, Terminal.uni, LegacySredir.c, LegacySredir_Setup.c

  • 4.6.3_Terminal_49 Changes in Source Driver
    •

    [TAG] - EIP73255
    [Category] - Improvement
    [Description] - SerialIO Driver Follow the UEFI Driver Model as per the UEFI Spec. and STOP function was implemented.
    [Files] - SerialIO.c

    [TAG] - EIP65347
    [Category] - Improvement
    [Description] - Redirection function can't work when Dash AP re-connect. So created a timer based event to check the serial port status and enable the redirection again if the port is ready to accept the data.
    [Files] - Serialio.c, GraphRedir.asm

    [TAG] - EIP71636
    [Category] - New Feature
    [Description] - Implement the AMI_SERIAL_PROTOCOL for non-generic PCI Serial Device.
    [Files] - AmiSerial.c, AmiSerial.sdl, AmiSerial.mak, AmiSerial.chm, AmiSerial.dxs, AmiSerial.cif, Terminal.c, SerialIo.c, TerminalSetup.c, InitTerminalStrings.c, TerminalSetupVar.h, Terminal.cif, TerminalAmiSerial.h, LegacySredir_Setup.c

    [TAG] - EIP68735
    [Category] - Bug Fix
    [Severity] - Minor
    [Symptom] - Serial Redirection settings
    [RootCause] - 0xFF used for Debugger Com port, and the same number used to identify the invalid PCI Com port.
    [Solution] - Proper error status returned when there is invalid PCI COM Port.
    [Files] - Terminal.c

    [TAG] - EIP73265
    [Category] - Improvement
    [Description] - Terminal Driver Follow the UEFI Driver Model as per the UEFI Spec. and STOP function was implemented.
    [Files] - Terminal.c

    [TAG] - EIP71973
    [Category] - Bug Fix
    [Severity] - Normal
    [Symptom] - ASCII Control characters that are used to display graphics characters are not redirected to remote if Putty/teraterm application is used.
    [RootCause] - Putty/Teraterm application does not use ASCII control characters as Printable characters.
    [Solution] - DONT_SEND_ASCII_CONTROL_PRINTABLE_CHARACTERS token has been created, if disabled it will not send the ASCII control characters.
    [Files] - Terminal.sdl, TerminalSetup.c, TerminalSimpleTextOut.c

    4.6.3_Terminal_48

  • 4.6.3_Terminal_48 Changes in BIN Driver
    •

    [TAG] - EIP 55335
    [Category]- IMPROVEMENT
    [Description]- Add optional code to clear keyboard buffer at ReadyToBoot in Terminal driver
    [Files] - Terminal.c , Terminal.h, Terminal.sdl, TerminalSetup.c

    [TAG] - EIP 65854
    [Category] - Bug Fix
    [Severity] - Minor
    [Symptom] - Build errors on redefinition of symbols PORT(0-9) in some projects.

    [TAG]- EIP 36616
    [Category]- New Feature
    [Description]- Add Setup option for Various Putty keyPad support in Terminal driver.
    [Files]- Terminal.c, Terminal.h, Terminal.sd, Terminal.sdl, Terminal.uni, TerminalBoard.h, TerminalSetup.c, TerminalSimpleTextIn.c

    TAG]- EIP 63665
    [Category]-IMPROVEMENT
    [Description]- Install Linux(Legacy OS) through remote. Some Linux versions are forced to text mode to redirect and some are redirected in graphics mode itself. It might not work for all the Linux versions as the Linux kernel's behave differently.
    [Files]- Terminal.sdl, Terminal.uni, Terminal.sd, LegacySredir.c, LegacySredir.h, LegacySredir_Setup.c, GRAPHREDIR.ASM, INT10REDIR.ASM, OR_MOD.ASM, OR_MOD.EQU, SREDIR.ASM

  • 4.6.3_Terminal_48 Changes in Source Driver
    •

    [TAG] - EIP 55335
    [Category]- IMPROVEMENT
    [Description]- Add optional code to clear keyboard buffer at ReadyToBoot in Terminal driver
    [Files] - Terminal.c , Terminal.h, Terminal.sdl, TerminalSetup.c

    [TAG] - EIP 64615
    [Category] - Bug Fix
    [Severity] - Minor
    [Symptom] - All Serial IO Protocol interfaces return Device Error if Loopback device is connected during Boot.
    [RootCause] - Checking of Loopback device presence on Serial Port is done in Serial I/O driver rather than Terminal Driver.

    [TAG] - EIP 59741
    [Category]- BUG FIX
    [Severity]- Minor
    [Symptom] - System hangs if the Serial port doesn't work

    [TAG]- EIP 36616
    [Category]- New Feature
    [Description]- Add Setup option for Various Putty keyPad support in Terminal driver.
    [Files]- Terminal.c, Terminal.h, Terminal.sd, Terminal.sdl, Terminal.uni, TerminalBoard.h, TerminalSetup.c, TerminalSimpleTextIn.c

    4.6.3_Terminal_47

  • 4.6.3_Terminal_47 Changes in BIN Driver
    •

    [TAG]- EIP 54526
    [Category]-IMPROVEMENT
    [Description]- PCI serial MMIO device width support added through SDL token
    [Files]- SerialIo.c , TerminalSetup.c , Terminal.sdl

    [TAG] - EIP 60937
    [Category] - BUG FIX
    [Severity] - Normal
    [Symptom] - AMT module checks Terminal_SUPPORT. But this token is not in token.h
    [RootCause] - TargetH missed in Terminal_SUPPORT SDL token.
    [Solution] - Added TargetH in Terminal_SUPPORT SDL token.
    [Files] - Terminal.sdl

    [TAG] - EIP 54870
    [Category]- BUG FIX
    [Severity]- Major
    [Symptom] - Legacy Console Redirection doesn't work on 2nd PCI Serial Port
    [RootCause]- Terminal creats the same Nvram variable name for all the PCI Serial devices
    [Solution] - Created seperate Nvram Variable name for each PCI serial devices Ahci recovery driver shutdown code exectued only when the Recovery from Ahci driver started
    [Files] - TerminalSetup.c

    [TAG] - EIP 59741
    [Category]- BUG FIX
    [Severity]- Minor
    [Symptom] - System hangs if the Serial port doesn't work
    [RootCause]- Serial Port says valid, but when we try to write, Terminal Holding Register never gets Empty.
    [Solution] - Added Error Count when the maximum error count reached, SerialIoWrite has been stopped
    [Files] - SerialIo.c, Terminal.sdl , TerminalSetup.c

    [TAG]- EIP 54313
    [Category]-IMPROVEMENT
    [Description]- Terminal driver Getvariable calls assumed to have valid values. Added code to return the error code when there is an failure in the getvariable call.
    [Files]- TerminalSetup.c, InitTerminalString.c

    [TAG] - EIP 62809
    [Category]- BUG FIX
    [Severity]- Minor
    [Symptom] - COM ports can't be select in Out-of-band mgmt port in setup menu,it always show COM0..
    [RootCause]- UEFI2.1 port index starts from 0.
    [Solution] - Modified the values based on the Port0, Port1 etc defination.
    [Files] - Terminal.sd

    [TAG]- EIP 57688
    [Category]- New Feature
    [Description]- Add Setup option for Vt-UTF8 combo key support in terminal driver
    [Files]- Terminal.c, Terminal.h, Terminal.sd, Terminal.sdl , Terminal.uni, Terminalboard.h, TerminalSetup.c, TerminalSimpletextin.c

  • 4.6.3_Terminal_47 Changes in Source Driver
    •

    [TAG] - EIP 59741
    [Category]- BUG FIX
    [Severity]- Minor
    [Symptom] - System hangs if the Serial port doesn't work
    [RootCause]- Serial Port says valid, but when we try to write, Terminal Holding Register never gets Empty.
    [Solution] - Added Error Count when the maximum error count reached, SerialIoWrite has been stopped
    [Files] - SerialIo.c, Terminal.sdl , TerminalSetup.c

    [TAG] - EIP 59851
    [Category]- BUG FIX
    [Severity]- Minor
    [Symptom] - Redirection doesnt work for baud Rate 9600
    [RootCause]- On baud Rate 9600, SerialIo driver detects that there is Serial Device present in the Serial Port.
    [Solution] - Wrong identification of Serialdevice in the serial port has been resolved
    [Files] - SerialIO.c

    [TAG]- EIP 54526
    [Category]-IMPROVEMENT
    [Description]- PCI serial MMIO device width support added through SDL token
    [Files]- SerialIo.c , TerminalSetup.c , Terminal.sdl

    [TAG] - EIP 61225
    [Category]- IMPROVEMENT
    [Description]- Remove duplicate declarations from Terminal.Added Terminal Type declarations to generic DevicePath.h
    [Files] - Terminal.c

    [TAG]- EIP 53710
    [Category]- New Feature
    [Description]- Add Setup option for Vt-UTF8 combo key support in terminal driver
    [Files]- Terminal.c, Terminal.h, Terminal.sd, Terminal.sdl , Terminal.uni, Terminalboard.h, TerminalSetup.c, TerminalSimpletextin.c

    [TAG]- EIP 57688
    [Category]- New Feature
    [Description]- Add Setup option for Vt-UTF8 combo key support in terminal driver
    [Files]- Terminal.c, Terminal.h, Terminal.sd, Terminal.sdl , Terminal.uni, Terminalboard.h, TerminalSetup.c, TerminalSimpletextin.c

    4.6.3_Terminal_46

  • 4.6.3_Terminal_46 Changes in BIN Driver
    •

    [TAG] - EIP 53292
    [Category]- BUG FIX
    [Severity]- Minor
    [Symptom] - CPU Exception D in Terminal when enabling more than 1 Serial Port.
    [RootCause]- ComPort value is not initilized , that returns junk value causing the invalid exection.
    [Solution] - Initilized to 0xFF
    [Files] - TerminalSetup.c

    [TAG] - EIP48183
    [Category] - IMPROVEMENT
    [Description] - Update the Terminal eModule to utilize Setup Customization
    [Files] - Terminal.sd, TerminalSetupVar.h

    [TAG] - EIP51898
    [Category] - BUG FIX
    [Severity] - Minor
    [Symptom] - SDL tokens are not working in Terminal driver when Terminal source module is not available in project.
    [RootCause] - Tokens are defined in Terminal binary module and are used in source module,so SDL token value changes cannot take effect when source module is not present in the project.
    [Solution] - Replaced SDL tokens used in source module with variables defined in binary module.
    [Files] - Terminal.c, TerminalSetup.c

    [TAG] - EIP 49775
    [Category]- BUG FIX
    [Severity]- Minor
    [Symptom] - Typos/Misspellings in Terminal module.
    [RootCause]- Typos / Misspellings in Terminal module.
    [Solution] - Modified Terminal.uni to fix the spelling mistake
    [Files] - Terminal.uni

  • 4.6.3_Terminal_46 Changes in Source Driver
    •

    [TAG] - EIP 41878
    [Category]- BUG FIX
    [Severity]- Minor
    [Symptom] - When we plug a COM port device (like COM port mouse or loopback) and enabled "Console Redirection". It will show "Exit Without Saving" message window in "Main" page of SETUP.
    [RootCause]- LoopBack device sends the data back to Serial Port , that makes terminal driver to get as Input data and process it as Input Key.
    [Solution] - When there is device present on the COM port, data will not be send it to COM port.
    [Files] - SerialIO.c

    [TAG] - EIP 50989
    [Category]- BUG FIX
    [Severity]- Normal
    [Symptom] - SPCR table created only when the Bios redirection enabled on the COM port.
    [RootCause] - SPCR table was created only if Redirection of COM port is enabled.
    [Solution] - Removed the dependency of creating SPCR when Redirection is enabled.It is created when COM port is available itself.
    [Files] - Terminal.c
    4.6.3_Terminal_45

  • 4.6.3_Terminal_45 Changes in BIN Driver
    •
    [TAG] - EIP42299
    [Category] - IMPROVEMENT
    [Description] - Console Redirection can support 10 COM Ports.
    [Files] - InitTerminalStrings.c, SerialIo.c, Terminal.sd, Terminal.sdl, Terminal.uni, TerminalSetup.c

    [TAG]- EIP 39562
    [Category] - IMPROVEMENT
    [Description]- Show entire PCI address of redirection device in Setup
    [Files]- Terminal.c, TerminalSetup.c, InitTerminalStrings.c

    [TAG] - EIP 46234
    [Category]- BUG FIX
    [Severity]- Normal
    [Symptom] - If TOTAL_PCI_SERIAL_PORTS=1, the BIOS will hang in POST in non-debug mode.Was reproduced in CrownBay.
    [RootCause] - In non-debug mode terminal driver gets garbage value for UINT8 ComPort; in some cases so it hangs.
    [Solution] - UINT8 Comport is initialised to zero.
    [Files] - TerminalSetup.c

    [TAG] - EIP 39842
    [Category]- BUG FIX
    [Severity]- Normal
    [Symptom] - PCI Serial Doesn't work when we change the PCI Serial device to different Slot(TOTAL_PCI_SERIAL_PORTS=1).
    [RootCause] - NVRAM variable was not set to Zero once device was removed from that slot so eventhough device(in another slot) is detected its not shown in Setup.
    [Solution] - NVRAM variable which was set previously when device was present is set to ZERO if the device is not present in current slot.
    [Files] - TerminalSetup.c

    TAG] - EIP 44736
    [Category]- BUG FIX
    [Severity]- Major
    [Symptom] - Terminal label 44 is not building in UEFI2.1 mode
    [RootCause] - suppressif and grayoutif used in Single menu
    [Solution] - Used SUPPRESS_GRAYOUT_ENDIF to resolve the build error
    [Files] - Terminal.sd

  • 4.6.3_Terminal_45 Changes in Source Driver
    •
    [TAG] - EIP 39925
    [Category]- BUG FIX
    [Severity]- Minor
    [Symptom] - Color's displayed in Setup when the Terminal mode is Set to Vt100 in the setup.
    [RootCause] - Terminal drvier was sending ANSI esc sequence on Vt100 mode to set the screen attribute.
    [Solution] - VT100 esc sequence is send on Vt100 mode.
    [Files] - TerminalSimpleTextOut.c

    [TAG]- EIP 39562
    [Category] - IMPROVEMENT
    [Description]- Show entire PCI address of redirection device in Setup
    [Files]- Terminal.c, TerminalSetup.c, InitTerminalStrings.c

    [TAG] - EIP42299
    [Category] - IMPROVEMENT
    [Description] - Console Redirection can support 10 COM Ports.
    [Files] - InitTerminalStrings.c, SerialIo.c, Terminal.sd, Terminal.sdl, Terminal.uni, TerminalSetup.c

  • 4.6.3_Terminal_45 Test Report
    •
    - Tested Redirection on Setup, Shell, and DOS.
    - Tested ESC sequences.
    - Enabled Serial port for Out-Of-Band Management/Windows Emergency Management Services (EMS), SPCR Table was created.
    4.6.3_Terminal_44

  • 4.6.3_Terminal_44 Changes in BIN Driver
    •
    [TAG] - EIP 37440
    [Category]- NEW FEATURE
    [Description]- Serial Port attribute Setup questions added for the debugger console redirection port
    [Files]- Terminal.sd , Terminal.uni, TerminalSetup.c, TerminalSetupvar.h

    [TAG] - EIP 37332
    [Category]- NEW FEATURE
    [Description] - Need to handle different Base Hz values for SerialStatusCode, Terminal, and Legacy Serial Redirection
    FilesModified - TerminalSetup.c

    [TAG] - EIP 38852
    [Category]- NEW FEATURE
    [Description] - Support for Baud Rate 38400 in Terminal Driver
    [Files] - Terminal.sd, Terminal.uni, TerminalSetup.c

    [TAG] - EIP 39524
    [Category]- BUG FIX
    [Severity]- Minor
    [Symptom] - ESC sequence doesn't work on Terminal driver.
    [RootCause]- Timeout between each ESC key is not enough.
    [Solution]- TIMEOUT_FOR_DETERMINING_LONE_ESC_CHAR SDL token Set to 1 Sec
    [Files]Terminal.sd

    [TAG] - EIP 39524
    [Category]- IMPROVEMENT
    [Description] - String Correction for Recorder Mode Help message and Software Flow control Information removed
    [Files] - Termianl.SDL

  • 4.6.3_Terminal_44 Changes in Source Driver
    •
    [TAG] - EIP 37440
    [Category]- NEW FEATURE
    [Description]- Serial Port attribute Setup questions added for the debugger console redirection port
    [Files]- Terminal.c

    [TAG] - EIP 37332
    [Category]- NEW FEATURE
    [Description] - Need to handle different Base Hz values for SerialStatusCode, Terminal, and Legacy Serial Redirection
    FilesModified - SerialIO.c

    [TAG] - None
    [Category]- BUG FIX
    [Severity]- Minor
    [Symptom] - None.
    [RootCause]- None.
    [Solution]- Added FreePool call in TerminalInputUnRegisterKeyNotify function
    [Files]TerminalSimpleTextin.c

    [TAG] - EIP 34504
    [Category]- IMPROVEMENT
    [Description] - Comparing unsigned greater than or equal zero is always true, So removed the comparision.
    [Files] - Termianl.c , SerialIO.c

    [TAG] - EIP 39524
    [Category]- BUG FIX
    [Severity]- Minor
    [Symptom] - ESC sequence doesn't work on Terminal driver.
    [RootCause]- Timeout between each ESC key is not enough.
    [Solution]- Reset timer every time to wait for next key in the sequence instead of Set Timer once for the entire sequence
    [Files]TerminalSimpleTextin.c

    [TAG] - None
    [Category]- BUG FIX
    [Severity]- Minor
    [Symptom] - None.
    [RootCause]- None.
    [Solution]- Added FreePool call in TerminalInputUnRegisterKeyNotify function
    [Files]TerminalSimpleTextin.c

    [TAG] - EIP 39843
    [Category]- IMPROVEMENT
    [Description] - COM port UID should be from 0 to 3 for SerialIo to work. This dependency removed as UID should be unique and it can be from 00 to 0xFF.
    [Files] - Termianl.c , SerialIO.c

  • 4.6.3_Terminal_44 Test Report
    •
    - Tested Redirection on Setup and Shell
    - Tested ESC sequences.
    4.6.3_Terminal_43

    4.6.3_Terminal_43- Changes in BIN Driver
  • Fixed issues:

    Clean up (unneeded target removed).

    Bug fix: the code didn't compile in UEFI 2.1 mode..

    EIP 28461: Enabling Console Redirection COM4 locks SUT in POST
    Added separate controls for PCI serial ports and a separate default.

    Changed token's values to set SIO serial redirection as default.

    Changed token's values to set SIO serial redirection as default.

    Each Com port has SDL token for default value of console Redirection setup option
    EIP 15087.

    Build problem resolved because of removing DEFAULT_CONSOLE_REDIRECTION_ENABLE SDL token..

    4.6.3_Terminal_43- Changes in Source Driver
  • Fixed issues:

    Removed port validation test associated with EIP 25884. It was superceded by a change to AmtWrapper that hides the PCI serial port.

    Serial device with MMIO base address support added.
    EIP 33846

    Bug fix for passing Klockwork test.
    EIP 34375

    Return Status from EfiSerialSetAttribute function corrected
    EIP 35523

    Fixed bug in SupportedLanguages definition

    Recorder mode support Added.
    EIP 34388

    Issue: Remote terminal screen does not refresh properly in Shell after Ctrl-R
    Problem: Refresh data was not properly updated when the screen was scrolled.
    Solution: Modifications to functions TerminalOutputStringHelper() and RefreshScreen().
    EIP 20601

    Corrected problem of EIP 20601 changes not compiling in 32-bit mode.

  • Features in this Release

    Serial device with MMIO base address support added

    Recorder mode support Added

    • 4.6.3_Terminal_42
  • Fixed issues:
    • Software flowControl Removed as SerialIO doesnt support it.
    EIP 34000 - made UEFI 2.1 changes backward compatible.
    EIP 32276 - Corrected problem of setup menu showing very slowly when set the flow controller as hardware but do not connect the rs232 cable
    Fixed compatibility with Core 4.6.3.5
  • Features in the Release
    None

    • 4.6.3_Terminal_41
  • Fixed issues:
    • None
  • Features in the Release
    Added UEFI 2.1 support

    4.6.3_Terminal_40
  • Fixed issues:
    • EIP 31361: Removed SupportedModes variable. Keep the updates for the 100*31 mode support.
    EIP 31551: SPCR table created only once even with multiple entries of Terminal module
    EIP 30023: Fix added to resolve the NVRAM Corruption issue in the projects.
  • Features in the Release
    None

    4.6.3_Terminal_39
  • Fixed issues:
    • EIP 25884, EIP 28461, and EIP 23629: Added more check to validate the Serial device before enabling the redirection for the related issues of enabling Console Redirection COM4 locks SUT in POST.
    EIP 26401: Console Redirection freezes when "CTRL + R" (refresh screen) is used.
  • Features in the Release
    Added more check to validate the Serial device before enabling the redirection.

    4.6.3_Terminal_38_TEMP_NOTTAKE
    Temporary label.

    4.6.3_Terminal_37
  • Fixed issues:
    • EIP 17293: Terminal assumes UID to be started from 0. This assumption removed as UID should be unique and not be started from 0.
    EIP 23764: SerailIo driver to handle Pciserial device based on the SDL token settings.
    EIP 24167: Add Setup question to replace SDL token for LegacyOsResolution.
    EIP 24851: Moved TerminalKeyEvent inside the TerminalDev structure.
    EIP 27335: Removed the Software flow control from Terminal driver. No support.
    EIP 27497: Terminal driver part, same as EIP 24851.
  • Features in the Release
    Removed the Software flow control from Terminal driver. No support any more.
    Added Setup question to replace SDL token for LegacyOsResolution.
    TerminalKeyEvent is a part of TerminalDev structure.
    4.6.3_Terminal_36
  • Fixed issues:
    • UID in device path cannot start from 0 (EIP 23731)
    Improper mode switching behavior (EIP 25955)
    Compiler failure with unexpected tokens combinations (EIP 23076)
    Fixed bug in SetState() function (EIP 27601)
    Added status check in SerialIoRead function inside ReadSerialPort (EIP 26727)
    Fixed bug in CTRL+R behavior in UEFI shell (EIP 25687)
    Fixed bug with VendorID, DeviceID in SPCR ACPI table (EIP 24068)
  • Features in the Release
    Added support for AMI debugger
    Added SDL tokens for PCI serial device in SerialIO driver
    ESC sequences moved to board component
    Added SDL token for UART FIFO buffer size
    • 4.6.3_Terminal_35
  • Issue: Hangs in SCT Serial IO test (EIP 22988).
    • Problems: PassedInBufferSize in function EfiSerialRead() not properly initialized. Infinite loop to test THRE in function EfiSerialWrite().
    Initialized PassedInBufferSize. Made THRE loop a timed loop. BufferSize indicates the failure if it times out.
  • Symptom: Coding Standard and File header updated.
    • 4.6.3_Terminal_34
  • Symptom:In AMIDIAG, running either Serial Port Baud Rate or Data Transfer test in Standalone mode cause SUT to hang.
    • Solution: The problem is in Terminal driver to find the ACPI device path. Fix is adding do-while until find the ACPI_DEVICE_PATH.
    Eip: 15305.
  • Symptom:In AMIDIAG, running either Serial Port Baud Rate or Data Transfer test in Standalone mode, tests fail.
    Solution: The problem is software loopback is a byte buffer. Fix is increasing the loopback buffer to 16 bytes, max support based on EFI spec.
    Eip: 15305.
  • Symptom:SCT failure on SetState function.
    Solution: Validated the Input parameters for the SetState Function.
    Eip: 18987.
  • Symptom:SCT failure in ReadKeystrokeEx function.
    Solution: Validated the Input parameters Keydata for the ReadKeystrokeEx Function.
    Eip: 19039.
  • Symptom: If SetAttribute or the following SetControl call fails, System will hung up.
    Solution: Uninstall the protocol and all the Event that created by Terminal Driver.
    Eip: 18983.
    • 4.6.3_Terminal_33
  • ESC key not working in shell. EIP 18306.
    • 4.6.3_Terminal_32
  • Resolved SCT failure on RegisterKeyNotify and UnregisterKeyNotify.
  • Manufacturing flag bug Terminal.sd corrected. Problem shows up if there is more than 1 serial port.
    • 4.6.3_Terminal_31
  • Bug fix. QueryMode returns the mode set by the Resolution setup question.
  • RefreshScreen function added. CTRL+R will refresh the screen.
  • Bug fix. When the arrow keys are pressed and lots of escape sequences are generated quickly,sometimes parts of the sequences are lost. The module will mistakenly interpret a broken escape sequence as just an escape character. A timer event was created just to monitor the escape key.
  • Register/Unregister function implementation for the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
    • 4.6.3_Terminal_30
  • changed the value of an sdl token.
    • 4.6.3_Terminal_29
  • corrected the value of an sdl token.
    • 4.6.3_Terminal_28
  • Addition of terminal modes.
  • Hack for turning terminal off for the SCT test.
    • 4.6.3_Terminal_27
  • Support for SimpleTextInEx and AmiKeycode protocols added
  • Support for 100x31 mode has been added
    • 4.6.3_Terminal_26
    Release notes added to Terminal.chm.
    4.6.3_Terminal_25
    More comments added to file headers for Terminal.chm.

    © American Megatrends Inc.


Release Notes - NDA Required

Component Information:
Component Title: Serial Redirection
Component Reference Name: Terminal
Component Type: eModule
Release Date: 2012-07-05
Source Control Label: 4.6.3_Terminal_51
Source Control Location: SS: Alaska;$/Alaska/BIN/Modules/Terminal;
Dependencies
Component Dependencies
N0NE

File Dependencies
N0NE

Protocol Dependencies
N0NE
Non-Compiled BIN and LIB File(s) within this Component:

Terminal.lib
Terminalx64.lib
Component Title: Serial Redirection Sources
Component Reference Name: TerminalSrc
Component Source Control Label: 4.6.3_Terminal_51
Component Source Control Location: SS: Alaska;$/Alaska/SOURCE/Modules/Terminal;
Project Source Control Label: 4.6.3_Terminal_51
Project Source Control Location: SS: Alaska;$/Alaska/SOURCE/Modules/Terminal;
Component Description:
Terminal driver can be added to EFI BIOS to provide Serial Redirection support in Setup, Shell and various remote management consoles like Emergency Management Services. This driver supports both PCI and ISA COM ports and also MMIO type Serial devices. It can support standard ESC sequences.This driver provides the setup option to configure the Redirection port parameters. (Serial debug messages are implemented by the Status Code module and do not require this module).
Filename | Description
Main Component | Root\Core\em\Terminal
Terminal.cif | Component information file for the eModule.
Terminal.mak | Make file becomes part of the BIOS build process.
Terminal.sdl | Contains Terminal binary module BIOS build parameters.
TerminalSetupVar.h | File that contains definitions for variables which keep track of which serial ports are enabled.
TerminalSetup.c | File that contains routines used by the functions in Terminal.lib/Terminalx64.lib to get user configurable Terminal/Serial setup values.
InitTerminalStrings.c | File that contains routines that does runtime modification of Terminal related Setup strings that are defined in Terminal.uni.
Terminal.sd | File that contains the constructs for the setup page "Advanced Tab\Serial Port Console Redirection.
Terminal.uni | File that contains the definitions of the Unicode strings used in the Terminal\Serial setup page.
TerminalBoard.h | File that contains board related routines.
Terminal.lib | This is the "Serial Redirection Sources" module built in IA32 mode. If the "Serial Redirection Sources" module is included in the project, this file will not be used. Instead, the "Serial Redirection Sources" module will be compiled and linked
Terminalx64.lib | This is the "Serial Redirection Sources" module built in x64 mode. If the "Serial Redirection Sources" module is included in the project, this file will not be used. Instead, the "Serial Redirection Sources" module will be compiled and linked. The compiled version of "Serial Redirection Sources" is called "Terminal.lib." We renamed it in order to add it to this module
TerminalSrc.cif | Component information file for the eModule
TerminalSrc.mak | Make file becomes part of the BIOS build process.
TerminalSrc.sdl | Contains Terminal Source module BIOS build parameters.
SerialIo.c | File that contains Driver routines for serial ports (both super io and pci). Installs EFI_SERIAL_IO_PROTOCOL for a serial device. Adds UART_DEVICE_PATH and UART_FLOW_CONTROL_DEVICE_PATH nodes to its device path.
Terminal.c | File that contains routines to install EFI_SIMPLE_TEXT_INPUT_PROTOCOL and EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL for a serial device. Adds a vendor messaging path for the terminal type (PcAnsi, VT100, etc) to its device path.
Terminal.h | File that contains TERMINAL_TYPE and TERMINAL_DEV and related definitions.
TerminalName.c | Gets the driver name.
TerminalSimpleTextIn.c | Implements the SimpleTextIn protocol for the Terminal. Interfaces with the SerialIo protocol to get and write characters to the serial port.
TerminalSimpleTextOut.c | Implements the SimpleTextOut protocol for the Terminal.
TerminalAcpi.c | This file contains function to disable the PCI redirection at ACPI enable call.
Terminal AmiSerial
Protocol 		Root\Include\Protocol
TerminalAmiSerial.h | File that contains definitions for variables which keep track of which serial ports are enabled.
BIOS Parameters:
Parameters Name | Type | Description
Terminal_SUPPORT | Boolean | Switch to Enable/Disable Serial Redirection support in Project
SerialIo_SUPPORT | Boolean | Switch to Enable/Disable Serial Driver Support
SERIALIO_PCI_SERIAL_SUPPORT | Boolean | Switch to Enable/Disable PCI Serial Devices Support
DISABLE_TERMINAL_FOR_SCT_TEST | Integer | To disable Serial Redirection if SCT test is done
TOTAL_SIO_SERIAL_PORTS | Integer | Total number of Super IO serial ports present
TOTAL_PCI_SERIAL_PORTS | Integer | Total number of PCI serial ports present
TOTAL_SERIAL_PORTS | Integer | Total number of serial ports present (both Super IO and PCI)
MAX_SIO_SERIAL_PORTS | Integer | Maximum Number of SIO Serial Ports
MAX_PCI_SERIAL_PORTS | Integer | Maximum Number of PCI Serial Ports
PCI_SERIAL_PORT_INDEX_BASE Integer Used in Terminal.sd.
1 - EFI_SPECIFICATION_VERSION < 0x2000A
0 - EFI_SPECIFICATION_VERSION >= 0x2000A
PCI_SERIAL_PORT_0_INDEX | Integer | Used in the Terminal.sd file
PCI_SERIAL_PORT_1_INDEX | Integer | Used in Terminal.sd file. VfrCompile does not allow the use of arithmetic expressions as array indices
PCI_SERIAL_PORT_2_INDEX | Integer | Used in Terminal.sd file. VfrCompile does not allow the use of arithmetic expressions as array indices
PCI_SERIAL_PORT_3_INDEX | Integer | Used in Terminal.sd file. VfrCompile does not allow the use of arithmetic expressions as array indices
UART_DEFAULT_BAUD_RATE | Integer | UART's Default Baud Rate - 115200 bits/Sec
UART_DEFAULT_BAUD_RATE_INDEX | Integer | Index into array gAcpiSpcrTableComBaudRates
UART_DEFAULT_DATA_BITS | Integer | UART's Default number of Data bits during Transmission - 8 bits
UART_DEFAULT_PARITY | Integer | UART Default Parity - No Parity
UART_DEFAULT_STOP_BITS | Integer | UART's Default Stop bits - 1
UART_DEFAULT_FLOW_CONTROL | Integer | UART's Default Flow Control - 0
UART_DEFAULT_LOOPBACK_ENABLE | Integer | UART's Default loopback enable - 0
DEFAULT_CONSOLE_REDIRECTION_ENABLE | Boolean | Switch to Enable/Disable Console Redirection
DEFAULT_DEBUGGER_CONSOLE_REDIRECTION_ENABLE | Boolean | Rx/Redir/Debugger port found then enable/disable Console Redirection
DEFAULT_ACPI_SPCR_COM_PORT | Integer | Default ACPI SPCR com port - 0
DEFAULT_TERMINAL_TYPE | Integer | Default Terminal type - ANSI
EXTENDED_RESOLUTION_ENABLE | Boolean | Switch to Enable/Disable 100 x 31 terminal resolution
RECORDER_MODE_ENABLE | Boolean | Switch to Enable/Disable Terminal Recorder mode
DEFAULT_ACPI_SPCR_CONSOLE_REDIRECTION_ENABLE | Boolean | Switch to Enable/Disable ACPI SPCR Console Redirection
DEFAULT_ACPI_SPCR_TABLE_TERMINAL_TYPE | Integer | Default ACPI SPCR Terminal type - VT_UTF8
HARDWARE_FLOW_CONTROL_SETUP_OPTION | Integer | Hardware Flow control Setup option
SOFTWARE_FLOW_CONTROL_SETUP_OPTION | Integer | Software Flow control Setup option
TIMEOUT_FOR_DETERMINING_LONE_ESC_CHAR | Integer | TimeOut for Determining lone escape character - 10000000
NUMBER_OF_TIME_FOR_ESC_SEQUENCE_CHECKING | Integer | Number of times to check escape sequence - 20
SPCR_ACPI_OEM_ID | Expression | SPCR OEM Id, string value to be filled into SPCR ACPI table headers
SPCR_ACPI_OEM_TBL_ID | Expression | SPCR OEM table Id, string value to be filled into SPCR ACPI table headers
UART_FIFO_SIZE | Integer | UART fifo size. Maximum supported UART size is 16
REFRESH_SCREEN_KEY | Integer | Unicode Value of Key to Refresh the Screen.Default it set to Ctrl+r
spcr_interface_type | Integer | Indicate the type of the COM Port register interface
spcr_addr_spc_id | Integer | Represents UART BLK Register Id
spcr_addr_bit_width | Integer | Represents UART BLK Register Bit Width
spcr_addr_bit_offset | Integer | Represents UART BLK Register Bit Offset
spcr_access_size | Integer | UART BLK Register Bit Offset
spcr_interrupt_type | Integer | Interrupt type(s) used by the UART
spcr_global_system_int | Integer | Represents I/O APIC mode IRQ#
spcr_parity | Integer | Shows the UART parity check
spcr_stop_bits | Integer | UART stop bits
spcr_pci_device_id | Integer | Device ID,if UART is on PCI bus
spcr_pci_vendor_id | Integer | Vendor ID,if UART is on PCI bus
spcr_pci_bus_number | Integer | BUS#,if UART is on PCI bus
spcr_pci_device_number | Integer | DEVICE#,if UART is on PCI bus
spcr_pci_function_number | Integer | FUNCTION#,if UART is on PCI bus
spcr_pci_flags | Integer | PCI flags,if UART is on PCI bus
spcr_pci_segment | Integer | PCI Segment,if UART is on PCI bus
TerminalSrc_SUPPORT | Boolean | Switch to Enable/Disable Serial Redirection Source support in Project
CLEAR_TERMINAL_KB_BUFFER_AT_READYTOBOOT | Boolean | ON- Terminal KB Buffer will be cleared at ReadyToBoot.\OFF - Terminal KB Buffer will not be cleared at ReadyToBoot
PUTTY_VT100 | Integer | Putty Vt100 KeyPad Value
PUTTY_LINUX | Integer | Putty Linux KeyPad Value
PUTTY_XTERMR6 | Integer | Putty XtermR6 KeyPad Value
PUTTY_SCO | Integer | Putty SCO KeyPad Value
PUTTY_ESCN | Integer | Putty Escn KeyPad Value
PUTTY_VT400 | Integer | Putty Vt400 KeyPad Value
INSTALL_LEGACY_OS_THROUGH_REMOTE | Boolean | Install Legacy OS like Linux through redirection. To make that happen some Linux are force to install in text mode and some others are redirected in graphics mode itseld. Note: All Linux Versions cannot be installed through remote as different Linux kernel's behave differently.
OEM_ESC_SEQUENCES | Boolean | 1- Enable OEM ESC Sequence.\0 - Disable OEM ESC Sequence.
DONT_SEND_ASCII_CONTROL_PRINTABLE_CHARACTERS | Boolean | Applications like HyperTerminal supports printable characters in the ASCII control characters value's(0 - 0x1F) but Putty does not. so,to print the printable ASCII control characters we will send the equivalent ASCII printable value(whichever is applicable) if the token is enabled.
DISABLE_PCI_REDIRECTION_ON_ACPI_ENABLE_DISABLE | Boolean | When Redirection is enabled for Legacy OS, the system installation gets slow as Legacy Serial Redirection enables the PCI Serial interrupt for redirection and sometime after that OS uses its own IVT but PCI Serial interrupt is generated and not handled.So, disable redirection at OS level. we disable redirection on ACPI enable/disable call and reset the Interrupt Enable Register.
MAX_FAILURES_ALLOWED | Integer | The allowed range is 1 to 0xFF. This token value controls the hardware flow control retry count. Once the counter expired hardware flow control will be disabled.
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_39, Dated: 2011-01-04
Visual eBios: RSS.5.72.0220, Dated: 2011-01-04
Compiler Tool(s): Microsoft's Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
N0NE
General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes:
  • EIP#90413 - Shift "+" (plus) key is not working in TSE 4.6.2_TSE_2_15_1224.
  • EIP#84983 - Improper shell display in terminal.
    • EIP addressed in this label:
  • EIP#93519 - make hardware flow control maximum re-try count as SDL token.
  • EIP#90467 - LoopBack Detection is implemented in Legacy Console Redirection. If LoopBack Device found , Interrupts are not hooked. Also added check for any false device from Super IO.
  • EIP#90413 - Shift "+" (plus) key is not working in TSE 4.6.2_TSE_2_15_1224.
  • EIP#84983 - Improper shell display in terminal.
    • Files Changed for General Bug Fixes and EIP Addressed in this Label:
    Files changed for EIP fixes:
  • Root\Core\em\Terminal\Terminal.sdl (EIP #93519)
  • Root\Core\em\Terminal\TerminalSetup.c (EIP #93519)
  • Root\Core\em\Terminal\SerialIo.c (EIP #93519, 90467)
  • Root\Core\em\Terminal\TerminalSimpleTextIn.c (EIP #90413)
  • Root\Core\em\Terminal\TerminalSimpleTextOut.c (EIP #84983 )
    • Unit Testing:
    Hardware : Use Serial Cable to connect System Under Test (SUT) and HOST system.
    Software : Windows - HyperTerminal and Putty.
    1. Verify in Setup, Shell and DOS
      • Aptio Setup Utility, in Advanced Tab, there is Serial Port Console Redirection Setup Question.
      • In Setup, Shell, and DOS, need verify seeing video in HOST side.
      • Keyboard could type in on both HOST and Target sides.
      • All Setup questions combinations had been tested.

    2. Verify SPCR table creation
      • Enable Console Redirection for the setup question of Serial port for Out-Of-Band Management/Windows Emergency Management Services (EMS).
      • Run Acpidump.exe in DOS. In Acpidump.log, SPCR table will be created.
      • In Shell, dump mem with the address specified in Acpidump.log will see the SPCR table.

    3. On HOST side, press Ctrl+r, will refresh the screen.
    Validation Test Report

    Validation Test Report.
    Release History:

    4.6.3_Terminal_51

  • 4.6.3_Terminal_51 Changes in BIN Driver
    •

    [TAG] - EIP93519
    [Category] - Improvement
    [Description] - make hardware flow control maximum re-try count as SDL token.
    [Files] - Terminal.sdl, TerminalSetup.c

  • 4.6.3_Terminal_51 Changes in Source Driver
    •

    [TAG] - EIP93519
    [Category] - Improvement
    [Description] - make hardware flow control maximum re-try count as SDL token.
    [Files] - SerialIo.c

    [TAG] EIP90467
    [Category] Improvement
    [Description] - LoopBack Detection is implemented in Legacy Console Redirection. If LoopBack Device found , Interrupts are not hooked. Also added check for any false device from Super IO.
    [Files] - Sredir.asm, SerialIo.c

    [TAG] EIP90413
    [Category] Bug Fix
    [Severity] Normal
    [Symptom] Shift "+" (plus) key is not working in TSE 4.6.2_TSE_2_15_1224.
    [RootCause] Shift State is not properly updated when valid Unicode char's are pressed.
    [Solution] Shift State is properly updated when valid Unicode char's are pressed.
    [Files] - TerminalSimpleTextIn.c

    [TAG] EIP84983
    [Category] Bug Fix
    [Severity] Minor
    [Symptom] Improper shell display in terminal.
    [RootCause] cursor position was not set in clear screen
    [Solution] Cursor position is set to (0.0) in clear screen.
    [Files] - TerminalSimpleTextOut.c

    4.6.3_Terminal_50

  • 4.6.3_Terminal_50 Changes in BIN Driver
    •

    [TAG] - EIP57579
    [Category] - Improvement
    [Description] - PCI legacy console redirection causes Legacy OS installation slow because when Redirection is enabled for Legacy OS, Legacy Serial Redirection enables the PCI Serial interrupt for redirection and sometime after that OS uses its own IVT but still PCI Serial interrupt is generated and not handled.So, disable redirection at OS level. we disable redirection on ACPI enable/disable call and reset the Interrupt Enable Register so that interrupt is not generated.
    [Files] - Terminal.sdl, Terminal.mak, Terminal.cif, TerminalAcpi.c

    Note: This EIP change would work for the SouthBridge Source which uses SB Template (4.6.3.5_SB-Template_011) and above

    [TAG] - EIP86477
    [Category] - Improvement
    [Description] - PuttyKeyPad value is returned as non-zero(PUTTY_VT100) from GetSetupValuesForTerminal() if there is any error in that function.
    [Files] - TerminalSetup.c

    [TAG] - EIP84341
    [Category] - Improvement
    [Description] - Added Separate PCI_UART_INPUT_CLOCK token for setting the Clock for PCI Serial UART.
    [Files] - Terminal.sdl, TerminalSetup.c, SerialIo.c, LegacySredir.c, LegacySredir_Setup.c

  • 4.6.3_Terminal_50 Changes in Source Driver
    •

    [TAG] EIP75398
    [Category] Bug Fix
    [Severity] Normal
    [Symptom] Hyperterminal has some character displayed in non-debug mode .
    [RootCause] Character displayed is the character sent for checking the presence of Loop Back Device.
    [Solution] BackSpace Character is sent after the character, sent for testing LoopBack Device.
    [Files] - SerialIo.c

    [TAG] - EIP84341
    [Category] - Improvement
    [Description] - Added Separate PCI_UART_INPUT_CLOCK token for setting the Clock for PCI Serial UART.
    [Files] - Terminal.sdl, TerminalSetup.c, SerialIo.c, LegacySredir.c, LegacySredir_Setup.c

    Release_4.6.3_Terminal_50

    © American Megatrends Inc.


Release Notes - NDA Required

Component Information:
Component Title: Serial Redirection
Component Reference Name: Terminal
Component Type: eModule
Release Date: 2012-11-15
Source Control Label: 4.6.3_Terminal_52
Source Control Location: SS: Alaska;$/Alaska/BIN/Modules/Terminal;
Dependencies
Component Dependencies
N0NE

File Dependencies
N0NE

Protocol Dependencies
N0NE
Non-Compiled BIN and LIB File(s) within this Component:

Terminal.lib
Terminalx64.lib
Component Title: Serial Redirection Sources
Component Reference Name: TerminalSrc
Component Source Control Label: 4.6.3_Terminal_52
Component Source Control Location: SS: Alaska;$/Alaska/SOURCE/Modules/Terminal;
Project Source Control Label: 4.6.3_Terminal_52
Project Source Control Location: SS: Alaska;$/Alaska/SOURCE/Modules/Terminal;
Component Description:
Terminal driver can be added to EFI BIOS to provide Serial Redirection support in Setup, Shell and various remote management consoles like Emergency Management Services. This driver supports both PCI and ISA COM ports and also MMIO type Serial devices. It can support standard ESC sequences.This driver provides the setup option to configure the Redirection port parameters. (Serial debug messages are implemented by the Status Code module and do not require this module).
Filename | Description
Main Component | Root\Core\em\Terminal
Terminal.cif | Component information file for the eModule.
Terminal.mak | Make file becomes part of the BIOS build process.
Terminal.sdl | Contains Terminal binary module BIOS build parameters.
TerminalSetupVar.h | File that contains definitions for variables which keep track of which serial ports are enabled.
TerminalSetup.c | File that contains routines used by the functions in Terminal.lib/Terminalx64.lib to get user configurable Terminal/Serial setup values.
InitTerminalStrings.c | File that contains routines that does runtime modification of Terminal related Setup strings that are defined in Terminal.uni.
Terminal.sd | File that contains the constructs for the setup page "Advanced Tab\Serial Port Console Redirection.
Terminal.uni | File that contains the definitions of the Unicode strings used in the Terminal\Serial setup page.
TerminalBoard.h | File that contains board related routines.
Terminal.lib | This is the "Serial Redirection Sources" module built in IA32 mode. If the "Serial Redirection Sources" module is included in the project, this file will not be used. Instead, the "Serial Redirection Sources" module will be compiled and linked
Terminalx64.lib | This is the "Serial Redirection Sources" module built in x64 mode. If the "Serial Redirection Sources" module is included in the project, this file will not be used. Instead, the "Serial Redirection Sources" module will be compiled and linked. The compiled version of "Serial Redirection Sources" is called "Terminal.lib." We renamed it in order to add it to this module
TerminalSrc.cif | Component information file for the eModule
TerminalSrc.mak | Make file becomes part of the BIOS build process.
TerminalSrc.sdl | Contains Terminal Source module BIOS build parameters.
SerialIo.c | File that contains Driver routines for serial ports (both super io and pci). Installs EFI_SERIAL_IO_PROTOCOL for a serial device. Adds UART_DEVICE_PATH and UART_FLOW_CONTROL_DEVICE_PATH nodes to its device path.
Terminal.c | File that contains routines to install EFI_SIMPLE_TEXT_INPUT_PROTOCOL and EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL for a serial device. Adds a vendor messaging path for the terminal type (PcAnsi, VT100, etc) to its device path.
Terminal.h | File that contains TERMINAL_TYPE and TERMINAL_DEV and related definitions.
TerminalName.c | Gets the driver name.
TerminalSimpleTextIn.c | Implements the SimpleTextIn protocol for the Terminal. Interfaces with the SerialIo protocol to get and write characters to the serial port.
TerminalSimpleTextOut.c | Implements the SimpleTextOut protocol for the Terminal.
TerminalAcpi.c | This file contains function to disable the PCI redirection at ACPI enable call.
Terminal AmiSerial
Protocol 		Root\Include\Protocol
TerminalAmiSerial.h | File that contains definitions for variables which keep track of which serial ports are enabled.
BIOS Parameters:
Parameters Name | Type | Description
Terminal_SUPPORT | Boolean | Switch to Enable/Disable Serial Redirection support in Project
SerialIo_SUPPORT | Boolean | Switch to Enable/Disable Serial Driver Support
SERIALIO_PCI_SERIAL_SUPPORT | Boolean | Switch to Enable/Disable PCI Serial Devices Support
DISABLE_TERMINAL_FOR_SCT_TEST | Integer | To disable Serial Redirection if SCT test is done
TOTAL_SIO_SERIAL_PORTS | Integer | Total number of Super IO serial ports present
TOTAL_PCI_SERIAL_PORTS | Integer | Total number of PCI serial ports present
TOTAL_SERIAL_PORTS | Integer | Total number of serial ports present (both Super IO and PCI)
MAX_SIO_SERIAL_PORTS | Integer | Maximum Number of SIO Serial Ports
MAX_PCI_SERIAL_PORTS | Integer | Maximum Number of PCI Serial Ports
PCI_SERIAL_PORT_INDEX_BASE Integer Used in Terminal.sd.
1 - EFI_SPECIFICATION_VERSION < 0x2000A
0 - EFI_SPECIFICATION_VERSION >= 0x2000A
PCI_SERIAL_PORT_0_INDEX | Integer | Used in the Terminal.sd file
PCI_SERIAL_PORT_1_INDEX | Integer | Used in Terminal.sd file. VfrCompile does not allow the use of arithmetic expressions as array indices
PCI_SERIAL_PORT_2_INDEX | Integer | Used in Terminal.sd file. VfrCompile does not allow the use of arithmetic expressions as array indices
PCI_SERIAL_PORT_3_INDEX | Integer | Used in Terminal.sd file. VfrCompile does not allow the use of arithmetic expressions as array indices
UART_DEFAULT_BAUD_RATE | Integer | UART's Default Baud Rate - 115200 bits/Sec
UART_DEFAULT_BAUD_RATE_INDEX | Integer | Index into array gAcpiSpcrTableComBaudRates
UART_DEFAULT_DATA_BITS | Integer | UART's Default number of Data bits during Transmission - 8 bits
UART_DEFAULT_PARITY | Integer | UART Default Parity - No Parity
UART_DEFAULT_STOP_BITS | Integer | UART's Default Stop bits - 1
UART_DEFAULT_FLOW_CONTROL | Integer | UART's Default Flow Control - 0
UART_DEFAULT_LOOPBACK_ENABLE | Integer | UART's Default loopback enable - 0
DEFAULT_CONSOLE_REDIRECTION_ENABLE | Boolean | Switch to Enable/Disable Console Redirection
DEFAULT_DEBUGGER_CONSOLE_REDIRECTION_ENABLE | Boolean | Rx/Redir/Debugger port found then enable/disable Console Redirection
DEFAULT_ACPI_SPCR_COM_PORT | Integer | Default ACPI SPCR com port - 0
DEFAULT_TERMINAL_TYPE | Integer | Default Terminal type - ANSI
EXTENDED_RESOLUTION_ENABLE | Boolean | Switch to Enable/Disable 100 x 31 terminal resolution
RECORDER_MODE_ENABLE | Boolean | Switch to Enable/Disable Terminal Recorder mode
DEFAULT_ACPI_SPCR_CONSOLE_REDIRECTION_ENABLE | Boolean | Switch to Enable/Disable ACPI SPCR Console Redirection
DEFAULT_ACPI_SPCR_TABLE_TERMINAL_TYPE | Integer | Default ACPI SPCR Terminal type - VT_UTF8
HARDWARE_FLOW_CONTROL_SETUP_OPTION | Integer | Hardware Flow control Setup option
MAX_FAILURES_ALLOWED | Integer | The allowed range is 1 to 0xFF. This token value controls the hardware flow control retry count. Once the counter expired Redirection will be disabled and will be enabled again when host is ready to accept the data(i.e CTS is Set).
SOFTWARE_FLOW_CONTROL_SETUP_OPTION | Integer | Software Flow control Setup option
TIMEOUT_FOR_DETERMINING_LONE_ESC_CHAR | Integer | TimeOut for Determining lone escape character - 10000000
NUMBER_OF_TIME_FOR_ESC_SEQUENCE_CHECKING | Integer | Number of times to check escape sequence - 20
SPCR_ACPI_OEM_ID | Expression | SPCR OEM Id, string value to be filled into SPCR ACPI table headers
SPCR_ACPI_OEM_TBL_ID | Expression | SPCR OEM table Id, string value to be filled into SPCR ACPI table headers
UART_FIFO_SIZE | Integer | UART fifo size. Maximum supported UART size is 16
REFRESH_SCREEN_KEY | Integer | Unicode Value of Key to Refresh the Screen.Default it set to Ctrl+r
spcr_interface_type | Integer | Indicate the type of the COM Port register interface
spcr_addr_spc_id | Integer | Represents UART BLK Register Id
spcr_addr_bit_width | Integer | Represents UART BLK Register Bit Width
spcr_addr_bit_offset | Integer | Represents UART BLK Register Bit Offset
spcr_access_size | Integer | UART BLK Register Bit Offset
spcr_interrupt_type | Integer | Interrupt type(s) used by the UART
spcr_global_system_int | Integer | Represents I/O APIC mode IRQ#
spcr_parity | Integer | Shows the UART parity check
spcr_stop_bits | Integer | UART stop bits
spcr_pci_device_id | Integer | Device ID,if UART is on PCI bus
spcr_pci_vendor_id | Integer | Vendor ID,if UART is on PCI bus
spcr_pci_bus_number | Integer | BUS#,if UART is on PCI bus
spcr_pci_device_number | Integer | DEVICE#,if UART is on PCI bus
spcr_pci_function_number | Integer | FUNCTION#,if UART is on PCI bus
spcr_pci_flags | Integer | PCI flags,if UART is on PCI bus
spcr_pci_segment | Integer | PCI Segment,if UART is on PCI bus
TerminalSrc_SUPPORT | Boolean | Switch to Enable/Disable Serial Redirection Source support in Project
CLEAR_TERMINAL_KB_BUFFER_AT_READYTOBOOT | Boolean | ON- Terminal KB Buffer will be cleared at ReadyToBoot.\OFF - Terminal KB Buffer will not be cleared at ReadyToBoot
PUTTY_VT100 | Integer | Putty Vt100 KeyPad Value
PUTTY_LINUX | Integer | Putty Linux KeyPad Value
PUTTY_XTERMR6 | Integer | Putty XtermR6 KeyPad Value
PUTTY_SCO | Integer | Putty SCO KeyPad Value
PUTTY_ESCN | Integer | Putty Escn KeyPad Value
PUTTY_VT400 | Integer | Putty Vt400 KeyPad Value
INSTALL_LEGACY_OS_THROUGH_REMOTE | Boolean | Install Legacy OS like Linux through redirection. To make that happen some Linux are force to install in text mode and some others are redirected in graphics mode itseld. Note: All Linux Versions cannot be installed through remote as different Linux kernel's behave differently.
OEM_ESC_SEQUENCES | Boolean | 1- Enable OEM ESC Sequence.\0 - Disable OEM ESC Sequence.
DONT_SEND_ASCII_CONTROL_PRINTABLE_CHARACTERS | Boolean | Applications like HyperTerminal supports printable characters in the ASCII control characters value's(0 - 0x1F) but Putty does not. so,to print the printable ASCII control characters we will send the equivalent ASCII printable value(whichever is applicable) if the token is enabled.
DISABLE_PCI_REDIRECTION_ON_ACPI_ENABLE_DISABLE | Boolean | When Redirection is enabled for Legacy OS, the system installation gets slow as Legacy Serial Redirection enables the PCI Serial interrupt for redirection and sometime after that OS uses its own IVT but PCI Serial interrupt is generated and not handled.So, disable redirection at OS level. we disable redirection on ACPI enable/disable call and reset the Interrupt Enable Register.
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_40, Dated: 2012-06-21
Visual eBios: RSS.5.73.0239, Dated: 2012-06-21
Compiler Tool(s): Microsoft's Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
NONE
General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
EIP #98904 - String "Ç" displayed in Hyper-terminal during POST.
EIP #102238 - Remote Keyboard not working in DOS in ME SOL
EIP #102075 - Terminal driver not providing valid shift state on using ESC sequence

EIP Addressed
EIP #95246 - RTS is used to control redirection flow when FlowControl is enabled. When RTS is disabled (host not ready to accept data) Redirection is disabled and when RTS is enabled (i.e CTS is set) Redirection is enabled again.
Files Changed for General Bug Fixes and EIP Addressed in this Label:

EIP Addressed
Root\Core\em\Terminal\Terminal.sdl (EIP #95246)
Root\Core\em\Terminal\SerialIo.c (EIP #95246, #98904, #102238 )
Root\Core\em\Terminal\TerminalSimpleTextIn.c (EIP #102075)
Known Limitations and Erratas in this label:
NONE
Remaining Issues:
NONE
Unit Testing:
Hardware : Use Serial Cable to connect System Under Test (SUT) and HOST system.
Software : Windows - HyperTerminal and Putty.
  1. Verify in Setup, Shell and DOS
    • Aptio Setup Utility, in Advanced Tab, there is Serial Port Console Redirection Setup Question.
    • In Setup, Shell, and DOS, need verify seeing video in HOST side.
    • Keyboard could type in on both HOST and Target sides.
    • All Setup questions combinations had been tested.

  2. Verify SPCR table creation
    • Enable Console Redirection for the setup question of Serial port for Out-Of-Band Management/Windows Emergency Management Services (EMS).
    • Run Acpidump.exe in DOS. In Acpidump.log, SPCR table will be created.
    • In Shell, dump mem with the address specified in Acpidump.log will see the SPCR table.

  3. On HOST side, press Ctrl+r, will refresh the screen.
Validation Testing:
Here is the Quality Assurance System Test Plan
Here is the Quality Assurance Test Results
Release History:

4.6.3_Terminal_52

  • 4.6.3_Terminal_52 Changes in BIN Driver
    •

    • [TAG] - EIP95246
      [Category] - Improvement
      [Description] - RTS is used to control redirection flow when FlowControl is enabled. When RTS is disabled (host not ready to accept data) Redirection is disabled and when RTS is enabled (i.e CTS is set) Redirection is enabled again.
      [Files] - Terminal.sdl, SerialIo.c, LegacySredir.c, SREDIR.ASM, INT10REDIR.ASM, GRAPHREDIR.ASM

  • 4.6.3_Terminal_52 Changes in Source Driver
    •

    • [TAG] - EIP95246
      [Category] - Improvement
      [Description] - RTS is used to control redirection flow when FlowControl is enabled. When RTS is disabled (host not ready to accept data) Redirection is disabled and when RTS is enabled (i.e CTS is set) Redirection is enabled again.
      [Files] - Terminal.sdl, SerialIo.c, LegacySredir.c, SREDIR.ASM, INT10REDIR.ASM, GRAPHREDIR.ASM

    • [TAG] - EIP98904
      [Category] - Bug Fix
      [Severity] - Normal
      [Symptom] - String "Ç" displayed in Hyper-terminal during POST.
      [RootCause] - The String Ç was sent to test for presence the of Loopback Device. And when a Backspace was sent to clear "Ç", the cursor position only got shifted to 1 place left but didn`t clear the character.
      [Solution] - First sent a Backspace character to move to 1 place left. Then sent a Space character to clear it. And again a Backspace character to reset the Cursor position.
      [Files] - SerialIo.c

    • [TAG] - EIP102238
      [Category] - Bug Fix
      [Severity] - Normal
      [Symptom] - Remote Keyboard not working in DOS in ME SOL
      [RootCause] - DTE will be disbaled for checking Presence of Serial mouse.The DTE is not enabled again, so the application thinks the client is not ready and stops sending the data
      [Solution] - DTE(Data Terminal Ready) is enabled after checking the presence of serial mouse.
      [Files] - SREDIR.ASM, SerialIo.c

    • [TAG] - EIP102075
      [Category] - Bug Fix
      [Severity] - Minor
      [Symptom] - Terminal driver not providing valid shift state on using ESC sequence
      [RootCause] - SHIFT_STATE_VALID bit is not set for the KeyShiftState
      [Solution] - SHIFT_STATE_VALID bit is set properly for the KeyShiftState
      [Files] - TerminalSimpleTextIn.c

    Release_4.6.3_Terminal_51
    Release_4.6.3_Terminal_50

    © American Megatrends Inc.


Release Notes - NDA Required

Component Information:
Component Title: Serial Redirection
Component Reference Name: Terminal
Component Type: eModule
Release Date: 2013-09-06
Source Control Label: 4.6.3_Terminal_53
Source Control Location: SS: Alaska;$/Alaska/BIN/Modules/Terminal;
Dependencies
Component Dependencies
N0NE

File Dependencies
N0NE

Protocol Dependencies
N0NE
Non-Compiled BIN and LIB File(s) within this Component:

Terminal.lib
Terminalx64.lib
Component Title: Serial Redirection Sources
Component Reference Name: TerminalSrc
Component Source Control Label: 4.6.3_Terminal_53
Component Source Control Location: SS: Alaska;$/Alaska/SOURCE/Modules/Terminal;
Project Source Control Label: 4.6.3_Terminal_53
Project Source Control Location: SS: Alaska;$/Alaska/SOURCE/Modules/Terminal;
Component Description:
Terminal driver can be added to EFI BIOS to provide Serial Redirection support in Setup, Shell and various remote management consoles like Emergency Management Services. This driver supports both PCI and ISA COM ports and also MMIO type Serial devices. It can support standard ESC sequences.This driver provides the setup option to configure the Redirection port parameters. (Serial debug messages are implemented by the Status Code module and do not require this module).
Filename | Description
Main Component | Root\Core\em\Terminal
Terminal.cif | Component information file for the eModule.
Terminal.mak | Make file becomes part of the BIOS build process.
Terminal.sdl | Contains Terminal binary module BIOS build parameters.
TerminalSetupVar.h | File that contains definitions for variables which keep track of which serial ports are enabled.
TerminalSetup.c | File that contains routines used by the functions in Terminal.lib/Terminalx64.lib to get user configurable Terminal/Serial setup values.
InitTerminalStrings.c | File that contains routines that does runtime modification of Terminal related Setup strings that are defined in Terminal.uni.
Terminal.sd | File that contains the constructs for the setup page "Advanced Tab\Serial Port Console Redirection.
Terminal.uni | File that contains the definitions of the Unicode strings used in the Terminal\Serial setup page.
TerminalBoard.h | File that contains board related routines.
Terminal.lib | This is the "Serial Redirection Sources" module built in IA32 mode. If the "Serial Redirection Sources" module is included in the project, this file will not be used. Instead, the "Serial Redirection Sources" module will be compiled and linked
Terminalx64.lib | This is the "Serial Redirection Sources" module built in x64 mode. If the "Serial Redirection Sources" module is included in the project, this file will not be used. Instead, the "Serial Redirection Sources" module will be compiled and linked. The compiled version of "Serial Redirection Sources" is called "Terminal.lib." We renamed it in order to add it to this module
TerminalSrc.cif | Component information file for the eModule
TerminalSrc.mak | Make file becomes part of the BIOS build process.
TerminalSrc.sdl | Contains Terminal Source module BIOS build parameters.
SerialIo.c | File that contains Driver routines for serial ports (both super io and pci). Installs EFI_SERIAL_IO_PROTOCOL for a serial device. Adds UART_DEVICE_PATH and UART_FLOW_CONTROL_DEVICE_PATH nodes to its device path.
Terminal.c | File that contains routines to install EFI_SIMPLE_TEXT_INPUT_PROTOCOL and EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL for a serial device. Adds a vendor messaging path for the terminal type (PcAnsi, VT100, etc) to its device path.
Terminal.h | File that contains TERMINAL_TYPE and TERMINAL_DEV and related definitions.
TerminalName.c | Gets the driver name.
TerminalSimpleTextIn.c | Implements the SimpleTextIn protocol for the Terminal. Interfaces with the SerialIo protocol to get and write characters to the serial port.
TerminalSimpleTextOut.c | Implements the SimpleTextOut protocol for the Terminal.
TerminalAcpi.c | This file contains function to disable the PCI redirection at ACPI enable call.
Terminal AmiSerial
Protocol 		Root\Include\Protocol
TerminalAmiSerial.h | File that contains definitions for variables which keep track of which serial ports are enabled.
BIOS Parameters:
Parameters Name | Type | Description
Terminal_SUPPORT | Boolean | Switch to Enable/Disable Serial Redirection support in Project
SerialIo_SUPPORT | Boolean | Switch to Enable/Disable Serial Driver Support
SERIALIO_PCI_SERIAL_SUPPORT | Boolean | Switch to Enable/Disable PCI Serial Devices Support
DISABLE_TERMINAL_FOR_SCT_TEST | Integer | To disable Serial Redirection if SCT test is done
TOTAL_SIO_SERIAL_PORTS | Integer | Total number of Super IO serial ports present
TOTAL_PCI_SERIAL_PORTS | Integer | Total number of PCI serial ports present
TOTAL_SERIAL_PORTS | Integer | Total number of serial ports present (both Super IO and PCI)
MAX_SIO_SERIAL_PORTS | Integer | Maximum Number of SIO Serial Ports
MAX_PCI_SERIAL_PORTS | Integer | Maximum Number of PCI Serial Ports
PCI_SERIAL_PORT_INDEX_BASE Integer Used in Terminal.sd.
1 - EFI_SPECIFICATION_VERSION < 0x2000A
0 - EFI_SPECIFICATION_VERSION >= 0x2000A
PCI_SERIAL_PORT_0_INDEX | Integer | Used in the Terminal.sd file
PCI_SERIAL_PORT_1_INDEX | Integer | Used in Terminal.sd file. VfrCompile does not allow the use of arithmetic expressions as array indices
PCI_SERIAL_PORT_2_INDEX | Integer | Used in Terminal.sd file. VfrCompile does not allow the use of arithmetic expressions as array indices
PCI_SERIAL_PORT_3_INDEX | Integer | Used in Terminal.sd file. VfrCompile does not allow the use of arithmetic expressions as array indices
UART_DEFAULT_BAUD_RATE | Integer | UART's Default Baud Rate - 115200 bits/Sec
UART_DEFAULT_BAUD_RATE_INDEX | Integer | Index into array gAcpiSpcrTableComBaudRates
UART_DEFAULT_DATA_BITS | Integer | UART's Default number of Data bits during Transmission - 8 bits
UART_DEFAULT_PARITY | Integer | UART Default Parity - No Parity
UART_DEFAULT_STOP_BITS | Integer | UART's Default Stop bits - 1
UART_DEFAULT_FLOW_CONTROL | Integer | UART's Default Flow Control - 0
UART_DEFAULT_LOOPBACK_ENABLE | Integer | UART's Default loopback enable - 0
DEFAULT_CONSOLE_REDIRECTION_ENABLE | Boolean | Switch to Enable/Disable Console Redirection
DEFAULT_DEBUGGER_CONSOLE_REDIRECTION_ENABLE | Boolean | Rx/Redir/Debugger port found then enable/disable Console Redirection
DEFAULT_ACPI_SPCR_COM_PORT | Integer | Default ACPI SPCR com port - 0
DEFAULT_TERMINAL_TYPE | Integer | Default Terminal type - ANSI
EXTENDED_RESOLUTION_ENABLE | Boolean | Switch to Enable/Disable 100 x 31 terminal resolution
RECORDER_MODE_ENABLE | Boolean | Switch to Enable/Disable Terminal Recorder mode
DEFAULT_ACPI_SPCR_CONSOLE_REDIRECTION_ENABLE | Boolean | Switch to Enable/Disable ACPI SPCR Console Redirection
DEFAULT_ACPI_SPCR_TABLE_TERMINAL_TYPE | Integer | Default ACPI SPCR Terminal type - VT_UTF8
HARDWARE_FLOW_CONTROL_SETUP_OPTION | Integer | Hardware Flow control Setup option
MAX_FAILURES_ALLOWED | Integer | The allowed range is 1 to 0xFF. This token value controls the hardware flow control retry count. Once the counter expired Redirection will be disabled and will be enabled again when host is ready to accept the data(i.e CTS is Set).
SOFTWARE_FLOW_CONTROL_SETUP_OPTION | Integer | Software Flow control Setup option
TIMEOUT_FOR_DETERMINING_LONE_ESC_CHAR | Integer | TimeOut for Determining lone escape character - 10000000
NUMBER_OF_TIME_FOR_ESC_SEQUENCE_CHECKING | Integer | Number of times to check escape sequence - 20
SPCR_ACPI_OEM_ID | Expression | SPCR OEM Id, string value to be filled into SPCR ACPI table headers
SPCR_ACPI_OEM_TBL_ID | Expression | SPCR OEM table Id, string value to be filled into SPCR ACPI table headers
UART_FIFO_SIZE | Integer | UART fifo size. Maximum supported UART size is 16
REFRESH_SCREEN_KEY | Integer | Unicode Value of Key to Refresh the Screen.Default it set to Ctrl+r
ASCII_CONTROL_CODE_SUPPORT | Boolean | ASCII control code support 0 - Disabled 1- Enabled
spcr_interface_type | Integer | Indicate the type of the COM Port register interface
spcr_addr_spc_id | Integer | Represents UART BLK Register Id
spcr_addr_bit_width | Integer | Represents UART BLK Register Bit Width
spcr_addr_bit_offset | Integer | Represents UART BLK Register Bit Offset
spcr_access_size | Integer | UART BLK Register Bit Offset
spcr_interrupt_type | Integer | Interrupt type(s) used by the UART
spcr_global_system_int | Integer | Represents I/O APIC mode IRQ#
spcr_parity | Integer | Shows the UART parity check
spcr_stop_bits | Integer | UART stop bits
spcr_pci_device_id | Integer | Device ID,if UART is on PCI bus
spcr_pci_vendor_id | Integer | Vendor ID,if UART is on PCI bus
spcr_pci_bus_number | Integer | BUS#,if UART is on PCI bus
spcr_pci_device_number | Integer | DEVICE#,if UART is on PCI bus
spcr_pci_function_number | Integer | FUNCTION#,if UART is on PCI bus
spcr_pci_flags | Integer | PCI flags,if UART is on PCI bus
spcr_pci_segment | Integer | PCI Segment,if UART is on PCI bus
TerminalSrc_SUPPORT | Boolean | Switch to Enable/Disable Serial Redirection Source support in Project
CLEAR_TERMINAL_KB_BUFFER_AT_READYTOBOOT | Boolean | ON- Terminal KB Buffer will be cleared at ReadyToBoot.\OFF - Terminal KB Buffer will not be cleared at ReadyToBoot
PUTTY_VT100 | Integer | Putty Vt100 KeyPad Value
PUTTY_LINUX | Integer | Putty Linux KeyPad Value
PUTTY_XTERMR6 | Integer | Putty XtermR6 KeyPad Value
PUTTY_SCO | Integer | Putty SCO KeyPad Value
PUTTY_ESCN | Integer | Putty Escn KeyPad Value
PUTTY_VT400 | Integer | Putty Vt400 KeyPad Value
INSTALL_LEGACY_OS_THROUGH_REMOTE | Boolean | Install Legacy OS like Linux through redirection. To make that happen some Linux are force to install in text mode and some others are redirected in graphics mode itseld. Note: All Linux Versions cannot be installed through remote as different Linux kernel's behave differently.
OEM_ESC_SEQUENCES | Boolean | 1- Enable OEM ESC Sequence.\0 - Disable OEM ESC Sequence.
DONT_SEND_ASCII_CONTROL_PRINTABLE_CHARACTERS | Boolean | Applications like HyperTerminal supports printable characters in the ASCII control characters value's(0 - 0x1F) but Putty does not. so,to print the printable ASCII control characters we will send the equivalent ASCII printable value(whichever is applicable) if the token is enabled.
DISABLE_PCI_REDIRECTION_ON_ACPI_ENABLE_DISABLE | Boolean | When Redirection is enabled for Legacy OS, the system installation gets slow as Legacy Serial Redirection enables the PCI Serial interrupt for redirection and sometime after that OS uses its own IVT but PCI Serial interrupt is generated and not handled.So, disable redirection at OS level. we disable redirection on ACPI enable/disable call and reset the Interrupt Enable Register.
SERIAL_MOUSE_DETECTION | Boolean | Detect the Serial Mouse in the Serial Port and if the Serial Mouse is present, redirection will not be enabled.
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_40, Dated: 2012-06-21
Visual eBios: RSS.5.73.0239, Dated: 2012-06-21
Compiler Tool(s): Microsoft's Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
NONE
General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
EIP #119956 - UartFlowControl Device path Node is not available in the COM port device path
EIP #119204 - Serial redirection through PCI COM ports not working for baud rates other than 115200 in Terminal label 52.
EIP #114317 - System get hangs when the Mebx option rom launched using Remote Key
EIP #115536 - Bugs in Serial Redirection Recorder Mode depending on baudrate
EIP #131785 - Serial Redirection PCI COM port function numbers are changing randomly for every reboot
EIP #134648 - Build error occurs in Sharkbay platform if tokens "TOTAL_SIO_SERIAL_PORTS" and "TOTAL_PCI_SERIAL_PORTS" are set to 0

EIP Addressed
EIP #113629 - Terminal driver support for ctrl+key(ASCII Control Char) combinations
EIP #121329 - Serial Mouse Detection added based on the SDL token and by default kept disabled
EIP #117486 - CppCheck error in Terminal label 4.6.3_Terminal_50
EIP #121715 - Terminal does not implement reset functions
EIP #125638 - Terminal does not check ShiftKeyStatus in the TerminalCheckKeyNotify
EIP #133315 - Create 4.6.3_Terminal_53 RC label for Terminal driver
EIP #134686 - Junk value for Enter key when shell redirected through MEBX AMT configuration. It prints 'j' if Enter key pressed.
EIP #133586 - ConSplitter4.6.5.4 caused serial output overwrite previous output after reset
EIP #134039 - Press Ctrl+r key to refresh terminal screen but 'r' is printed in both Host and terminal window.
Files Changed for General Bug Fixes and EIP Addressed in this Label:

EIP Addressed
Root\Core\em\Terminal\Terminal.sdl (EIP #113629, #121329)
Root\Core\em\Terminal\Terminal.sd (EIP #134648)
Root\Core\em\Terminal\SerialIo.c (EIP #121329, #117486, #119956, #133586)
Root\Core\em\Terminal\TerminalSetup.c (EIP #113629, #121329, #117486, #131785, #134648)
Root\Core\em\Terminal\TerminalSimpleTextIn.c (EIP #113629, #121715, #125638, #114317, #134039, #134686)
Root\Core\em\Terminal\TerminalSimpleTextOut.c (EIP #117486, #115536)
Root\Core\em\Terminal\Terminal.c (EIP #117486, #125638, #119204)
Root\Core\em\Terminal\Terminal.h (EIP #121715, #125638)
Root\Core\em\Terminal\Terminal.lib (EIP #133315)
Root\Core\em\Terminal\Terminalx64.lib (EIP #133315)
Known Limitations and Erratas in this label:
EIP #133866 - When NATIVE RESOLUTION is enabled redirection is not working.
Remaining Issues:
NONE
Unit Testing:
Hardware : Use Serial Cable to connect System Under Test (SUT) and HOST system.
Software : Windows - HyperTerminal and Putty.
  1. Verify in Setup, Shell and DOS
    • Aptio Setup Utility, in Advanced Tab, there is Serial Port Console Redirection Setup Question.
    • In Setup, Shell, and DOS, need verify seeing video in HOST side.
    • Keyboard could type in on both HOST and Target sides.
    • All Setup questions combinations had been tested.

  2. Verify SPCR table creation
    • Enable Console Redirection for the setup question of Serial port for Out-Of-Band Management/Windows Emergency Management Services (EMS).
    • Run Acpidump.exe in DOS. In Acpidump.log, SPCR table will be created.
    • In Shell, dump mem with the address specified in Acpidump.log will see the SPCR table.

  3. On HOST side, press Ctrl+r, will refresh the screen.
Validation Testing:
Here is the Quality Assurance System Test Plan
Here is the Quality Assurance Test Results
Release History:

4.6.3_Terminal_53
CppCheck was performed with latest CppCheck Ver 1.60.1 for this label and no errors were found.

  • 4.6.3_Terminal_53 Changes in BIN Driver
    •

    • [TAG] EIP134648
      [Category] Bug Fix
      [Severity] Minor
      [Symptom] Build error occurs in Sharkbay platform if tokens "TOTAL_SIO_SERIAL_PORTS" and "TOTAL_PCI_SERIAL_PORTS" are set to 0
      [RootCause] TerminalSetup.c file Status Variable Initialization is missing.Terminal.sd file, Condition (TOTAL_SERIAL_PORTS > 0) need to be added to avoid build error.
      [Solution] Terminal.sd file, Condition (TOTAL_SERIAL_PORTS > 0) added to avoid build error.Status variable initialzed properly.
      [Files] Terminal.sd,TerminalSetup.c

    • [TAG] EIP133315
      [Category] Improvement
      [Description] Create 4.6.3_Terminal_53 RC label for Terminal driver
      [Files] Terminal.lib, Terminalx64.lib

    • [TAG] EIP134686
      [Category] Improvement
      [Description] Junk value for Enter key when shell redirected through MEBX AMT configuration. It prints 'j' if Enter key pressed.
      [Files] TerminalSimpleTextIn.c

    • [TAG] EIP113629
      [Category] New Feature
      [Description] Terminal driver support for ctrl+key(ASCII Control Char) combinations
      [Files] Terminal.sdl, TerminalSetup.c, TerminalSimpleTextIn.c

    • [TAG] EIP121329
      [Category] Improvement
      [Description] Serial Mouse Detection added based on the SDL token and by default kept disabled
      [Files] SerialIo.c, TerminalSetup.c , Terminal.sdl

    • [TAG] EIP117486
      [Description] CppCheck error in Terminal label 4.6.3_Terminal_50
      [Files] SerialIo.c, Terminal.c, TerminalSetup.c, TerminalSimpleTextOut.c

    • [TAG] EIP131785
      [Category] Bug Fix
      [Severity] Minor
      [Symptom] Serial Redirection PCI COM port function numbers are changing randomly for every reboot
      [RootCause] COM port number and its associated PCI Function numbers are changing due to the funtion (ValidatePciSerialNvram) in TerminalSetup.c file of the SerialRedirection module.Here, It fail to make particular PCI COM port function number to Zero. As it wrongly comparing device path for the PCI com port.
      [Solution] PCI serial COM port's Device Path comparing condition commented.
      [Files] TerminalSetup.c

  • 4.6.3_Terminal_53 Changes in Source Driver
    •

    • [TAG] EIP133586
      [Category] Improvement
      [Description] ConSplitter4.6.5.4 caused serial output overwrite previous output after reset
      [Files] Terminal.c

    • [TAG] EIP134686
      [Category] Improvement
      [Description] Junk value for Enter key when shell redirected through MEBX AMT configuration. It prints 'j' if Enter key pressed.
      [Files] TerminalSimpleTextIn.c

    • [TAG] EIP134039
      [Category] Improvement
      [Description] Press Ctrl+r key to refresh terminal screen but 'r' is printed in both Host and terminal window.
      [Files] TerminalSimpleTextIn.c

    • [TAG] EIP117486
      [Description] CppCheck error in Terminal label 4.6.3_Terminal_50
      [Files] SerialIo.c, Terminal.c, TerminalSetup.c, TerminalSimpleTextOut.c

    • [TAG] EIP119956
      [Category] Bug Fix
      [Severity] Normal
      [Symptom] UartFlowControl Device path Node is not available in the COM port device path
      [RootCause] we are reinstalling devicepath interface with updated Uart values(Baud rate,Parity,Stop bits,etc).. that time we are not adding the UARTFlowControl Node. in EfiSetAttributes function .
      [Solution] Adding the UARTFlowControl DevicePath Node.
      [Files] SerialIo.c

    • [TAG] EIP121329
      [Category] Improvement
      [Description] Serial Mouse Detection added based on the SDL token and by default kept disabled
      [Files] SerialIo.c, TerminalSetup.c , Terminal.sdl

    • [TAG] EIP121715
      [Category] Improvement
      [Description] Terminal does not implement reset functions
      [Files] Terminal.h, TerminalSimpleTextIn.c

    • [TAG] EIP125638
      [Category] Improvement
      [Description] Terminal does not check ShiftKeyStatus in the TerminalCheckKeyNotify
      [Files] Terminal.c, Terminal.h, TerminalSimpleTextin.c

    • [TAG] EIP119204
      [Category] Bug Fix
      [Severity] Normal
      [Symptom] Serial redirection through PCI COM ports not working for baud rates other than 115200 in Terminal label 52.
      [RootCause] While comparing the device path does not match with newly updated device path,whenever we changing the Baud rate other than the 115200.
      [Solution] While passing the device path to the SetSerialPortsEnabledVar_Pci function ,we have removed the UART device path Node,and the passing the device path.
      [Files] Terminal.c

    • [TAG] EIP113629
      [Category] New Feature
      [Description] Terminal driver support for ctrl+key(ASCII Control Char) combinations
      [Files] Terminal.sdl, TerminalSetup.c, TerminalSimpleTextIn.c

    • [TAG] EIP114317
      [Category] Bug Fix
      [Severity] Minor
      [Symptom] System get hangs when the Mebx option rom launched using Remote Key
      [RootCause] Callback function deletes the current node
      [Solution] If the current node is deleted , head will be moved to begining of the node.
      [Files] TerminalSimpleTextin.c

    • [TAG] EIP115536
      [Category] Bug Fix
      [Severity] Minor
      [Symptom] Bugs in Serial Redirection Recorder Mode depending on baudrate
      [RootCause] Unicode value above 0xFF has the Junk char display
      [Solution] If the unicode value above 0xFF, it has be changed to Space in the recorder mode
      [Files] TerminalSimpleTextOut.c

    Release_4.6.3_Terminal_52
    Release_4.6.3_Terminal_51
    Release_4.6.3_Terminal_50

    © American Megatrends Inc.


Release Notes - NDA Required

Component Information:
Component Title: Serial Redirection
Component Reference Name: Terminal
Component Type: eModule
Release Date: 2014-06-12
Source Control Label: 4.6.3_Terminal_54
Source Control Location: SS: Alaska;$/Alaska/BIN/Modules/Terminal;
Dependencies
Component Dependencies
N0NE

File Dependencies
N0NE

Protocol Dependencies
N0NE
Non-Compiled BIN and LIB File(s) within this Component:

Terminal.lib
Terminalx64.lib
Component Title: Serial Redirection Sources
Component Reference Name: TerminalSrc
Component Source Control Label: 4.6.3_Terminal_54
Component Source Control Location: SS: Alaska;$/Alaska/SOURCE/Modules/Terminal;
Project Source Control Label: 4.6.3_Terminal_54
Project Source Control Location: SS: Alaska;$/Alaska/SOURCE/Modules/Terminal;
Component Description:
Terminal driver can be added to EFI BIOS to provide Serial Redirection support in Setup, Shell and various remote management consoles like Emergency Management Services. This driver supports both PCI and ISA COM ports and also MMIO type Serial devices. It can support standard ESC sequences.This driver provides the setup option to configure the Redirection port parameters. (Serial debug messages are implemented by the Status Code module and do not require this module).
Filename | Description
Main Component | Root\Core\em\Terminal
Terminal.cif | Component information file for the eModule.
Terminal.mak | Make file becomes part of the BIOS build process.
Terminal.sdl | Contains Terminal binary module BIOS build parameters.
TerminalSetupVar.h | File that contains definitions for variables which keep track of which serial ports are enabled.
TerminalSetup.c | File that contains routines used by the functions in Terminal.lib/Terminalx64.lib to get user configurable Terminal/Serial setup values.
InitTerminalStrings.c | File that contains routines that does runtime modification of Terminal related Setup strings that are defined in Terminal.uni.
Terminal.sd | File that contains the constructs for the setup page "Advanced Tab\Serial Port Console Redirection.
Terminal.uni | File that contains the definitions of the Unicode strings used in the Terminal\Serial setup page.
TerminalBoard.h | File that contains board related routines.
Terminal.lib | This is the "Serial Redirection Sources" module built in IA32 mode. If the "Serial Redirection Sources" module is included in the project, this file will not be used. Instead, the "Serial Redirection Sources" module will be compiled and linked
Terminalx64.lib | This is the "Serial Redirection Sources" module built in x64 mode. If the "Serial Redirection Sources" module is included in the project, this file will not be used. Instead, the "Serial Redirection Sources" module will be compiled and linked. The compiled version of "Serial Redirection Sources" is called "Terminal.lib." We renamed it in order to add it to this module
TerminalSrc.cif | Component information file for the eModule
TerminalSrc.mak | Make file becomes part of the BIOS build process.
TerminalSrc.sdl | Contains Terminal Source module BIOS build parameters.
SerialIo.c | File that contains Driver routines for serial ports (both super io and pci). Installs EFI_SERIAL_IO_PROTOCOL for a serial device. Adds UART_DEVICE_PATH and UART_FLOW_CONTROL_DEVICE_PATH nodes to its device path.
Terminal.c | File that contains routines to install EFI_SIMPLE_TEXT_INPUT_PROTOCOL and EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL for a serial device. Adds a vendor messaging path for the terminal type (PcAnsi, VT100, etc) to its device path.
Terminal.h | File that contains TERMINAL_TYPE and TERMINAL_DEV and related definitions.
TerminalName.c | Gets the driver name.
TerminalSimpleTextIn.c | Implements the SimpleTextIn protocol for the Terminal. Interfaces with the SerialIo protocol to get and write characters to the serial port.
TerminalSimpleTextOut.c | Implements the SimpleTextOut protocol for the Terminal.
TerminalAcpi.c | This file contains function to disable the PCI redirection at ACPI enable call.
Terminal AmiSerial
Protocol 		Root\Include\Protocol
TerminalAmiSerial.h | File that contains definitions for variables which keep track of which serial ports are enabled.
BIOS Parameters:
Parameters Name | Type | Description
Terminal_SUPPORT | Boolean | Switch to Enable/Disable Serial Redirection support in Project
SerialIo_SUPPORT | Boolean | Switch to Enable/Disable Serial Driver Support
SERIALIO_PCI_SERIAL_SUPPORT | Boolean | Switch to Enable/Disable PCI Serial Devices Support
DISABLE_TERMINAL_FOR_SCT_TEST | Integer | To disable Serial Redirection if SCT test is done
TOTAL_SIO_SERIAL_PORTS | Integer | Total number of Super IO serial ports present
TOTAL_PCI_SERIAL_PORTS | Integer | Total number of PCI serial ports present
TOTAL_SERIAL_PORTS | Integer | Total number of serial ports present (both Super IO and PCI)
MAX_SIO_SERIAL_PORTS | Integer | Maximum Number of SIO Serial Ports
MAX_PCI_SERIAL_PORTS | Integer | Maximum Number of PCI Serial Ports
PCI_SERIAL_PORT_INDEX_BASE Integer Used in Terminal.sd.
1 - EFI_SPECIFICATION_VERSION < 0x2000A
0 - EFI_SPECIFICATION_VERSION >= 0x2000A
PCI_SERIAL_PORT_0_INDEX | Integer | Used in the Terminal.sd file
PCI_SERIAL_PORT_1_INDEX | Integer | Used in Terminal.sd file. VfrCompile does not allow the use of arithmetic expressions as array indices
PCI_SERIAL_PORT_2_INDEX | Integer | Used in Terminal.sd file. VfrCompile does not allow the use of arithmetic expressions as array indices
PCI_SERIAL_PORT_3_INDEX | Integer | Used in Terminal.sd file. VfrCompile does not allow the use of arithmetic expressions as array indices
UART_DEFAULT_BAUD_RATE | Integer | UART's Default Baud Rate - 115200 bits/Sec
UART_DEFAULT_BAUD_RATE_INDEX | Integer | Index into array gAcpiSpcrTableComBaudRates
UART_DEFAULT_DATA_BITS | Integer | UART's Default number of Data bits during Transmission - 8 bits
UART_DEFAULT_PARITY | Integer | UART Default Parity - No Parity
UART_DEFAULT_STOP_BITS | Integer | UART's Default Stop bits - 1
UART_DEFAULT_FLOW_CONTROL | Integer | UART's Default Flow Control - 0
UART_DEFAULT_LOOPBACK_ENABLE | Integer | UART's Default loopback enable - 0
DEFAULT_CONSOLE_REDIRECTION_ENABLE | Boolean | Switch to Enable/Disable Console Redirection
DEFAULT_DEBUGGER_CONSOLE_REDIRECTION_ENABLE | Boolean | Rx/Redir/Debugger port found then enable/disable Console Redirection
DEFAULT_ACPI_SPCR_COM_PORT | Integer | Default ACPI SPCR com port - 0
DEFAULT_TERMINAL_TYPE | Integer | Default Terminal type - ANSI
EXTENDED_RESOLUTION_ENABLE | Boolean | Switch to Enable/Disable 100 x 31 terminal resolution
RECORDER_MODE_ENABLE | Boolean | Switch to Enable/Disable Terminal Recorder mode
DEFAULT_ACPI_SPCR_CONSOLE_REDIRECTION_ENABLE | Boolean | Switch to Enable/Disable ACPI SPCR Console Redirection
DEFAULT_ACPI_SPCR_TABLE_TERMINAL_TYPE | Integer | Default ACPI SPCR Terminal type - VT_UTF8
HARDWARE_FLOW_CONTROL_SETUP_OPTION | Integer | Hardware Flow control Setup option
MAX_FAILURES_ALLOWED | Integer | The allowed range is 1 to 0xFF. This token value controls the hardware flow control retry count. Once the counter expired Redirection will be disabled and will be enabled again when host is ready to accept the data(i.e CTS is Set).
SOFTWARE_FLOW_CONTROL_SETUP_OPTION | Integer | Software Flow control Setup option
TIMEOUT_FOR_DETERMINING_LONE_ESC_CHAR | Integer | TimeOut for Determining lone escape character - 10000000
NUMBER_OF_TIME_FOR_ESC_SEQUENCE_CHECKING | Integer | Number of times to check escape sequence - 20
SPCR_ACPI_OEM_ID | Expression | SPCR OEM Id, string value to be filled into SPCR ACPI table headers
SPCR_ACPI_OEM_TBL_ID | Expression | SPCR OEM table Id, string value to be filled into SPCR ACPI table headers
UART_FIFO_SIZE | Integer | UART fifo size. Maximum supported UART size is 16
REFRESH_SCREEN_KEY | Integer | Unicode Value of Key to Refresh the Screen.Default it set to Ctrl+r
ASCII_CONTROL_CODE_SUPPORT | Boolean | ASCII control code support 0 - Disabled 1- Enabled
spcr_interface_type | Integer | Indicate the type of the COM Port register interface
spcr_addr_spc_id | Integer | Represents UART BLK Register Id
spcr_addr_bit_width | Integer | Represents UART BLK Register Bit Width
spcr_addr_bit_offset | Integer | Represents UART BLK Register Bit Offset
spcr_access_size | Integer | UART BLK Register Bit Offset
spcr_interrupt_type | Integer | Interrupt type(s) used by the UART
spcr_global_system_int | Integer | Represents I/O APIC mode IRQ#
spcr_parity | Integer | Shows the UART parity check
spcr_stop_bits | Integer | UART stop bits
spcr_pci_device_id | Integer | Device ID,if UART is on PCI bus
spcr_pci_vendor_id | Integer | Vendor ID,if UART is on PCI bus
spcr_pci_bus_number | Integer | BUS#,if UART is on PCI bus
spcr_pci_device_number | Integer | DEVICE#,if UART is on PCI bus
spcr_pci_function_number | Integer | FUNCTION#,if UART is on PCI bus
spcr_pci_flags | Integer | PCI flags,if UART is on PCI bus
spcr_pci_segment | Integer | PCI Segment,if UART is on PCI bus
TerminalSrc_SUPPORT | Boolean | Switch to Enable/Disable Serial Redirection Source support in Project
CLEAR_TERMINAL_KB_BUFFER_AT_READYTOBOOT | Boolean | ON- Terminal KB Buffer will be cleared at ReadyToBoot.\OFF - Terminal KB Buffer will not be cleared at ReadyToBoot
PUTTY_VT100 | Integer | Putty Vt100 KeyPad Value
PUTTY_LINUX | Integer | Putty Linux KeyPad Value
PUTTY_XTERMR6 | Integer | Putty XtermR6 KeyPad Value
PUTTY_SCO | Integer | Putty SCO KeyPad Value
PUTTY_ESCN | Integer | Putty Escn KeyPad Value
PUTTY_VT400 | Integer | Putty Vt400 KeyPad Value
INSTALL_LEGACY_OS_THROUGH_REMOTE | Boolean | Install Legacy OS like Linux through redirection. To make that happen some Linux are force to install in text mode and some others are redirected in graphics mode itseld. Note: All Linux Versions cannot be installed through remote as different Linux kernel's behave differently.
OEM_ESC_SEQUENCES | Boolean | 1- Enable OEM ESC Sequence.\0 - Disable OEM ESC Sequence.
DONT_SEND_ASCII_CONTROL_PRINTABLE_CHARACTERS | Boolean | Applications like HyperTerminal supports printable characters in the ASCII control characters value's(0 - 0x1F) but Putty does not. so,to print the printable ASCII control characters we will send the equivalent ASCII printable value(whichever is applicable) if the token is enabled.
DISABLE_PCI_REDIRECTION_ON_ACPI_ENABLE_DISABLE | Boolean | When Redirection is enabled for Legacy OS, the system installation gets slow as Legacy Serial Redirection enables the PCI Serial interrupt for redirection and sometime after that OS uses its own IVT but PCI Serial interrupt is generated and not handled.So, disable redirection at OS level. we disable redirection on ACPI enable/disable call and reset the Interrupt Enable Register.
SERIAL_MOUSE_DETECTION | Boolean | Detect the Serial Mouse in the Serial Port and if the Serial Mouse is present, redirection will not be enabled.
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_41, Dated: 2013-03-19
Visual eBios: RSS.5.73.0244, Dated: 2012-03-19
Compiler Tool(s): Microsoft's Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
NONE
General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
EIP #166561 - Runtime attribute set for the some of the variables used by terminal driver.

EIP Addressed
EIP #166561 - Runtime attribute set for the some of the variables used by terminal driver.
EIP #156273 - Avoid Build issue happened in Non english version of the OS with Serial Redirection label 4.6.3_Terminal_53
Files Changed for General Bug Fixes and EIP Addressed in this Label:
Root\Core\em\Terminal\Terminal.sd (EIP #156273)
Root\Core\em\Terminal\TerminalSetup.c (EIP #156273, #166561)
Known Limitations and Erratas in this label:
EIP #133866 - When NATIVE RESOLUTION is enabled redirection is not working.
Remaining Issues:
NONE
Unit Testing:
Hardware : Use Serial Cable to connect System Under Test (SUT) and HOST system.
Software : Windows - HyperTerminal and Putty.
  1. Verify in Setup, Shell and DOS
    • Aptio Setup Utility, in Advanced Tab, there is Serial Port Console Redirection Setup Question.
    • In Setup, Shell, and DOS, need verify seeing video in HOST side.
    • Keyboard could type in on both HOST and Target sides.
    • All Setup questions combinations had been tested.

  2. Verify SPCR table creation
    • Enable Console Redirection for the setup question of Serial port for Out-Of-Band Management/Windows Emergency Management Services (EMS).
    • Run Acpidump.exe in DOS. In Acpidump.log, SPCR table will be created.
    • In Shell, dump mem with the address specified in Acpidump.log will see the SPCR table.

  3. On HOST side, press Ctrl+r, will refresh the screen.
Validation Testing:
Here is the Quality Assurance System Test Plan
Here is the Quality Assurance Test Results
Release History:

4.6.3_Terminal_54

  • 4.6.3_Terminal_54 Changes in BIN Driver

    • [TAG] EIP156273
      [Category] Improvement
      [Description] Avoid Build issue happened in Non english version of the OS with Serial Redirection label 4.6.3_Terminal_53
      [Files] Terminal.sd,TerminalSetup.c

    • [TAG] EIP166561
      [Category] Bug Fix
      [Severity] Normal
      [Symptom] Runtime attribute set for the some of the variables used by terminal driver.
      [RootCause] Runtime attribute set for the some of the variables used by terminal driver.
      [Solution] Runtime attribute is removed
      [Files] TerminalSetup.c

    Release_4.6.3_Terminal_53
    Release_4.6.3_Terminal_52
    Release_4.6.3_Terminal_51
    Release_4.6.3_Terminal_50

    © American Megatrends Inc.


Terminal

AMIBIOS Document References

Previous Validation Test Reports

Validation Test Report 50.htm

Validation Test Report 51.htm

Validation Test Report 52.htm

Validation Test Report 53.htm

Validation Test Report 54.htm


Release Notes - NDA Required

Validation Test Report for Termianl Label (INT)_a_4.6.3_Terminal_50

Platform Information Form :

Board Information - HuronRiver
BIOS Information (Label, Path) - Labeled'4.6.5.1_VEB_1ABUC103';SS: SS: Alaska;$/Alaska/Projects/Intel/SandyBridge/CougarPoint_HuronRiver_1ABUC/HuronRiver.veb';
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3 BIOS Versions
1)Headless
REF-30853 Not OS Specific Out Of Band Management---- PASS
Status Update:

2)SCT
REF-28581 EFI SCT Execution---- PASS
Status Update:

3)Terminal
REF-32330 Not OS Specific Console Redirection via Serial port for Setup ---- PASS
Status Update:

REF-32331 Not OS Specific Console Redirection via Serial port for SHELL ---- PASS
Status Update:

REF-32333 Not OS Specific Console Redirection via Serial port in Putty ---- PASS
Status Update:

REF-32334 .N/A Console Redirection via Serial port in TeraTerm ---- PASS
Status Update:

REF-33696 .N/A ESC Sequence for Putty ESC[N~ keypad ---- PASS
Status Update:

REF-33694 .N/A ESC Sequence for Putty Linux keypad ---- PASS
Status Update:

REF-33693 .N/A ESC Sequence for Putty SCO keypad ---- PASS
Status Update:

REF-33691 .N/A ESC Sequence for Putty VT100 keypad ---- PASS
Status Update:

6)Terminal
REF-33692 .N/A ESC Sequence for Putty VT400 keypad ---- PASS
Status Update:

REF-33695 .N/A ESC Sequence for Putty Xterm R6 keypad ---- PASS
Status Update:

6)Terminal
REF-32332 Not OS Specific ESC Sequence in HyperTerminal ---- PASS
Status Update:

Board Information - Bromolow
BIOS Information (Label, Path) - Labeled'4.6.4.1_VEB_1AOSX015'; Path 'SS: Alaska;$/Alaska/Projects/Intel/SandyBridge/CougarPoint_Bromolow_Crb_1AOSX/Bromolow.veb';
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3 BIOS Versions
1)Headless
REF-30853 Not OS Specific Out Of Band Management---- PASS
Status Update:

2)SCT
REF-28581 EFI SCT Execution---- PASS
Status Update:

3)Terminal
REF-32330 Not OS Specific Console Redirection via Serial port for Setup ---- PASS
Status Update:

REF-32331 Not OS Specific Console Redirection via Serial port for SHELL ---- PASS
Status Update:

REF-32333 Not OS Specific Console Redirection via Serial port in Putty ---- PASS
Status Update:

REF-32334 .N/A Console Redirection via Serial port in TeraTerm ---- PASS
Status Update:

REF-33696 .N/A ESC Sequence for Putty ESC[N~ keypad ---- PASS
Status Update:

REF-33694 .N/A ESC Sequence for Putty Linux keypad ---- PASS
Status Update:

REF-33693 .N/A ESC Sequence for Putty SCO keypad ---- PASS
Status Update:

REF-33691 .N/A ESC Sequence for Putty VT100 keypad ---- PASS
Status Update:

6)Terminal
REF-33692 .N/A ESC Sequence for Putty VT400 keypad ---- PASS
Status Update:

REF-33695 .N/A ESC Sequence for Putty Xterm R6 keypad ---- PASS
Status Update:

6)Terminal
REF-32332 Not OS Specific ESC Sequence in HyperTerminal ---- PASS
Status Update:

Board Information - Maho bay
BIOS Information (Label, Path) - Labeled'4.6.5.3_VEB_1APTC019';SS: Alaska;$/Alaska/Projects/Intel/IvyBridge/PantherPoint_MahoBay_Crb_1APTC/MahoBay.veb';
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3 BIOS Versions
1)Headless
REF-30853 Not OS Specific Out Of Band Management---- U/T
Status Update:** Serial Port is not available to check SPCR table

2)SCT
REF-28581 EFI SCT Execution---- PASS
Status Update:

3)Terminal
REF-33700 .N/A Console Redirection via PCI/e Serial Card ---- PASS
Status Update: Tested via Broadcom

REF-32330 Not OS Specific Console Redirection via Serial port for Setup ---- U/T
Status Update:*** No Serial Port in this platform

REF-32331 Not OS Specific Console Redirection via Serial port for SHELL ---- U/T
Status Update:*** No Serial Port in this platform

REF-32333 Not OS Specific Console Redirection via Serial port in Putty ---- U/T
Status Update: *** No Serial Port in this platform

REF-32334 .N/A Console Redirection via Serial port in TeraTerm ---- U/T
Status Update:*** No Serial Port in this platform

REF-33696 .N/A ESC Sequence for Putty ESC[N~ keypad ---- U/T
Status Update: *** No Serial Port in this platform

REF-33694 .N/A ESC Sequence for Putty Linux keypad ---- U/T
Status Update: *** No Serial Port in this platform

REF-33693 .N/A ESC Sequence for Putty SCO keypad ---- U/T
Status Update:*** No Serial Port in this platform

REF-33691 .N/A ESC Sequence for Putty VT100 keypad ---- U/T
Status Update:*** No Serial Port in this platform

6)Terminal
REF-33692 .N/A ESC Sequence for Putty VT400 keypad ---- U/T
Status Update:*** No Serial Port in this platform

REF-33695 .N/A ESC Sequence for Putty Xterm R6 keypad ---- U/T
Status Update:*** No Serial Port in this platform

6)Terminal
REF-32332 Not OS Specific ESC Sequence in HyperTerminal ---- U/T
Status Update:*** No Serial Port in this platform


Release Notes - NDA Required

Validation Test Report for Termianl Label (INT)_a_4.6.3_Terminal_51

Platform Information Form :

Board Information - Crown Bay
BIOS Information (Label, Path) - Labeled'4.6.5.1_VEB_0ABYZ_033';
Path'SS: alaska;$/Alaska/BIN/Modules/Terminal;(INT)_a_4.6.3_Terminal_51.veb';
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3 BIOS Versions
1)Headless
REF-30853 Not OS Specific Out Of Band Management---- PASS
Status Update:

2)SCT
REF-28581 EFI SCT Execution---- PASS
Status Update:

3)Terminal
REF-32330 Not OS Specific Console Redirection via Serial port for Setup ---- Pass
Status Update:

REF-32331 Not OS Specific Console Redirection via Serial port for SHELL ---- PASS
Status Update:

REF-32333 Not OS Specific Console Redirection via Serial port in Putty ---- PASS
Status Update:

REF-32334 .N/A Console Redirection via Serial port in TeraTerm ---- PASS
Status Update:

REF-33696 .N/A ESC Sequence for Putty ESC[N~ keypad ---- U/T
Status Update:

REF-33694 .N/A ESC Sequence for Putty Linux keypad ---- U/T
Status Update:

REF-33693 .N/A ESC Sequence for Putty SCO keypad ---- U/T
Status Update:

REF-33691 .N/A ESC Sequence for Putty VT100 keypad ---- U/T
Status Update:

6)Terminal
REF-33692 .N/A ESC Sequence for Putty VT400 keypad ---- U/T
Status Update:

REF-33695 .N/A ESC Sequence for Putty Xterm R6 keypad ---- U/T
Status Update:

6)Terminal
REF-32332 Not OS Specific ESC Sequence in HyperTerminal ---- U/T
Status Update:

7)Terminal
REF-REF-33700 N/A Console Redirection via PCI/e Serial Card ---- U/T
Status Update:

Board Information - Bromolow
BIOS Information (Label, Path) - Labeled'4.6.4.1_VEB_1AOSX015';
Path'SS: Alaska;$/Alaska/Projects/Intel/SandyBridge/CougarPoint_Bromolow_Crb_1AOSX/Bromolow.veb';
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3 BIOS Versions
1)Headless
REF-30853 Not OS Specific Out Of Band Management---- PASS
Status Update:

2)SCT
REF-28581 EFI SCT Execution---- PASS
Status Update:

3)Terminal
REF-32330 Not OS Specific Console Redirection via Serial port for Setup ---- PASS
Status Update:

REF-32331 Not OS Specific Console Redirection via Serial port for SHELL ---- PASS
Status Update:

REF-32333 Not OS Specific Console Redirection via Serial port in Putty ---- PASS
Status Update:

REF-32334 .N/A Console Redirection via Serial port in TeraTerm ---- PASS
Status Update:

REF-33696 .N/A ESC Sequence for Putty ESC[N~ keypad ---- PASS
Status Update:

REF-33694 .N/A ESC Sequence for Putty Linux keypad ---- PASS
Status Update:

REF-33693 .N/A ESC Sequence for Putty SCO keypad ---- PASS
Status Update:

REF-33691 .N/A ESC Sequence for Putty VT100 keypad ---- PASS
Status Update:

6)Terminal
REF-33692 .N/A ESC Sequence for Putty VT400 keypad ---- PASS
Status Update:

REF-33695 .N/A ESC Sequence for Putty Xterm R6 keypad ---- PASS
Status Update:

6)Terminal
REF-32332 Not OS Specific ESC Sequence in HyperTerminal ---- PASS
Status Update:

7)Terminal
REF-REF-33700 N/A Console Redirection via PCI/e Serial Card ---- U/T
Status Update:

Board Information - Maho bay
BIOS Information (Label, Path) - Labeled'4.6.5.3_VEB_1APTC021';
Path'SS: Alaska;$/Alaska/Projects/Intel/IvyBridge/PantherPoint_MahoBay_Crb_1APTC/MahoBay.veb';
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3 BIOS Versions
1)Headless
REF-30853 Not OS Specific Out Of Band Management---- U/T
Status Update:** Serial Port is not available to check SPCR table

2)SCT
REF-28581 EFI SCT Execution---- PASS
Status Update:

3)Terminal
REF-33700 .N/A Console Redirection via PCI/e Serial Card ---- PASS
Status Update: Tested via Broadcom

REF-32330 Not OS Specific Console Redirection via Serial port for Setup ---- U/T
Status Update:*** No Serial Port in this platform

REF-32331 Not OS Specific Console Redirection via Serial port for SHELL ---- U/T
Status Update:*** No Serial Port in this platform

REF-32333 Not OS Specific Console Redirection via Serial port in Putty ---- U/T
Status Update: *** No Serial Port in this platform

REF-32334 .N/A Console Redirection via Serial port in TeraTerm ---- U/T
Status Update:*** No Serial Port in this platform

REF-33696 .N/A ESC Sequence for Putty ESC[N~ keypad ---- U/T
Status Update: *** No Serial Port in this platform

REF-33694 .N/A ESC Sequence for Putty Linux keypad ---- U/T
Status Update: *** No Serial Port in this platform

REF-33693 .N/A ESC Sequence for Putty SCO keypad ---- U/T
Status Update:*** No Serial Port in this platform

REF-33691 .N/A ESC Sequence for Putty VT100 keypad ---- U/T
Status Update:*** No Serial Port in this platform

6)Terminal
REF-33692 .N/A ESC Sequence for Putty VT400 keypad ---- U/T
Status Update:*** No Serial Port in this platform

REF-33695 .N/A ESC Sequence for Putty Xterm R6 keypad ---- U/T
Status Update:*** No Serial Port in this platform

6)Terminal
REF-32332 Not OS Specific ESC Sequence in HyperTerminal ---- U/T
Status Update:*** No Serial Port in this platform

7)Terminal
REF-REF-33700 N/A Console Redirection via PCI/e Serial Card ---- PASS
Status Update:


Release Notes - NDA Required

Validation Test Report for Termianl Label (INT)_a_4.6.3_Terminal_52

Board Information - Maho bay
BIOS Information (Label, Path) - Labeled'4.6.5.3_VEB_1APTC025'; Path'SS: Alaska;$/Alaska/Projects/Intel/IvyBridge/PantherPoint_MahoBay_Crb_1APTC/MahoBay.veb';
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3 BIOS Versions
1)Headless
REF-30853 Not Out Of Band Management---- U/T
Status Update:*** Serial Port is not available to check SPCR table

2)SCT
REF-28581 EFI SCT Execution---- PASS
Status Update: Simple Pointer Protocol Test will Fail in this project its excepted

3)Terminal
REF-33700 .N/A Console Redirection via PCI/e Serial Card ---- PASS
Status Update:

REF-32330 .N/A Console Redirection via Serial port for Setup ---- U/T
Status Update: No Serial port support

REF-32331 .N/A Console Redirection via Serial port for SHELL ---- PASS
Status Update: Tested via PCI/e serial card

REF-32333 Not Console Redirection via Serial port in Putty ---- U/T
Status Update: No Serial port support

REF-32334 .N/A Console Redirection via Serial port in TeraTerm ---- U/T
Status Update: No Serial port support

REF-33696 .N/A ESC Sequence for Putty ESC[N~ keypad ---- U/T
Status Update: No Serial port support

REF-33694 .N/A ESC Sequence for Putty Linux keypad ---- U/T
Status Update: No Serial port support

REF-33693 .N/A ESC Sequence for Putty SCO keypad ---- U/T
Status Update:No Serial port support

REF-33691 .N/A ESC Sequence for Putty VT100 keypad ---- U/T
Status Update:No Serial port support

REF-33692 .N/A ESC Sequence for Putty VT400 keypad ---- U/T
Status Update:No Serial port support

REF-33695 .N/A ESC Sequence for Putty Xterm R6 keypad ---- U/T
Status Update:No Serial port support

REF-32332 Not OS Specific ESC Sequence in HyperTerminal ---- U/T
Status Update:No Serial port support

Board Information - Chief River
BIOS Information (Label, Path) - Labeled'4.6.5.4_VEB_1APTJ025'; Path'SS: Alaska;$/Alaska/Projects/Intel/IvyBridge/PantherPoint_ChiefRiver_Crb_1APTJ/ChiefRiver.veb';
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3 BIOS Versions
1)Headless
REF-30853 Not Out Of Band Management---- PASS
Status Update:

2)SCT
REF-28581 EFI SCT Execution---- PASS
Status Update:

3)Terminal
REF-33700 .N/A Console Redirection via PCI/e Serial Card ---- U/T
Status Update: Test in only SUT without Serial port or otherwise Untestable

REF-32330 Not Console Redirection via Serial port for Setup ---- PASS
Status Update:

REF-32331 Not Console Redirection via Serial port for SHELL ---- PASS
Status Update:

REF-32333 Not Console Redirection via Serial port in Putty ---- PASS
Status Update: Tested with "DONT_SEND_ASCII_CONTROL_PRINTABLE_CHARACTERS" token set to 1

REF-32334 .N/A Console Redirection via Serial port in TeraTerm ---- PASS
Status Update:

REF-33696 .N/A ESC Sequence for Putty ESC[N~ keypad ---- PASS
Status Update:

REF-33694 .N/A ESC Sequence for Putty Linux keypad ---- PASS
Status Update:

REF-33693 .N/A ESC Sequence for Putty SCO keypad ---- PASS
Status Update:

REF-33691 .N/A ESC Sequence for Putty VT100 keypad ---- PASS
Status Update:

REF-33692 .N/A ESC Sequence for Putty VT400 keypad ---- PASS
Status Update:

REF-33695 .N/A ESC Sequence for Putty Xterm R6 keypad ---- PASS
Status Update:

REF-32332 Not OS Specific ESC Sequence in HyperTerminal ---- PASS
Status Update:


Release Notes - NDA Required

Validation Test Report for Termianl Label (INT)_c_4.6.3_Terminal_53

Board Information - Big Cove
BIOS Information (Label, Path) - Labeled'4.6.3.7_VEB_0ABTN_036'; Path'SS: Alaska;$/Alaska/Projects/Intel/TunnelCreek/BigCove_0ABTN/BigCove.veb;
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3 BIOS Versions
1)Headless
REF-30853 Not Out Of Band Management---- PASS
Status Update:

2)SCT
REF-28581 EFI SCT Execution---- PASS
Status Update: EFI_GRAPHICS_OUTPUT_PROTOCOL test fails in this platform.

3)Terminal
REF-33700 .N/A Console Redirection via PCI/e Serial Card ---- PASS
Status Update: Unable to use offboard PCI/e card as this platform contain 4 On board PCI com ports

REF-32330 Not OS Specific Console Redirection via Serial port for Setup ---- PASS
Status Update:

REF-32331 Not OS Specific Console Redirection via Serial port for SHELL ---- PASS
Status Update:

REF-32333 Not OS Specific Console Redirection via Serial port in Putty ---- PASS
Status Update:

REF-32334 .N/A Console Redirection via Serial port in TeraTerm ---- PASS
Status Update:

REF-33696 .N/A ESC Sequence for Putty ESC[N~ keypad ---- PASS
Status Update:

REF-33694 .N/A ESC Sequence for Putty Linux keypad ---- PASS
Status Update:

REF-33693 .N/A ESC Sequence for Putty SCO keypad ---- PASS
Status Update:

REF-33691 .N/A ESC Sequence for Putty VT100 keypad ---- PASS
Status Update:

REF-33692 .N/A ESC Sequence for Putty VT400 keypad ---- PASS
Status Update:

REF-33695 .N/A ESC Sequence for Putty Xterm R6 keypad ---- PASS
Status Update:

REF-32332 Not OS Specific ESC Sequence in HyperTerminal ---- PASS
Status Update:

Board Information - Chief River
BIOS Information (Label, Path) - Labeled'4.6.5.4_VEB_1APTJ025'; Path'SS: Alaska;$/Alaska/Projects/Intel/IvyBridge/PantherPoint_ChiefRiver_Crb_1APTJ/ChiefRiver.veb';
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3 BIOS Versions
1)Headless
REF-30853 Not Out Of Band Management---- PASS
Status Update: SPCR table created and redirection working properly.

2)SCT
REF-28581 EFI SCT Execution---- PASS
Status Update:

3)Terminal
REF-33700 .N/A Console Redirection via PCI/e Serial Card ---- PASS
Status Update:

REF-32330 Not OS Specific Console Redirection via Serial port for Setup ---- PASS
Status Update:

REF-32331 Not OS Specific Console Redirection via Serial port for SHELL ---- PASS
Status Update:

REF-32333 Not OS Specific Console Redirection via Serial port in Putty ---- PASS
Status Update:

REF-32334 .N/A Console Redirection via Serial port in TeraTerm ---- PASS
Status Update:

REF-33696 .N/A ESC Sequence for Putty ESC[N~ keypad ---- PASS
Status Update:

REF-33694 .N/A ESC Sequence for Putty Linux keypad ---- PASS
Status Update:

REF-33693 .N/A ESC Sequence for Putty SCO keypad ---- PASS
Status Update:

REF-33691 .N/A ESC Sequence for Putty VT100 keypad ---- PASS
Status Update:

REF-33692 .N/A ESC Sequence for Putty VT400 keypad ---- PASS
Status Update:

REF-33695 .N/A ESC Sequence for Putty Xterm R6 keypad ---- PASS
Status Update:

REF-32332 Not OS Specific ESC Sequence in HyperTerminal ---- PASS
Status Update:


Release Notes - NDA Required

Validation Test Report for Termianl Label (INT)_a_4.6.3_Terminal_54

Board Information - Sugarbay
BIOS Information (Label, Path) - Labeled'4.6.3._VEB_1AOQI_001'; Path'SS: Alaska;$/Alaska/Projects/Intel/IeiSugarbay/Sugarbay_1AOQI/IeiSugarbay.veb;
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3 BIOS Versions
1)Headless
REF-30853 Not Out Of Band Management---- PASS
Status Update:

2)SCT
REF-28581 EFI SCT Execution---- PASS
Status Update:

3)Terminal
REF-33700 .N/A Console Redirection via PCI/e Serial Card ---- PASS
Status Update:

REF-32330 Not OS Specific Console Redirection via Serial port for Setup ---- PASS
Status Update:

REF-32331 Not OS Specific Console Redirection via Serial port for SHELL ---- PASS
Status Update:

REF-32333 Not OS Specific Console Redirection via Serial port in Putty ---- PASS
Status Update:

REF-32334 .N/A Console Redirection via Serial port in TeraTerm ---- PASS
Status Update:

REF-33696 .N/A ESC Sequence for Putty ESC[N~ keypad ---- PASS
Status Update:

REF-33694 .N/A ESC Sequence for Putty Linux keypad ---- PASS
Status Update:

REF-33693 .N/A ESC Sequence for Putty SCO keypad ---- PASS
Status Update:

REF-33691 .N/A ESC Sequence for Putty VT100 keypad ---- PASS
Status Update:

REF-33692 .N/A ESC Sequence for Putty VT400 keypad ---- PASS
Status Update:

REF-33695 .N/A ESC Sequence for Putty Xterm R6 keypad ---- PASS
Status Update:

REF-32332 Not OS Specific ESC Sequence in HyperTerminal ---- PASS
Status Update:

Board Information - Sharkbay
BIOS Information (Label, Path) - Labeled'4.6.5.4_VEB_1APQM035'; Path'SS: Alaska;$/Alaska/Projects/Intel/Haswell/Sharkbay_Crb_1APQM/Sharkbay.veb';
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3 BIOS Versions
1)Headless
REF-30853 Not Out Of Band Management---- PASS
Status Update: SPCR table created and redirection working properly.

2)SCT
REF-28581 EFI SCT Execution---- PASS
Status Update:

3)Terminal
REF-33700 .N/A Console Redirection via PCI/e Serial Card ---- PASS
Status Update:

REF-32330 Not OS Specific Console Redirection via Serial port for Setup ---- PASS
Status Update:

REF-32331 Not OS Specific Console Redirection via Serial port for SHELL ---- PASS
Status Update:

REF-32333 Not OS Specific Console Redirection via Serial port in Putty ---- PASS
Status Update:

REF-32334 .N/A Console Redirection via Serial port in TeraTerm ---- PASS
Status Update:

REF-33696 .N/A ESC Sequence for Putty ESC[N~ keypad ---- PASS
Status Update:

REF-33694 .N/A ESC Sequence for Putty Linux keypad ---- PASS
Status Update:

REF-33693 .N/A ESC Sequence for Putty SCO keypad ---- PASS
Status Update:

REF-33691 .N/A ESC Sequence for Putty VT100 keypad ---- PASS
Status Update:

REF-33692 .N/A ESC Sequence for Putty VT400 keypad ---- PASS
Status Update:

REF-33695 .N/A ESC Sequence for Putty Xterm R6 keypad ---- PASS
Status Update:

REF-32332 Not OS Specific ESC Sequence in HyperTerminal ---- PASS
Status Update:


Copyright

American Megatrends, Inc.
5555 Oakbrook Parkway
Suite 200
Norcross, GA 30093 (USA)

Copyright (c) 1999-2014 American Megatrends, Inc. All Rights Reserved.

This publication contains proprietary information, which is protected by copyright. No part of this publication may be reproduced, transcribed, stored in a retrieval system, translated into any language or computer language, or transmitted in any form whatsoever without the prior written consent of the publisher, American Megatrends, Inc.

American Megatrends, Inc. retains the right to update, change, modify this publication at any time, without notice.

For Additional Information

Call American Megatrends BIOS Sales Department at 1-800-828-9264 for additional information.

Limitations of Liability

In no event shall American Megatrends be held liable for any loss, expenses, or damages of any kind whatsoever, whether direct, indirect, incidental, or consequential, arising from the design or use of this product or the support materials provided with the product.

Limited Warranty

No warranties are made, either expressed or implied, with regard to the contents of this work, its merchantability, or fitness for a particular use. American Megatrends assumes no responsibility for errors and omissions or for the uses made of the material contained herein or reader decisions based on such use.

Trademark and Copyright Acknowledgments

All product names used in this publication are for identification purposes only and are trademarks of their respective Companies.


ESC Sequence

ESC Sequence Supported by Legacy Console Redirection and Terminal

Standard ANSII sequences

Key or Function | Sequence
Right | <ESC> [ , C
Left | <ESC> [ , D
Up | <ESC> [ , A
Down | <ESC> [ , B
Home | <ESC> [ , H
End | <ESC> [ , K
F1 | <ESC> O , P
F2 | <ESC> O , Q
F3 | <ESC> O , R
F4 | <ESC> O , S
Sytem Reset | <ESC>R<ESC>r<ESC>R

Other Sequences
Key or Function | Sequence
Home | <ESC> h
End | <ESC> k
Insert | <ESC> +
Delete | <ESC> -
Page Up | <ESC> ?
Page Down | <ESC> /
F1 | <ESC> 1
F2 | <ESC> 2
F3 | <ESC> 3
F4 | <ESC> 4
F5 | <ESC> 5
F6 | <ESC> 6
F7 | <ESC> 7
F8 | <ESC> 8
F9 | <ESC> 9
F10 | <ESC> 0
F11 | <ESC> !
F12 | <ESC> @

Output Sequences
(These sequences are output by the terminal driver)

Function | Sequence
Clear Screen | <ESC> [ , 2 , J
Set Mode | <ESC> [ , = , 3 , h

ESC Sequence Supported by Legacy Console Redirection and Terminal
For Putty VT100 KeyPad

Key or Function | Sequence
F1 | <ESC> O , P
F2 | <ESC> O , Q
F3 | <ESC> O , R
F4 | <ESC> O , S
F5 | <ESC> O , T
F6 | <ESC> O , U
F7 | <ESC> O , V
F8 | <ESC> O , W
F9 | <ESC> O , X
F10 | <ESC> O , Y
F11 | <ESC> O , Z
F12 | <ESC> O , [
Home | <ESC> [ , 1, ~
Ins | <ESC> [ , 2, ~
Del | <ESC> [ , 3, ~
End | <ESC> [ , 4, ~
Pg Up | <ESC> [ , 5, ~
Pg Dn | <ESC> [ , 6, ~

ESC Sequence Supported by Legacy Console Redirection and Terminal
For Putty VT400 KeyPad

Key or Function | Sequence
F1 | <ESC> [ , 1, 1, ~
F2 | <ESC> [ , 1, 2, ~
F3 | <ESC> [ , 1, 3,~
F4 | <ESC> [ , 1, 4, ~
F5 | <ESC> [ , 1, 5, ~
F6 | <ESC> [ , 1, 7, ~
F7 | <ESC> [ , 1, 8, ~
F8 | <ESC> [ , 1, 9,~
F9 | <ESC> [ , 2, 0, ~
F10 | <ESC> [ , 2, 1, ~
F11 | <ESC> [ , 2, 3, ~
F12 | <ESC> [ , 2, 4, ~
Pg Up | <ESC> [ , 3, ~
Pg Dn | <ESC> [ , 6, ~
Del | <ESC> [ , 4, ~
Home | <ESC> [ , 2, ~
End | <ESC> [ , 5, ~
Insert | <ESC> [ , 1, ~

ESC Sequence Supported by Legacy Console Redirection and Terminal
For Putty SCO KeyPad

Key or Function | Sequence
F1 | <ESC> [ , M
F2 | <ESC> [ , N
F3 | <ESC> [ , O
F4 | <ESC> [ , P
F5 | <ESC> [ , Q
F6 | <ESC> [ , R
F7 | <ESC> [ , S
F8 | <ESC> [ , T
F9 | <ESC> [ , U
F10 | <ESC> [ , V
F11 | <ESC> [ , W
F12 | <ESC> [ , X
Pg Up | <ESC> [ , I
Pg Dn | <ESC> [ , G
Del | <ESC> [ , 7 F
Ins | <ESC> [ , L
Home | <ESC> [ , H
End | <ESC> [ , F

ESC Sequence Supported by Legacy Console Redirection and Terminal
For Putty Linux KeyPad

Key or Function | Sequence
F1 | <ESC> [ , [, A
F2 | <ESC> [ , [, B
F3 | <ESC> [ , [, C
F4 | <ESC> [ , [, D
F5 | <ESC> [ , [, E
F6 | <ESC> [ , 1, 7
F7 | <ESC> [ , 1, 8
F8 | <ESC> [ , 1, 9
F9 | <ESC> [ , 2, 0
F10 | <ESC> [ , 2, 1
F11 | <ESC> [ , 2, 3
F12 | <ESC> [ , 2, 4
Del | <ESC> [ , 3, ~
End | <ESC> [ , 4, ~
Pg Up | <ESC> [ , 5, ~
Pg Dn | <ESC> [ , 6, ~
Home | <ESC> [ , 1, ~
Insert | <ESC> [ , 2, ~

ESC Sequence Supported by Legacy Console Redirection and Terminal
For Putty Xterm R6 KeyPad

Key or Function | Sequence
F1 | <ESC> O , P
F2 | <ESC> O , Q
F3 | <ESC> O , R
F4 | <ESC> O , S
F5 | <ESC> 1, 5, ~
F6 | <ESC> 1, 7, ~
F7 | <ESC> [ , 1, 8, ~
F9 | <ESC> [ , 2, 0, ~
F10 | <ESC> [ , 2, 1, ~
F11 | <ESC> [ , 2, 3, ~
F12 | <ESC> [ , 2, 4, ~
Home | <ESC> [ , 1, ~
Del | <ESC> [ , 3, ~
End | <ESC> [ , 4, ~
Pg Up | <ESC> [ , 5, ~
Pg Down | <ESC> [ , 6, ~
Insert | <ESC> [ , 2, ~

ESC Sequence Supported by Legacy Console Redirection and Terminal
For Putty ESC[N~ KeyPad

F1 | <ESC> [ , 1, 1, ~
F2 | <ESC> [ , 1, 2, ~
F3 | <ESC> [ , 1, 3,~
F4 | <ESC> [ , 1, 4, ~
F5 | <ESC> [ , 1, 5, ~
F6 | <ESC> [ , 1, 7, ~
F7 | <ESC> [ , 1, 8, ~
F8 | <ESC> [ , 1, 9,~
F9 | <ESC> [ , 2, 0, ~
F10 | <ESC> [ , 2, 1, ~
F11 | <ESC> [ , 2, 3, ~
F12 | <ESC> [ , 2, 4, ~
Pg Up | <ESC> [ , 5, ~
Pg Dn | <ESC> [ , 6, ~
End | <ESC> [ , 4, ~
Home | <ESC> [ , 1, ~
Insert | <ESC> [ , 2, ~
Del | <ESC> [ , 3, ~


1) Supports Below Baud Rate

Legacy Console Redirection

  1. Supports Below Baud Rate

    2. 9600, 19200, 38400, 57600 and 115200

  2. Supports Below Terminal Type

    3. VT100, VT100+, VT-UTF8 and ANSI

  3. Supports Below Data bits

    4. 7 and 8

  4. Supports Below Parity

    5. None, Even, ODD, Mark and Space

  5. Supports Below Stop bits

    6. 1 and 2

  6. Supports Below Flow control

    7. None and Hardware RTS/CTS

  7. VT-UTF8 Combo Key Support

    8. Enabled/Disabled for VT-UTF8 Combo Key Support for ANSI/VT100 terminals

  8. Recorder Mode

    9. On this mode enabled only test will be send. This is to capture Terminal data

  9. Resolution 100x31

    10. Enabled or Disabled extended terminal resolution

  10. Supports 80*24 and 80*25 mode

    11. HyperTerminal supports only 80*24 lines. But other application like Putty supports 80*25. So to support utility like Putty Legacy console redirection also supports both the modes.

  11. Putty KeyPad

    12. VT100, LINUX, XTERMR6, SCO, ESCN and VT400. Selecting Function Key and KeyPad in Putty

  12. Redirection After BIOS POST

    13. Always Enable and BootLoader. Default value is Always Enable which means Legacy Console Redirection is enabled for Legacy OS

  13. Supports Headless (No VGA) Systems.

    14. Legacy console redirection has own Int10 functions and traps the Int10 calls to support Headless system.

  14. Supports Legacy Free Systems ( No Ps2 controller)

    15. Instead of pushing the keyboard data to port60/64 , to support Legacy free system it calls the Int9 with value

  15. Supports Redirection through PCI serial devices.

    16. Legacy console redirection gets the Base address and IRQ from PCI serial Device and uses for the Redirection.

  16. Supports different Video Segment.

    17. Some Option rom uses the different Video segment to display the text mode. Legacy console redirection checks, if the Active Video segment is different it uses the data from active display segment.

  17. Supports Ctrl+r to redraw the whole screen.

    18. Some Intel SOL utility sends CTRL+R to refresh the screen. Once Redirection modules sees there is Ctrl+R , it will send the whole screen

  18. If the hardware flowcontrol failed, switch back to no hardware flow control to avoid the system hanging.

    19. When the hardware flow control is enabled, before we send the data to serial device it checks for RTS and CTS, if it’s not ready for particular period of time and it times out and comes out without sending data. But if the hardware really disconnected RTS and CTS will be never set and for each char there will be timeout. It makes system to slow. To avoid that if the failure reaches particular count , redirection disabled the hardware flow control checking.

  19. Redirection sends only changed lines to make Redirection faster.

    20. Redirection maintain the checksum for each line only if the checksum is mismatch between last data in the line and current data in the line it sends the data. Otherwise it won’t. This makes redirection faster.

  20. Supports the Esc Sequence.

  21. LINUX Redirection of certain Kernel's is supported.


Release Notes - NDA Required

Component Information:
Component Title: Serial Redirection
Component Reference Name: Terminal
Component Type: eModule
Release Date: 2014-07-10
Source Control Label: 4.6.3_Terminal_55
Source Control Location: SS: Alaska;$/Alaska/BIN/Modules/Terminal;
Dependencies
Component Dependencies
N0NE

File Dependencies
N0NE

Protocol Dependencies
N0NE
Non-Compiled BIN and LIB File(s) within this Component:

Terminal.lib
Terminalx64.lib
Component Title: Serial Redirection Sources
Component Reference Name: TerminalSrc
Component Source Control Label: 4.6.3_Terminal_55
Component Source Control Location: SS: Alaska;$/Alaska/SOURCE/Modules/Terminal;
Project Source Control Label: 4.6.3_Terminal_55
Project Source Control Location: SS: Alaska;$/Alaska/SOURCE/Modules/Terminal;
Component Description:
Terminal driver can be added to EFI BIOS to provide Serial Redirection support in Setup, Shell and various remote management consoles like Emergency Management Services. This driver supports both PCI and ISA COM ports and also MMIO type Serial devices. It can support standard ESC sequences.This driver provides the setup option to configure the Redirection port parameters. (Serial debug messages are implemented by the Status Code module and do not require this module).
Filename | Description
Main Component | Root\Core\em\Terminal
Terminal.cif | Component information file for the eModule.
Terminal.mak | Make file becomes part of the BIOS build process.
Terminal.sdl | Contains Terminal binary module BIOS build parameters.
TerminalSetupVar.h | File that contains definitions for variables which keep track of which serial ports are enabled.
TerminalSetup.c | File that contains routines used by the functions in Terminal.lib/Terminalx64.lib to get user configurable Terminal/Serial setup values.
InitTerminalStrings.c | File that contains routines that does runtime modification of Terminal related Setup strings that are defined in Terminal.uni.
Terminal.sd | File that contains the constructs for the setup page "Advanced Tab\Serial Port Console Redirection.
Terminal.uni | File that contains the definitions of the Unicode strings used in the Terminal\Serial setup page.
TerminalBoard.h | File that contains board related routines.
Terminal.lib | This is the "Serial Redirection Sources" module built in IA32 mode. If the "Serial Redirection Sources" module is included in the project, this file will not be used. Instead, the "Serial Redirection Sources" module will be compiled and linked
Terminalx64.lib | This is the "Serial Redirection Sources" module built in x64 mode. If the "Serial Redirection Sources" module is included in the project, this file will not be used. Instead, the "Serial Redirection Sources" module will be compiled and linked. The compiled version of "Serial Redirection Sources" is called "Terminal.lib." We renamed it in order to add it to this module
TerminalSrc.cif | Component information file for the eModule
TerminalSrc.mak | Make file becomes part of the BIOS build process.
TerminalSrc.sdl | Contains Terminal Source module BIOS build parameters.
SerialIo.c | File that contains Driver routines for serial ports (both super io and pci). Installs EFI_SERIAL_IO_PROTOCOL for a serial device. Adds UART_DEVICE_PATH and UART_FLOW_CONTROL_DEVICE_PATH nodes to its device path.
Terminal.c | File that contains routines to install EFI_SIMPLE_TEXT_INPUT_PROTOCOL and EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL for a serial device. Adds a vendor messaging path for the terminal type (PcAnsi, VT100, etc) to its device path.
Terminal.h | File that contains TERMINAL_TYPE and TERMINAL_DEV and related definitions.
TerminalName.c | Gets the driver name.
TerminalSimpleTextIn.c | Implements the SimpleTextIn protocol for the Terminal. Interfaces with the SerialIo protocol to get and write characters to the serial port.
TerminalSimpleTextOut.c | Implements the SimpleTextOut protocol for the Terminal.
TerminalAcpi.c | This file contains function to disable the PCI redirection at ACPI enable call.
Terminal AmiSerial
Protocol 		Root\Include\Protocol
TerminalAmiSerial.h | File that contains definitions for variables which keep track of which serial ports are enabled.
BIOS Parameters:
Parameters Name | Type | Description
Terminal_SUPPORT | Boolean | Switch to Enable/Disable Serial Redirection support in Project
SerialIo_SUPPORT | Boolean | Switch to Enable/Disable Serial Driver Support
SERIALIO_PCI_SERIAL_SUPPORT | Boolean | Switch to Enable/Disable PCI Serial Devices Support
DISABLE_TERMINAL_FOR_SCT_TEST | Integer | To disable Serial Redirection if SCT test is done
TOTAL_SIO_SERIAL_PORTS | Integer | Total number of Super IO serial ports present
TOTAL_PCI_SERIAL_PORTS | Integer | Total number of PCI serial ports present
TOTAL_SERIAL_PORTS | Integer | Total number of serial ports present (both Super IO and PCI)
MAX_SIO_SERIAL_PORTS | Integer | Maximum Number of SIO Serial Ports
MAX_PCI_SERIAL_PORTS | Integer | Maximum Number of PCI Serial Ports
PCI_SERIAL_PORT_INDEX_BASE Integer Used in Terminal.sd.
1 - EFI_SPECIFICATION_VERSION < 0x2000A
0 - EFI_SPECIFICATION_VERSION >= 0x2000A
PCI_SERIAL_PORT_0_INDEX | Integer | Used in the Terminal.sd file
PCI_SERIAL_PORT_1_INDEX | Integer | Used in Terminal.sd file. VfrCompile does not allow the use of arithmetic expressions as array indices
PCI_SERIAL_PORT_2_INDEX | Integer | Used in Terminal.sd file. VfrCompile does not allow the use of arithmetic expressions as array indices
PCI_SERIAL_PORT_3_INDEX | Integer | Used in Terminal.sd file. VfrCompile does not allow the use of arithmetic expressions as array indices
UART_DEFAULT_BAUD_RATE | Integer | UART's Default Baud Rate - 115200 bits/Sec
UART_DEFAULT_BAUD_RATE_INDEX | Integer | Index into array gAcpiSpcrTableComBaudRates
UART_DEFAULT_DATA_BITS | Integer | UART's Default number of Data bits during Transmission - 8 bits
UART_DEFAULT_PARITY | Integer | UART Default Parity - No Parity
UART_DEFAULT_STOP_BITS | Integer | UART's Default Stop bits - 1
UART_DEFAULT_FLOW_CONTROL | Integer | UART's Default Flow Control - 0
UART_DEFAULT_LOOPBACK_ENABLE | Integer | UART's Default loopback enable - 0
DEFAULT_CONSOLE_REDIRECTION_ENABLE | Boolean | Switch to Enable/Disable Console Redirection
DEFAULT_DEBUGGER_CONSOLE_REDIRECTION_ENABLE | Boolean | Rx/Redir/Debugger port found then enable/disable Console Redirection
DEFAULT_ACPI_SPCR_COM_PORT | Integer | Default ACPI SPCR com port - 0
DEFAULT_TERMINAL_TYPE | Integer | Default Terminal type - ANSI
EXTENDED_RESOLUTION_ENABLE | Boolean | Switch to Enable/Disable 100 x 31 terminal resolution
RECORDER_MODE_ENABLE | Boolean | Switch to Enable/Disable Terminal Recorder mode
DEFAULT_ACPI_SPCR_CONSOLE_REDIRECTION_ENABLE | Boolean | Switch to Enable/Disable ACPI SPCR Console Redirection
DEFAULT_ACPI_SPCR_TABLE_TERMINAL_TYPE | Integer | Default ACPI SPCR Terminal type - VT_UTF8
HARDWARE_FLOW_CONTROL_SETUP_OPTION | Integer | Hardware Flow control Setup option
MAX_FAILURES_ALLOWED | Integer | The allowed range is 1 to 0xFF. This token value controls the hardware flow control retry count. Once the counter expired Redirection will be disabled and will be enabled again when host is ready to accept the data(i.e CTS is Set).
SOFTWARE_FLOW_CONTROL_SETUP_OPTION | Integer | Software Flow control Setup option
TIMEOUT_FOR_DETERMINING_LONE_ESC_CHAR | Integer | TimeOut for Determining lone escape character - 10000000
NUMBER_OF_TIME_FOR_ESC_SEQUENCE_CHECKING | Integer | Number of times to check escape sequence - 20
SPCR_ACPI_OEM_ID | Expression | SPCR OEM Id, string value to be filled into SPCR ACPI table headers
SPCR_ACPI_OEM_TBL_ID | Expression | SPCR OEM table Id, string value to be filled into SPCR ACPI table headers
UART_FIFO_SIZE | Integer | UART fifo size. Maximum supported UART size is 16
REFRESH_SCREEN_KEY | Integer | Unicode Value of Key to Refresh the Screen.Default it set to Ctrl+r
ASCII_CONTROL_CODE_SUPPORT | Boolean | ASCII control code support 0 - Disabled 1- Enabled
spcr_interface_type | Integer | Indicate the type of the COM Port register interface
spcr_addr_spc_id | Integer | Represents UART BLK Register Id
spcr_addr_bit_width | Integer | Represents UART BLK Register Bit Width
spcr_addr_bit_offset | Integer | Represents UART BLK Register Bit Offset
spcr_access_size | Integer | UART BLK Register Bit Offset
spcr_interrupt_type | Integer | Interrupt type(s) used by the UART
spcr_global_system_int | Integer | Represents I/O APIC mode IRQ#
spcr_parity | Integer | Shows the UART parity check
spcr_stop_bits | Integer | UART stop bits
spcr_pci_device_id | Integer | Device ID,if UART is on PCI bus
spcr_pci_vendor_id | Integer | Vendor ID,if UART is on PCI bus
spcr_pci_bus_number | Integer | BUS#,if UART is on PCI bus
spcr_pci_device_number | Integer | DEVICE#,if UART is on PCI bus
spcr_pci_function_number | Integer | FUNCTION#,if UART is on PCI bus
spcr_pci_flags | Integer | PCI flags,if UART is on PCI bus
spcr_pci_segment | Integer | PCI Segment,if UART is on PCI bus
TerminalSrc_SUPPORT | Boolean | Switch to Enable/Disable Serial Redirection Source support in Project
CLEAR_TERMINAL_KB_BUFFER_AT_READYTOBOOT | Boolean | ON- Terminal KB Buffer will be cleared at ReadyToBoot.\OFF - Terminal KB Buffer will not be cleared at ReadyToBoot
PUTTY_VT100 | Integer | Putty Vt100 KeyPad Value
PUTTY_LINUX | Integer | Putty Linux KeyPad Value
PUTTY_XTERMR6 | Integer | Putty XtermR6 KeyPad Value
PUTTY_SCO | Integer | Putty SCO KeyPad Value
PUTTY_ESCN | Integer | Putty Escn KeyPad Value
PUTTY_VT400 | Integer | Putty Vt400 KeyPad Value
INSTALL_LEGACY_OS_THROUGH_REMOTE | Boolean | Install Legacy OS like Linux through redirection. To make that happen some Linux are force to install in text mode and some others are redirected in graphics mode itseld. Note: All Linux Versions cannot be installed through remote as different Linux kernel's behave differently.
OEM_ESC_SEQUENCES | Boolean | 1- Enable OEM ESC Sequence.\0 - Disable OEM ESC Sequence.
DONT_SEND_ASCII_CONTROL_PRINTABLE_CHARACTERS | Boolean | Applications like HyperTerminal supports printable characters in the ASCII control characters value's(0 - 0x1F) but Putty does not. so,to print the printable ASCII control characters we will send the equivalent ASCII printable value(whichever is applicable) if the token is enabled.
DISABLE_PCI_REDIRECTION_ON_ACPI_ENABLE_DISABLE | Boolean | When Redirection is enabled for Legacy OS, the system installation gets slow as Legacy Serial Redirection enables the PCI Serial interrupt for redirection and sometime after that OS uses its own IVT but PCI Serial interrupt is generated and not handled.So, disable redirection at OS level. we disable redirection on ACPI enable/disable call and reset the Interrupt Enable Register.
SERIAL_MOUSE_DETECTION | Boolean | Detect the Serial Mouse in the Serial Port and if the Serial Mouse is present, redirection will not be enabled.
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_41, Dated: 2013-03-19
Visual eBios: RSS.5.73.0244, Dated: 2012-03-19
Compiler Tool(s): Microsoft's Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
NONE
General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
NONE

EIP Addressed
EIP #172073 - Setup option for Legacy Serial Redirection.
Files Changed for General Bug Fixes and EIP Addressed in this Label:
Root\Core\em\Terminal\Terminal.sd (EIP #172073)
Root\Core\em\Terminal\Terminal.uni (EIP #172073)
Known Limitations and Erratas in this label:
EIP #133866 - When NATIVE RESOLUTION is enabled redirection is not working.
Remaining Issues:
NONE
Unit Testing:
Hardware : Use Serial Cable to connect System Under Test (SUT) and HOST system.
Software : Windows - HyperTerminal and Putty.
  1. Verify in Setup, Shell and DOS
    • Aptio Setup Utility, in Advanced Tab, there is Serial Port Console Redirection Setup Question.
    • In Setup, Shell, and DOS, need verify seeing video in HOST side.
    • Keyboard could type in on both HOST and Target sides.
    • All Setup questions combinations had been tested.

  2. Verify SPCR table creation
    • Enable Console Redirection for the setup question of Serial port for Out-Of-Band Management/Windows Emergency Management Services (EMS).
    • Run Acpidump.exe in DOS. In Acpidump.log, SPCR table will be created.
    • In Shell, dump mem with the address specified in Acpidump.log will see the SPCR table.

  3. On HOST side, press Ctrl+r, will refresh the screen.
Validation Testing:
Here is the Quality Assurance System Test Plan
Here is the Quality Assurance Test Results
Release History:

4.6.3_Terminal_55

  • 4.6.3_Terminal_55 Changes in BIN Driver

    • [TAG] EIP172073
      [Category] Improvement
      [Description] Setup option for Legacy Serial Redirection.
      [Files] Terminal.sd, Terminal.uni, LegacySredir_Setup.c

    Release_4.6.3_Terminal_54
    Release_4.6.3_Terminal_53
    Release_4.6.3_Terminal_52
    Release_4.6.3_Terminal_51
    Release_4.6.3_Terminal_50

    © American Megatrends Inc.


Terminal Driver Setup options

S.No. Setup Option Title Setup Options
1 Console Redirection
1.Enable - Enable the console redirection
2.Disable - Disable the console redirection
2 Console Redirection Settings
The settings specify how the host computer and the remote computer (which the user is using) will exchange data. Both computers should have the same or compatible settings.
1.Terminal Type : (Type of Emulation)
1.a.ANSI : Extended ASCII char set.
1.b.VT100 : ASCII char set.
1.c.VT100+ : Extends VT100 to support color, Function keys, etc.
1.d.VT-UTF8 : Uses UTF8 encoding to map Unicode chars onto 1 or more bytes.
2. Bits Per Second :
Selects serial port transmission speed. The speed must be matched on the other side. Long or noisy lines may require lower speeds.
Transmission Speed Options:
9600,19200,57600,38400,115200 bps
3.Data Bits :
No. of message bits.
Data bits Options:
7 and 8
4.Parity :
A parity bit can be sent with the data bits to detect some transmission errors.
Parity Options :
Even: parity bit is 0 if the num of 1's in the data bits is even.
Odd: parity bit is 0 if num of 1's in the data bits is odd.
Mark: parity bit is always 1.
Space: Parity bit is always 0.
Mark and Space Parity do not allow for error detection. They can be used as an additional data bit.
5. Stop Bits :
Stop bits indicate the end of a serial data packet. The standard setting is 1 stop bit. Communication with slow devices may require more than 1 stop bit.
Stop bits Options:
1 and 2
6.Flow Control :
Flow control can prevent data loss from buffer overflow. When sending data, if the receiving buffers are full, a 'stop' signal can be sent to stop the data flow. Once the buffers are empty, a 'start' signal can be sent to re-start the flow. Software flow control uses start/stop ASCII chars, which slows down the data flow and can be problematic if binary data is being sent.
Flow Control Options:
None
Hardware CTS/RTS :Hardware flow control uses two wires to send start/stop signals.
7.Recorder mode :
In this mode only text is sent to Capture the terminal data.The use of recorder mode is we including customers,can capture the post message data and can be used for analysing.It is very helpful in getting information,like recording post message information in many reboots.
Recorder mode Options:
1.Enable - Enables Recorder mode
2.Disable - Disbles Recorder mode
8.Resolution 100×31 :
Applications like Putty can support any resolution other than normal 80×24 resolution,supported by hyperterminal.Since we support 100×31 other than 80×24 resolution,this option is included to use in such application.
Resolution 100×31 Options:
1.Enable - Enables extended resolution
2.Disable - Disbles extended resolution
9.Legacy OS Redirection :
HyperTerminal supports only 80*24 lines.The problem with 80*24 mode is the first line is not displayed on hyperterminal.But applications like putty can support 80*25 mode where all lines can be redirected.So we support both the modes
Legacy OS Redirection Options:
80×24 - Enables 80×24 resolution
80×25 - Enables 80×25 resolution
10. Redirection After BIOS :
The Settings specify if BootLoader is selected than Legacy console redirection is disabled before booting to Legacy OS. Default value is Always Enable which means Legaacy console Redirection is enabled for Legacy OS.
Redirection After BIOS Options:
1. Always Enable - Enables leacy OS also will be redirected
2. BootLoader - Disbles legacy console redirection before booting to legacy OS
3 Serial Port for Out-of-Band Management/Windows Emergency Management Services (EMS)
Microsoft Windows Emergency Management Serivces (EMS) allows for remote management of a Windows Server OS through a serial port.When the network is unavailable, you can use Emergency Management Services to access and manage the server
Windows Emergency Management Services (EMS) Options:
1. Console Redirection
2. Console Redirection Settings
Out-of-Band Mgmt Port : User must choose the port available that should be used for EMS
Terminal Type
Bits Per Second : Supports Only 9600,19200,57600,115200 bps
Flow Control
Data Bits : Its fixed - 8
Parity bits : Its fixed - None
Stop bits : Its fixed - 1
4 Redirection Via AMI Debugger
Console Redirection through AMI Debugger
Redirection Via AMI Debugger Options :
Terminal Type :
Supports the above mentioned Terminal Types.


Release Notes - NDA Required

Validation Test Report for Termianl Label (INT)_a_4.6.3_Terminal_55

Board Information - ChiefRiver
BIOS Information (Label, Path) - Labeled'4.6.3._VEB_1APTJ_030'; Path'SS: Alaska;$/Alaska/Projects/Intel/IvyBridge/PantherPoint_ChiefRiver_Crb_1APTJ/;
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3 BIOS Versions
1)Headless
REF-30853 Not Out Of Band Management---- PASS
Status Update:

2)SCT
REF-28581 EFI SCT Execution---- PASS
Status Update:

3)Terminal
REF-33700 .N/A Console Redirection via PCI/e Serial Card ---- PASS
Status Update:

REF-32330 Not OS Specific Console Redirection via Serial port for Setup ---- PASS
Status Update:

REF-32331 Not OS Specific Console Redirection via Serial port for SHELL ---- PASS
Status Update:

REF-32333 Not OS Specific Console Redirection via Serial port in Putty ---- PASS
Status Update:

REF-32334 .N/A Console Redirection via Serial port in TeraTerm ---- PASS
Status Update:

REF-33696 .N/A ESC Sequence for Putty ESC[N~ keypad ---- PASS
Status Update:

REF-33694 .N/A ESC Sequence for Putty Linux keypad ---- PASS
Status Update:

REF-33693 .N/A ESC Sequence for Putty SCO keypad ---- PASS
Status Update:

REF-33691 .N/A ESC Sequence for Putty VT100 keypad ---- PASS
Status Update:

REF-33692 .N/A ESC Sequence for Putty VT400 keypad ---- PASS
Status Update:

REF-33695 .N/A ESC Sequence for Putty Xterm R6 keypad ---- PASS
Status Update:

REF-32332 Not OS Specific ESC Sequence in HyperTerminal ---- PASS
Status Update:

Board Information - Sharkbay
BIOS Information (Label, Path) - Labeled'4.6.5.4_VEB_1APQM035'; Path'SS: Alaska;$/Alaska/Projects/Intel/Haswell/Sharkbay_Crb_1APQM/Sharkbay.veb';
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3 BIOS Versions
1)Headless
REF-30853 Not Out Of Band Management---- PASS
Status Update:

2)SCT
REF-28581 EFI SCT Execution---- PASS
Status Update:

3)Terminal
REF-33700 .N/A Console Redirection via PCI/e Serial Card ---- PASS
Status Update:

REF-32330 Not OS Specific Console Redirection via Serial port for Setup ---- PASS
Status Update:

REF-32331 Not OS Specific Console Redirection via Serial port for SHELL ---- PASS
Status Update:

REF-32333 Not OS Specific Console Redirection via Serial port in Putty ---- PASS
Status Update:

REF-32334 .N/A Console Redirection via Serial port in TeraTerm ---- PASS
Status Update:

REF-33696 .N/A ESC Sequence for Putty ESC[N~ keypad ---- PASS
Status Update:

REF-33694 .N/A ESC Sequence for Putty Linux keypad ---- PASS
Status Update:

REF-33693 .N/A ESC Sequence for Putty SCO keypad ---- PASS
Status Update:

REF-33691 .N/A ESC Sequence for Putty VT100 keypad ---- PASS
Status Update:

REF-33692 .N/A ESC Sequence for Putty VT400 keypad ---- PASS
Status Update:

REF-33695 .N/A ESC Sequence for Putty Xterm R6 keypad ---- PASS
Status Update:

REF-32332 Not OS Specific ESC Sequence in HyperTerminal ---- PASS
Status Update:


Function by File Name

AMIBIOS Function Reference

By File Name

The following is a list of the .asm files.
For a list in alphabetical order, see In Alphabetical Order.

  • InitTerminalStrings.c
  • SerialIo.c
  • Terminal.c
  • Terminal.h
  • Terminal.mak
  • Terminal.sd
  • TerminalAcpi.c
  • TerminalAmiSerial.h
  • TerminalBoard.h
  • TerminalName.c
  • TerminalSetup.c
  • TerminalSetupVar.h
  • TerminalSimpleTextIn.c
  • TerminalSimpleTextOut.c
  • TerminalSrc.mak


InitTerminalStrings.c

Description:
Contains InitTerminalStrings(), which is linked to
SetupStringInit in the sdl page.  Before entering setup,
we do any modification or updating needed for the serial
port name strings (STR_SIO_SERIAL_PORT0, etc.).

The following functions are used in the file: InitTerminalStrings.c.

Function | Description
InitTerminalStrings | Certain strings in the terminal setup page can only be updated at runtime, which is what this function does. The pci serial port names are changed to contain the location (device and function numbers) of the port. If any serial ports are disabled, "Disabled" is concatenated to their names.
StrCat | Wrapper function around Wcscpy. Concantenates the second Unicode string to the first.


InitTerminalStrings in the InitTerminalStrings.c

Function : InitTerminalStrings

File: InitTerminalStrings.c
Description:
Certain strings in the terminal setup page can only be
updated at runtime, which is what this function does.
The pci serial port names are changed to contain the
location (device and function numbers) of the port.
If any serial ports are disabled, "Disabled"
is concatenated to their names.
Input:
IN EFI_HII_HANDLE HiiHandle
IN UINT16 Class
Output:
VOID


StrCat in the InitTerminalStrings.c

Function : StrCat

File: InitTerminalStrings.c
Description:
Wrapper function around Wcscpy.
Concantenates the second Unicode string to the first.
Input:
IN OUT CHAR16 *Destination
IN CHAR16 *Source
Output:
VOID


SerialIo.c

Description:
Driver for serial ports (both super io and pci).
Installs EFI_SERIAL_IO_PROTOCOL for a serial device.
Adds UART_DEVICE_PATH and UART_FLOW_CONTROL_DEVICE_PATH
nodes to its device path.

The following functions are used in the file: SerialIo.c.

Function | Description
AddSerialFifo | Add the data to the loopback buffer
CheckForLoopbackDevice | Checks if a hardware loopback plug is attached and sets the result in Parameters->SerialDevicePresentOnPort.
CheckSerialFifoEmpty | Check the loopback buffer empty or not
CheckThreBit | Serial Read and Write will be failed incase if it's reaches the maximum error count Once it reaches the error count, this event will be activated to monitor the serial port working state. If Transmistter Holding Register ready to accept the data, Error count will be reset so that redirection will start working again. Also this event fucntion will check if host can accept data(CTS is Set) when flow control is enabled. If Set it resets FlowCtrlCTSnotSet so that redirection will start working again.
EfiSerialGetControl | Protocol interface to get the serial device control bits.
EfiSerialRead | Protocol interface to read data from a serial device. In the case of a buffer overrun error, we dump the receive FIFO buffer. We use a semaphore (Parameters->ReadWriteSemaphore).
EfiSerialReset | Resets the serial device. Arguments: This - A Pointer to the Serial IO Interface.
EfiSerialSetAttributes | Protocol interface to set the serial device attributes. Sets the baud rate, receive FIFO depth, transmit/receice time out, parity, data buts, and stop bits on a serial device.
EfiSerialSetControl | Protocol interface to set the serial device control bits.
EfiSerialWrite | Protocol interface to write data to a serial device. We use a semaphore Parameters->ReadWriteSemaphore.
EnableFifoBuffers | If the UART is of type 16550A or a later one, if "NewFifoDepth" is 1, the FIFO buffers are disabled; else they are enabled. If the UART is of a earlier type than 16550A (in which case there are no FIFO buffers), the FIFO buffers are disabled.
GetSerialIo_DP | This fuction returns the last node in the device path for the given controller, which is the Acpi device path for the Serial port.
LookupHID | "hid" should match EISA_PNP_ID(0x501).
RemoveSerialFifo | Remove the data from the loopback buffer
SerialIoEntryPoint | Installs the driver binding protocol for this driver.
SerialIoGetControllerName | Gets the name of the controller.
SerialIoStart | Starts the driver.
SerialIoStop | Stops the driver.
SerialIoSupported | This driver supports the given controller if (1) the EISA UID and HID are values are correct or (2) the controller supports the PciIo Protocol and the Revision Id field in the configuration space indicates that the device is a serial port.
SerialReadPort | Reads a byte from the serial port.
SerialWritePort | Write the byte "Data" to the serial port.
SerialZeroMemory | Clears the buffer
SetUartType | In our implementation, we check the characteristics of the FIFO buffers and set the Uart type accordingly to UART16550A, UART16550, or UART16450.


AddSerialFifo in the SerialIo.c

Function : AddSerialFifo

File: SerialIo.c
Description:
Add the data to the loopback buffer
Input:
IN SERIAL_PARAMETERS *Parameters
Output:
None
Modified:
Notes:
Referrals:


CheckForLoopbackDevice in the SerialIo.c

Function : CheckForLoopbackDevice

File: SerialIo.c
Description:
Checks if a hardware loopback plug is attached and sets
the result in Parameters->SerialDevicePresentOnPort.
Input:
IN EFI_SERIAL_IO_PROTOCOL *SerialIo
Output:
VOID


CheckSerialFifoEmpty in the SerialIo.c

Function : CheckSerialFifoEmpty

File: SerialIo.c
Description:
Check the loopback buffer empty or not
Input:
IN SERIAL_PARAMETERS *Parameters
Output:
TRUE - if empty
FALSE- if not emptry
Modified:
Notes:
Referrals:


CheckThreBit in the SerialIo.c

Function : CheckThreBit

File: SerialIo.c
Description:
Serial Read and Write will be failed incase if it's reaches the maximum error count
Once it reaches the error count, this event will be activated to monitor the serial port
working state. If Transmistter Holding Register ready to accept the data, Error count will
be reset so that redirection will start working again.

Also this event fucntion will check if host can accept data(CTS is Set)
when flow control is enabled. If Set it resets FlowCtrlCTSnotSet so that
redirection will start working again.
Input:
IN EFI_EVENT    Event
IN VOID         *Context
Output:
VOID


EfiSerialGetControl in the SerialIo.c

Function : EfiSerialGetControl

File: SerialIo.c
Description:
Protocol interface to get the serial device control bits.
Input:
EFI_SERIAL_IO_INTERFACE         *This - Pointer to the Serial IO Interface
OUT UINT32                      *Control
Output:
EFI_STATUS
EFI_SUCCESS       - The new control bits were set on the serial device.
EFI_DEVICE_ERROR  - The serial device is not functioning correctly.
*Control            - Control bit settings
Modified:
Notes:
Referrals:
SerialReadPort, SerialWritePort, SerialReceiveTransmit


EfiSerialRead in the SerialIo.c

Function : EfiSerialRead

File: SerialIo.c
Description:
Protocol interface to read data from a serial device.
In the case of a buffer overrun error, we dump the receive
FIFO buffer.
We use a semaphore (Parameters->ReadWriteSemaphore).
Input:
EFI_SERIAL_IO_INTERFACE       *This - Pointer to the Serial IO Interface
UINTN                         *BufferSize - Size of input buffer/
                               characters received
VOID                          *Buffer - Data buffer
Output:
EFI_STATUS
EFI_SUCCESS       - The data was read.
EFI_DEVICE_ERROR  - The device reported an error.
EFI_TIMEOUT       - The data read was stopped due to a timeout.
*BufferSize         - Number of characters received
Modified:
*BufferSize
Notes:
Referrals:
SerialReceiveTransmit, SerialFifoGet


EfiSerialReset in the SerialIo.c

Function : EfiSerialReset

File: SerialIo.c
Description:
Resets the serial device.

Arguments:
This        - A Pointer to the Serial IO Interface.
Output:
EFI_STATUS
Returns:
EFI_SUCCESS      - The serial device was reset.
EFI_DEVICE_ERROR - The serial device could not be reset.


EfiSerialSetAttributes in the SerialIo.c

Function : EfiSerialSetAttributes

File: SerialIo.c
Description:
Protocol interface to set the serial device attributes.
Sets the baud rate, receive FIFO depth, transmit/receice time out,
parity, data buts, and stop bits on a serial device.
Input:
EFI_SERIAL_IO_INTERFACE       *This - Pointer to the Serial IO Interface
UINT64                        BaudRate - The requested baudrate
UINT32                        ReceiveFifoDepth - Requested depth of
                                    receive FIFO
UINT32                        Timeout - Single character timeout in
                           miliseconds
EFI_PARITY_TYPE               Parity - The type of parity to use
UINT8                         DataBits - The number of data bits to use
EFI_STOP_BITS_TYPE            StopBits - The number of stopbits to use
Output:
EFI_STATUS
EFI_SUCCESS       - The device attributes were set.
EFI_DEVICE_ERROR  - The device attributes could not be set.
EFI_INVALID_PARAMETER - A parameter was invalid.
Modified:
Notes:
Referrals:
SerialReadPort, SerialWritePort, AppendDevicePathNode


EfiSerialSetControl in the SerialIo.c

Function : EfiSerialSetControl

File: SerialIo.c
Description:
Protocol interface to set the serial device control bits.
Input:
EFI_SERIAL_IO_INTERFACE      *This - Pointer to the Serial IO Interface
UINT32                       Control - Contains the new control bit
                          settings
Output:
EFI_STATUS
EFI_SUCCESS       - The new control bits were set on the serial device.
EFI_UNSUPPORTED   - The serial device does not support this operation.
EFI_DEVICE_ERROR  - The serial device is not functioning correctly.
Modified:
Notes:
Referrals:
SerialReadPort, SerialWritePort


EfiSerialWrite in the SerialIo.c

Function : EfiSerialWrite

File: SerialIo.c
Description:
Protocol interface to write data to a serial device.
We use a semaphore Parameters->ReadWriteSemaphore.
Input:
EFI_SERIAL_IO_INTERFACE       *This - Pointer to the Serial IO Interface
UINTN                         *BufferSize - Number of character to
                               write/number written
VOID                          *Buffer - Data buffer
Output:
EFI_STATUS
EFI_SUCCESS       - The data was written.
EFI_DEVICE_ERROR  - The device reported an error.
EFI_TIMEOUT       - The data write was stopped due to a timeout.
*BufferSize         - Number of bytes written
Modified:
*BufferSize
Notes:
Referrals:
SerialReceiveTransmit, SerialFifoPut, CheckSerialFifoEmpty


EnableFifoBuffers in the SerialIo.c

Function : EnableFifoBuffers

File: SerialIo.c
Description:
If the UART is of type 16550A or a later one,
   if "NewFifoDepth" is 1, the FIFO buffers are disabled;
   else they are enabled.
If the UART is of a earlier type than 16550A
(in which case there are no FIFO buffers),
the FIFO buffers are disabled.
Input:
IN SERIAL_PARAMETERS *Parameters
IN UINT32 NewFifoDepth
Output:
VOID


GetSerialIo_DP in the SerialIo.c

Function : GetSerialIo_DP

File: SerialIo.c
Description:
This fuction returns the last node in the device
path for the given controller, which is the Acpi device path
for the Serial port.
Input:
IN EFI_DRIVER_BINDING_PROTOCOL *This
IN EFI_HANDLE                  Controller
IN OUT ACPI_HID_DEVICE_PATH**  SerialIodp
IN UINT32                      Attributes
IN BOOLEAN                     Test
Output:
EFI_SUCCESS or EFI_UNSUPPORTED


LookupHID in the SerialIo.c

Function : LookupHID

File: SerialIo.c
Description:
"hid" should match EISA_PNP_ID(0x501).
Input:
UINT32      hid - HID to look for
UINT32      uid - UID to look for
Output:
TRUE if match is found, FALSE otherwise


RemoveSerialFifo in the SerialIo.c

Function : RemoveSerialFifo

File: SerialIo.c
Description:
Remove the data from the loopback buffer
Input:
IN SERIAL_PARAMETERS *Parameters
Output:
Data
Modified:
Notes:
Referrals:


SerialIoEntryPoint in the SerialIo.c

Function : SerialIoEntryPoint

File: SerialIo.c
Description:
Installs the driver binding protocol for this driver.
Input:
IN EFI_HANDLE        ImageHandle,
IN EFI_SYSTEM_TABLE  *SystemTable
Output:
EFI_STATUS
Notes:
Here is the control flow of this function:
1. Initialize Ami Lib.
2. Install Driver Binding Protocol
3. Return EFI_SUCCESS.
Referrals:
InitAmiLib InstallMultipleProtocolInterfaces


SerialIoGetControllerName in the SerialIo.c

Function : SerialIoGetControllerName

File: SerialIo.c
Description:
Gets the name of the controller.
Input:
IN EFI_COMPONENT_NAME_PROTOCOL  *This
IN EFI_HANDLE                   Controller
IN EFI_HANDLE                   ChildHandle OPTIONAL
IN CHAR8                        *Language
OUT CHAR16                      **ControllerName
Output:
EFI_STATUS


SerialIoStart in the SerialIo.c

Function : SerialIoStart

File: SerialIo.c
Description:
Starts the driver.
Input:
IN EFI_DRIVER_BINDING_PROTOCOL      *This,
IN EFI_HANDLE                       Controller,
IN EFI_DEVICE_PATH_PROTOCOL         *RemainingDevicePath
Output:
EFI_STATUS
Modified:
Notes:
Referrals:


SerialIoStop in the SerialIo.c

Function : SerialIoStop

File: SerialIo.c
Description:
Stops the driver.
Input:
IN EFI_DRIVER_BINDING_PROTOCOL      *This,
IN EFI_HANDLE                       Controller,
IN  UINTN                           NumberOfChildren,
IN  EFI_HANDLE                      *ChildHandleBuffer
Output:
EFI_STATUS
Modified:
Notes:
Referrals:


SerialIoSupported in the SerialIo.c

Function : SerialIoSupported

File: SerialIo.c
Description:
This driver supports the given controller if
(1) the EISA UID and HID are values are correct
or (2) the controller supports the PciIo Protocol and the
Revision Id field in the configuration space indicates that
the device is a serial port.
Input:
IN EFI_DRIVER_BINDING_PROTOCOL      *This,
IN EFI_HANDLE                       Controller,
IN EFI_DEVICE_PATH_PROTOCOL         *RemainingDevicePath
Output:
EFI_STATUS
Modified:
Notes:
Referrals:


SerialReadPort in the SerialIo.c

Function : SerialReadPort

File: SerialIo.c
Description:
Reads a byte from the serial port.
Input:
IN SERIAL_PARAMETERS *Parameters: We use Parameters->BaseAddress.
IN UINT32 Offset: The offset from Parameters->BaseAddress.
Output:
UINT8 (The data read from the port).


SerialWritePort in the SerialIo.c

Function : SerialWritePort

File: SerialIo.c
Description:
Write the byte "Data" to the serial port.
Input:
IN SERIAL_PARAMETERS *Parameters: We use Parameters->BaseAddress.
IN UINT32 Offset: The offset from Parameters->BaseAddress.
IN UINT8 Data
Output:
VOID


SerialZeroMemory in the SerialIo.c

Function : SerialZeroMemory

File: SerialIo.c
Description:
Clears the buffer
Input:
void    *Buffer,
UINTN   Size
Output:
None
Modified:
Notes:

Referrals:


SetUartType in the SerialIo.c

Function : SetUartType

File: SerialIo.c
Description:
In our implementation, we check the characteristics of
the FIFO buffers and set the Uart type accordingly to
UART16550A, UART16550, or UART16450.
Input:
IN SERIAL_PARAMETERS *Parameters
Output:
VOID


Terminal.c

Description:
Installs EFI_SIMPLE_TEXT_INPUT_PROTOCOL and
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL for a serial device.
Adds a vendor messaging path for the terminal type
(PcAnsi, VT100, etc) to its device path.

The following functions are used in the file: Terminal.c.

Function | Description
AcpiSpcrTable | Gets the Spcr values which are configurable in Setup (the port number, terminal type, etc.). Calls CreateSpcrAcpiTable or calls RegisterProtocolCallback to call CreateSpcrAcpiTableWrapper when the AcpiSupportProtocol is installed.
ClearFiFoBuffers | Function to clear the Fifo buffers
CreateSpcrAcpiTable | Creates an spcr table and register it with AcpiSupportProtocol->SetAcpiTable().
CreateSpcrAcpiTableWrapper | Calls CreateSpcrAcpiTable when the AcpiSupport protocol becomes available.
GetComPortNumber | The function analyzes the device path to determine if the serial port is a SuperIo serial port or a PCI serial port. If it's a SuperIo serial port, it uses the EISA Pnp ID in the Acpi device path node to get the com port number. If it's a PCI serial port, it uses the PciIo protocol to get the com port number. This is a slight modification of SerialIo.c's GetSerialIo_DP.
SetComSuperIoSpcrTableValues | Gets the Spcr table values for SuperIo com ports (Base Address, IRQ) from the AMI_SIO_PROTOCOL installed on the controller and writes them to the global table of spcr values gSpcrInfo.
SetPciSerialSpcrTableValues | Gets the Spcr table values for Pci com ports (Base Address, IRQ, device id, vendor id, bus number, device number, function number) and stores them in the global table of spcr values gSpcrInfo.
TerminalEntryPoint | Entry point for the Terminal driver. Installs the driver binding protocol. Calls InitParts which will result in the SerialIo driver entry point being called. Calls InitSerialPortsEnabledVar (this inits the variable which keeps track of how many serial ports have been enabled).
TerminalStart | Installs the SimpleTextIn and SimpleTextOut protocols. Adds a node to the device path for the terminal type. Modifies the SerialIo protocol according to Setup values.
TerminalStop | Closes the SerialIo protocol. Uninstalls the SimpleTextIn and SimpleTextOut protocols. Closes timeout events like WaitForKey.
TerminalSupported | Checks whether the device path and serial io protocols are supported. Checks whether the terminal type is supported.


AcpiSpcrTable in the Terminal.c

Function : AcpiSpcrTable

File: Terminal.c
Description:
Gets the Spcr values which are configurable in Setup
(the port number, terminal type, etc.).
Calls CreateSpcrAcpiTable or calls RegisterProtocolCallback
to call CreateSpcrAcpiTableWrapper when the
AcpiSupportProtocol is installed.
Output:
VOID


ClearFiFoBuffers in the Terminal.c

Function : ClearFiFoBuffers

File: Terminal.c
Description:
Function to clear the Fifo buffers
Input:
IN EFI_EVENT   Event
IN VOID        *Context
Output:
None


CreateSpcrAcpiTable in the Terminal.c

Function : CreateSpcrAcpiTable

File: Terminal.c
Description:
Creates an spcr table and register it with
AcpiSupportProtocol->SetAcpiTable().
Output:
EFI_STATUS


CreateSpcrAcpiTableWrapper in the Terminal.c

Function : CreateSpcrAcpiTableWrapper

File: Terminal.c
Description:
Calls CreateSpcrAcpiTable when the AcpiSupport protocol
becomes available.
Output:
VOID


GetComPortNumber in the Terminal.c

Function : GetComPortNumber

File: Terminal.c
Description:
The function analyzes the device path to determine
if the serial port is a SuperIo serial port or a
PCI serial port.
If it's a SuperIo serial port, it uses the EISA Pnp ID
in the Acpi device path node to get the com port number.
If it's a PCI serial port, it uses the PciIo protocol to
get the com port number.
This is a slight modification of SerialIo.c's GetSerialIo_DP.
Output:
EFI_SUCCESS or EFI_UNSUPPORTED


SetComSuperIoSpcrTableValues in the Terminal.c

Function : SetComSuperIoSpcrTableValues

File: Terminal.c
Description:
Gets the Spcr table values for SuperIo com ports
(Base Address, IRQ) from the AMI_SIO_PROTOCOL installed
on the controller and writes them to the global table of spcr
values gSpcrInfo.
Output:
EFI_STATUS


SetPciSerialSpcrTableValues in the Terminal.c

Function : SetPciSerialSpcrTableValues

File: Terminal.c
Description:
Gets the Spcr table values for Pci com ports
(Base Address, IRQ, device id, vendor id,
bus number, device number, function number)
and stores them in the global table of spcr values gSpcrInfo.
Output:
EFI_STATUS


TerminalEntryPoint in the Terminal.c

Function : TerminalEntryPoint

File: Terminal.c
Description:
Entry point for the Terminal driver.
Installs the driver binding protocol.
Calls InitParts which will result in the
SerialIo driver entry point being called.
Calls InitSerialPortsEnabledVar
(this inits the variable which keeps track of how many
serial ports have been enabled).
Input:
IN EFI_HANDLE       ImageHandle
IN EFI_SYSTEM_TABLE *SystemTable
Output:
EFI_STATUS


TerminalStart in the Terminal.c

Function : TerminalStart

File: Terminal.c
Description:
Installs the SimpleTextIn and SimpleTextOut protocols.
Adds a node to the device path for the terminal type.
Modifies the SerialIo protocol according to Setup values.
Input:
IN EFI_DRIVER_BINDING_PROTOCOL  *This
IN EFI_HANDLE                   Controller
IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath
Output:
EFI_STATUS


TerminalStop in the Terminal.c

Function : TerminalStop

File: Terminal.c
Description:
Closes the SerialIo protocol.
Uninstalls the SimpleTextIn and SimpleTextOut protocols.
Closes timeout events like WaitForKey.
Input:
IN EFI_DRIVER_BINDING_PROTOCOL  *This
IN EFI_HANDLE                   Controller
IN UINTN                        NumberOfChildren
IN EFI_HANDLE                   *ChildHandleBuffer
Output:
EFI_STATUS


TerminalSupported in the Terminal.c

Function : TerminalSupported

File: Terminal.c
Description:
Checks whether the device path and serial io protocols
are supported.
Checks whether the terminal type is supported.
Input:
IN EFI_DRIVER_BINDING_PROTOCOL *This
IN EFI_HANDLE                   Controller
IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath
Output:
EFI_STATUS


Terminal.h

Description:
Contains TERMINAL_TYPE and TERMINAL_DEV definitions, among others.


Terminal.mak

Description:
Creates Terminal.efi.
Includes either Terminal.lib or Terminalx64.lib depending
on the cpu mode.

These two files are not part of Terminal.efi:
The Terminal.sd file is compiled as part of the target SetupSdbs
in Setup.mak.
InitTerminalStrings.c is compiled as part of the target SetupBin
in Setup.mak.


Terminal.sd

Description:
This is the setup page 'Serial Port Console Redirection.'
The link to the page is in the setup 'Advanced' tab.


TerminalAcpi.c

Description:
This file contains function to disable the PCI redirection
at ACPI enable call.

The following functions are used in the file: TerminalAcpi.c.

Function | Description
TerminalAcpiEnableDisableCallBack | This routine will be called to disable PCI redirection at ACPI enable/disable call and reset Interrupt Enable Register to disable interrupt from PCI Serial device & replace actual INT08h.


TerminalAcpiEnableDisableCallBack in the TerminalAcpi.c

Function : TerminalAcpiEnableDisableCallBack

File: TerminalAcpi.c
Description:
This routine will be called to disable PCI redirection at ACPI
enable/disable call and reset Interrupt Enable Register to
disable interrupt from PCI Serial device & replace actual INT08h.
Input:
None
Output:
None
Notes:
None


TerminalAmiSerial.h

Description:
AMI Serial Protocol Definiton.


TerminalBoard.h

Description:
Board file for the Terminal Module.


TerminalName.c

Description:
EFI_COMPONENT_NAME_PROTOCOL: GetDriverName(), GetControllerName().

The following functions are used in the file: TerminalName.c.

Function | Description
TerminalGetControllerName | returns EFI_UNSUPPORTED.
TerminalGetDriverName | Gets the driver name.


TerminalGetControllerName in the TerminalName.c

Function : TerminalGetControllerName

File: TerminalName.c
Description:
returns EFI_UNSUPPORTED.
Input:
IN EFI_COMPONENT_NAME_PROTOCOL  *This
IN EFI_HANDLE                   ControllerHandle
IN EFI_HANDLE                   ChildHandle OPTIONAL
IN CHAR8                        *Language
OUT CHAR16                      **ControllerName
Output:
EFI_UNSUPPORTED


TerminalGetDriverName in the TerminalName.c

Function : TerminalGetDriverName

File: TerminalName.c
Description:
Gets the driver name.
Input:
IN EFI_COMPONENT_NAME_PROTOCOL  *This
IN CHAR8                        *Language
OUT CHAR16                      **DriverName
Output:
EFI_STATUS


TerminalSetup.c

Description:
This file contains functions used by
Terminal.lib/Terminalx64.lib to get Terminal/Serial
related setup values.

The following functions are used in the file: TerminalSetup.c.

Function | Description
GetAcpiSpcrTableValues | Returns the configurable aspects of the acpi spcr table com port (the com port number, whether the console redirection is enabled, the terminal type, baude rate, and flow control type used).
GetDefaultConsoleRedirectionStatus | Returns the default settings of the ConsoleRedirection enable status
GetSetupValuesForSerialIoMode | Returns the user configured SERIAL_IO_MODE values.
GetSetupValuesForTerminal | Returns the Setup setttings for the terminal (whether redirection is enabled and the terminal type).
InitSerialPortsEnabledVar | Initializes the variables SERIAL_PORTS_ENABLED_VAR and PCI_SERIAL_PORTS_LOCATION_VAR. SERIAL_PORTS_ENABLED_VAR keeps track of which serial ports (both SuperIO and PCI) are enabled. PCI_SERIAL_PORTS_LOCATION_VAR keeps contains location information about the pci serial ports (device and function numbers).
SetSerialPortsEnabledVar_Pci | Keeping track of which pci serial ports are enabled a bit complicated. Unlike the SuperIO serial ports, pci serial ports do not have UIDs. We distinguish them by their locations. For each pci serial port, we store the entire device path under the variable names in gPciSerialPortsDevicePathVarName ("COM5," "COM6", etc). We check the parameter "DevicePath" against our stored device paths. If it matches, we return the com port number of that device path. If it doesn't match, we use a new entry in SERIAL_PORTS_ENABLED_VAR for the pci serial port. We also use a new entry in PCI_SERIAL_PORTS_LOCATION_VAR and store the device and function numbers.
SetSerialPortsEnabledVar_Sio | Sets SERIAL_PORTS_ENABLED_VAR[Port] to 1.
ValidatePciSerialNvram | Checks for the Presence of PCI Serial device with values present in the NVRAM Variable PciSerialPortsLocationVar. If found donot change NVRAM variable.If not found delete the NVRAM variable describing the device path and make current PciSerialPortsLocationVar.Bus[i],Device[i] and function[i] to zero.

The following data structures are used in the file: TerminalSetup.c.

Variable | Description
AcpiOemRev | Variable to replace ACPI_OEM_REV token.
CoreRevision | Variable to replace CORE_REVISION token.
Dont_Send_Ascii_Control_Printable_Characters | Variable to replace Dont_Send_Ascii_Control_Printable_Characters. token.
SpcrAccessSize | Variable to replace spcr_access_size token.
SpcrAddrBitOffset | Variable to replace spcr_addr_bit_offset token.
SpcrAddrBitWidth | Variable to replace spcr_addr_bit_width token.
SpcrAddrSpcId | Variable to replace spcr_addr_spc_id token.
SpcrGlobalSystemInit | Variable to replace spcr_global_system_int token.
SpcrInterfaceType | Variable to replace spcr_interface_type token.
SpcrInterruptType | Variable to replace spcr_interrupt_type token.
SpcrParity | Variable to replace spcr_parity token.
SpcrPciBusNumber | Variable to replace spcr_pci_bus_number token.
SpcrPciDeviceId | Variable to replace spcr_pci_device_id token.
SpcrPciDeviceNumber | Variable to replace spcr_interface_type token.
SpcrPciFlags | Variable to replace spcr_pci_flags token.
SpcrPciFunctionNumber | Variable to replace spcr_pci_function_number token.
SpcrPciSegment | Variable to replace spcr_pci_segment token.
SpcrPciVendorId | Variable to replace spcr_pci_vendor_id token.
SpcrStopBits | Variable to replace spcr_stop_bits token.


AcpiOemRev in the TerminalSetup.c

Variable : AcpiOemRev

File: TerminalSetup.c
Description:
Variable to replace ACPI_OEM_REV token.
Notes:
UINT64


CoreRevision in the TerminalSetup.c

Variable : CoreRevision

File: TerminalSetup.c
Description:
Variable to replace CORE_REVISION token.
Notes:
UINT64


Dont_Send_Ascii_Control_Printable_Characters in the TerminalSetup.c

Variable : Dont_Send_Ascii_Control_Printable_Characters

File: TerminalSetup.c
Description:
Variable to replace Dont_Send_Ascii_Control_Printable_Characters.
token.
Notes:
BOOLEAN


GetAcpiSpcrTableValues in the TerminalSetup.c

Function : GetAcpiSpcrTableValues

File: TerminalSetup.c
Description:
Returns the configurable aspects of the acpi spcr table
com port (the com port number, whether the console
redirection is enabled, the terminal type, baude rate,
and flow control type used).
Input:
IN OUT UINT8 *AcpiSpcrTableComPort
IN OUT UINT8 *AcpiSpcrTableConsoleRedirectionEnable
IN OUT UINT8 *AcpiSpcrTableTerminalType
IN OUT UINT8 *AcpiSpcrTableBaudRate
IN OUT UINT8 *AcpiSpcrTableFlowControl
Output:
VOID


GetDefaultConsoleRedirectionStatus in the TerminalSetup.c

Function : GetDefaultConsoleRedirectionStatus

File: TerminalSetup.c
Description:
Returns the default settings of the ConsoleRedirection
enable status
Input:
IN UINT8 Port
Output:
OUT UINT8 RedirectionStatus


GetSetupValuesForSerialIoMode in the TerminalSetup.c

Function : GetSetupValuesForSerialIoMode

File: TerminalSetup.c
Description:
Returns the user configured SERIAL_IO_MODE values.
Input:
IN UINT8 Port
IN OUT SERIAL_IO_MODE *SerialIoMode
Output:
VOID


GetSetupValuesForTerminal in the TerminalSetup.c

Function : GetSetupValuesForTerminal

File: TerminalSetup.c
Description:
Returns the Setup setttings for the terminal
(whether redirection is enabled and the terminal type).
Input:
IN UINT8 Port
IN OUT UINT8 *ConsoleRedirectionEnable
IN OUT UINT8 *TerminalType
IN OUT BOOLEAN *SupportExRes
IN OUT BOOLEAN *RecorderMode,
IN OUT UINT8 *Disable_Terminal_For_SCT_Test
Output:
VOID


InitSerialPortsEnabledVar in the TerminalSetup.c

Function : InitSerialPortsEnabledVar

File: TerminalSetup.c
Description:
Initializes the variables SERIAL_PORTS_ENABLED_VAR and
PCI_SERIAL_PORTS_LOCATION_VAR.
SERIAL_PORTS_ENABLED_VAR keeps track of which serial ports
(both SuperIO and PCI) are enabled.
PCI_SERIAL_PORTS_LOCATION_VAR keeps contains location
information about the pci serial ports (device and function
numbers).
Input:
VOID
Output:
VOID


SetSerialPortsEnabledVar_Pci in the TerminalSetup.c

Function : SetSerialPortsEnabledVar_Pci

File: TerminalSetup.c
Description:
Keeping track of which pci serial ports are enabled
a bit complicated.
Unlike the SuperIO serial ports, pci serial ports do not
have UIDs.
We distinguish them by their locations.
For each pci serial port, we store the entire device
path under the variable names in
gPciSerialPortsDevicePathVarName ("COM5," "COM6", etc).
We check the parameter "DevicePath" against our stored
device paths.
If it matches, we return the com port number of that
device path.
If it doesn't match, we use a new entry in
SERIAL_PORTS_ENABLED_VAR for the pci serial port.
We also use a new entry in PCI_SERIAL_PORTS_LOCATION_VAR
and store the device and function numbers.
Input:
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
IN UINT8 Device
IN UINT8 Function
Output:
the assigned com port number
UINT8


SetSerialPortsEnabledVar_Sio in the TerminalSetup.c

Function : SetSerialPortsEnabledVar_Sio

File: TerminalSetup.c
Description:
Sets SERIAL_PORTS_ENABLED_VAR[Port] to 1.
Input:
IN UINT8 Port
Output:
VOID


SpcrAccessSize in the TerminalSetup.c

Variable : SpcrAccessSize

File: TerminalSetup.c
Description:
Variable to replace spcr_access_size token.
Notes:
UINT8


SpcrAddrBitOffset in the TerminalSetup.c

Variable : SpcrAddrBitOffset

File: TerminalSetup.c
Description:
Variable to replace spcr_addr_bit_offset token.
Notes:
UINT8


SpcrAddrBitWidth in the TerminalSetup.c

Variable : SpcrAddrBitWidth

File: TerminalSetup.c
Description:
Variable to replace spcr_addr_bit_width token.
Notes:
UINT8


SpcrAddrSpcId in the TerminalSetup.c

Variable : SpcrAddrSpcId

File: TerminalSetup.c
Description:
Variable to replace spcr_addr_spc_id token.
Notes:
UINT8


SpcrGlobalSystemInit in the TerminalSetup.c

Variable : SpcrGlobalSystemInit

File: TerminalSetup.c
Description:
Variable to replace spcr_global_system_int token.
Notes:
UINT8


SpcrInterfaceType in the TerminalSetup.c

Variable : SpcrInterfaceType

File: TerminalSetup.c
Description:
Variable to replace spcr_interface_type token.
Notes:
UINT8


SpcrInterruptType in the TerminalSetup.c

Variable : SpcrInterruptType

File: TerminalSetup.c
Description:
Variable to replace spcr_interrupt_type token.
Notes:
UINT8


SpcrParity in the TerminalSetup.c

Variable : SpcrParity

File: TerminalSetup.c
Description:
Variable to replace spcr_parity token.
Notes:
UINT8


SpcrPciBusNumber in the TerminalSetup.c

Variable : SpcrPciBusNumber

File: TerminalSetup.c
Description:
Variable to replace spcr_pci_bus_number token.
Notes:
UINT8


SpcrPciDeviceId in the TerminalSetup.c

Variable : SpcrPciDeviceId

File: TerminalSetup.c
Description:
Variable to replace spcr_pci_device_id token.
Notes:
UINT16


SpcrPciDeviceNumber in the TerminalSetup.c

Variable : SpcrPciDeviceNumber

File: TerminalSetup.c
Description:
Variable to replace spcr_interface_type token.
Notes:
UINT8


SpcrPciFlags in the TerminalSetup.c

Variable : SpcrPciFlags

File: TerminalSetup.c
Description:
Variable to replace spcr_pci_flags token.
Notes:
UINT8


SpcrPciFunctionNumber in the TerminalSetup.c

Variable : SpcrPciFunctionNumber

File: TerminalSetup.c
Description:
Variable to replace spcr_pci_function_number token.
Notes:
UINT8


SpcrPciSegment in the TerminalSetup.c

Variable : SpcrPciSegment

File: TerminalSetup.c
Description:
Variable to replace spcr_pci_segment token.
Notes:
UINT8


SpcrPciVendorId in the TerminalSetup.c

Variable : SpcrPciVendorId

File: TerminalSetup.c
Description:
Variable to replace spcr_pci_vendor_id token.
Notes:
UINT16


SpcrStopBits in the TerminalSetup.c

Variable : SpcrStopBits

File: TerminalSetup.c
Description:
Variable to replace spcr_stop_bits token.
Notes:
UINT8


ValidatePciSerialNvram in the TerminalSetup.c

Function : ValidatePciSerialNvram

File: TerminalSetup.c
Description:
Checks for the Presence of PCI Serial device with values
present in the NVRAM Variable PciSerialPortsLocationVar.
If found donot change NVRAM variable.If not found delete
the NVRAM variable describing the device path  and make
current PciSerialPortsLocationVar.Bus[i],Device[i] and
function[i] to zero.
Input:
IN SERIAL_PORTS_ENABLED_VAR SerialPortsEnabledVar,
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
Output:
EFI_STATUS


TerminalSetupVar.h

Description:
Contains definition of PCI_SERIAL_PORTS_LOCATION_VAR
and of varstore declaration SERIAL_PORTS_ENABLED_VAR.


TerminalSimpleTextIn.c

Description:
Implements the SimpleTextIn protocol for the Terminal.
Interfaces with the SerialIo protocol to get and write
characters to the serial port.

The following functions are used in the file: TerminalSimpleTextIn.c.

Function | Description
AddCharToUnicodeBuffer | Adds a character to our internal unicode buffer TerminalDev->UnicodeFIFO.
ASCIIControlCodeConversion | Convert the ASCII control codes into CTRL+Unicode(Key)values
CheckKeyboardDataFromSerial | Check the Keyboard Data from Serial Port and Convert them into proper Keyboard data. Once the Keyboard data is found added into Keyboard Local buffer
CheckKeyinBuffer | Checks if any key is present in the buffer
CheckKeyNotify | Call the notification function based on the key pressed Paremeters: Key - Key pressed
ConvertUtf8ToUnicode | Creates a Unicode character from a Utf8 character.
ExtractUtf8CharFromRawBuffer | Creates a Uft8 char from our internal raw buffer of characters TerminalDev->RawFIFO.
FillRawBuffer | Fills our internal raw buffer TerminalDev->RawFIFO with characters read from the serial port.
FillUnicodeBufferFromSerial | Fills our internal Unicode buffer TerminalDev->UnicodeFIFO from our internal buffer of raw characters TerminalDev->RawFIFO. If the terminal type is Utf8, the bytes from the RawFIFO have to be decoded to form Unicode characters. In the case of all other supported terminal types (ANSI, VT100, VT100+), no processing is needed and characters are simply transferred from one buffer to the other.
GetKeyData | Get the Keyboard Data
GetKeyFromSerial | Reads the serial port and returns a corresponding AMI_EFI_KEY_DATA value. In some cases, multiple bytes must be read from the serial port to determine an EFI_INPUT_KEY value (e.g. escape sequences and Utf8 encoded characters).
InitTerminalKeyBuffer | Initialize Terminal Keyboard Buffer.
InsertKeyCode | Inserts a key code into keyboard buffer.
IsTerminalKeyboardBufferEmpty | Check whether Terminal Keyboard buffer is empty.
IsTerminalKeyboardBufferFull | Check whether Terminal Keyboard buffer is full.
PollingTerminalKey | Get the keys from the Serial device
PutBack | Puts the given Unicode character back into our internal character buffer TerminalDev->UnicodeFIFO.
ReadSerialPort | Calls SerialIo->Read to read characters from the serial port. The caller must allocate "Buffer." On input, "Size" is the size of "Buffer." On output, "Size" is the number of characters read from the serial port.
RemoveCharFromRawBuffer | Removes a character from our internal raw buffer TerminalDev->RawFIFO.
RemoveCharFromUnicodeBuffer | Removes a character from our internal character buffer TerminalDev->UnicodeFIFO.
RemoveKeyCode | Removes a key code from the keyboard buffer.
TerminalCommonReset | Terminal Keyboard Data buffer cleared
TerminalInputReadEfiKey | Reads the next keystroke from the input device and returns data in the form of AMI_EFI_KEY_DATA structure. This routine is a part of AmiEfiKeycode protocol implementation.
TerminalInputReadKey | Returns a EFI_INPUT_KEY Key if possible.
TerminalInputReadKeyEx | Reads the next keystroke from the input device and returns data in the form of EFI_KEY_DATA structure. This routine is a part of SimpleTextInEx protocol implementation.
TerminalInputRegisterKeyNotify | Register a notification function for a particular keystroke for the input device.
TerminalInputReset | In our implementation, this function does nothing.
TerminalInputResetEx | In our implementation, this function does nothing.
TerminalInputSetState | Set certain state for the input device.
TerminalInputUnRegisterKeyNotify | Removes the notification which was previously registered by TerminalInputRegisterKeyNotify.
ValidateKeyRecord | Check for Record is present or Not Paremeters: KEY_WAITING_RECORD - *TerminalKeyIn
WaitForEsc | The function polls the serial port to see if a key is available. If a key is available, checks for the ESC sequnce until time out happens. If ESC sequence found then stops the timer or timeout happens also this event will be closed
WaitForKey | The function polls the serial port to see if a key is available. If a key is available and the WaitForKey event is signaled.


AddCharToUnicodeBuffer in the TerminalSimpleTextIn.c

Function : AddCharToUnicodeBuffer

File: TerminalSimpleTextIn.c
Description:
Adds a character to our internal unicode buffer
TerminalDev->UnicodeFIFO.
Input:
IN TERMINAL_DEV *TerminalDev
IN OUT CHAR16 UnicodeChar
Output:
VOID


ASCIIControlCodeConversion in the TerminalSimpleTextIn.c

Function : ASCIIControlCodeConversion

File: TerminalSimpleTextIn.c
Description:
Convert the ASCII control codes into CTRL+Unicode(Key)values
Input:
IN AMI_EFI_KEY_DATA *pKey - it contains unicode values.
Output:
Converted Key Code


CheckKeyboardDataFromSerial in the TerminalSimpleTextIn.c

Function : CheckKeyboardDataFromSerial

File: TerminalSimpleTextIn.c
Description:
Check the Keyboard Data from Serial Port and Convert them
into proper Keyboard data. Once the Keyboard data is found added into
Keyboard Local buffer
Input:
IN  TERMINAL_DEV *TerminalDev
Output:
EFI_STATUS


CheckKeyinBuffer in the TerminalSimpleTextIn.c

Function : CheckKeyinBuffer

File: TerminalSimpleTextIn.c
Description:
Checks if any key is present in the buffer
Input:
KEYBOARD *Kbd - A pointer to the KEYBOARD device.
Output:
BOOLEAN - TRUE if a key is in the buffer, FALSE otherwise.


CheckKeyNotify in the TerminalSimpleTextIn.c

Function : CheckKeyNotify

File: TerminalSimpleTextIn.c
Description:
Call the notification function based on the key pressed

Paremeters:      Key - Key pressed
Output:
None


ConvertUtf8ToUnicode in the TerminalSimpleTextIn.c

Function : ConvertUtf8ToUnicode

File: TerminalSimpleTextIn.c
Description:
Creates a Unicode character from a Utf8 character.
Input:
IN UTF8_CHAR Utf8Char
IN UINT8 NumBytes
IN OUT CHAR16 *UnicodeChar
Output:
Creates a unicode char from the utf8 char.
VOID


ExtractUtf8CharFromRawBuffer in the TerminalSimpleTextIn.c

Function : ExtractUtf8CharFromRawBuffer

File: TerminalSimpleTextIn.c
Description:
Creates a Uft8 char from our internal raw buffer of
characters TerminalDev->RawFIFO.
Input:
IN TERMINAL_DEV *TerminalDev
IN OUT UTF8_CHAR* Utf8Char
IN OUT UINT8 *NumBytes
Output:
BOOLEAN


FillRawBuffer in the TerminalSimpleTextIn.c

Function : FillRawBuffer

File: TerminalSimpleTextIn.c
Description:
Fills our internal raw buffer TerminalDev->RawFIFO
with characters read from the serial port.
Input:
EFI_SERIAL_IO_PROTOCOL *SerialIo
IN UINT8 *Buffer
IN UINTN Start
IN UINTN *Size
Output:
VOID


FillUnicodeBufferFromSerial in the TerminalSimpleTextIn.c

Function : FillUnicodeBufferFromSerial

File: TerminalSimpleTextIn.c
Description:
Fills our internal Unicode buffer TerminalDev->UnicodeFIFO
from our internal buffer of raw characters
TerminalDev->RawFIFO.
If the terminal type is Utf8, the bytes from the RawFIFO have
to be decoded to form Unicode characters.
In the case of all other supported terminal types
(ANSI, VT100, VT100+), no processing is needed and characters
are simply transferred from one buffer to the other.
Input:
IN TERMINAL_DEV *TerminalDev
Output:
VOID


GetKeyData in the TerminalSimpleTextIn.c

Function : GetKeyData

File: TerminalSimpleTextIn.c
Description:
Get the Keyboard Data
Input:
IN  TERMINAL_DEV    *TerminalDev,
OUT VOID            *pKey,
IN  UINT8           KeySize
Output:
EFI_STATUS


GetKeyFromSerial in the TerminalSimpleTextIn.c

Function : GetKeyFromSerial

File: TerminalSimpleTextIn.c
Description:
Reads the serial port and returns a corresponding
AMI_EFI_KEY_DATA value.
In some cases, multiple bytes must be read from the
serial port to determine an EFI_INPUT_KEY value
(e.g. escape sequences and Utf8 encoded characters).
Input:
IN AMI_EFI_KEY_DATA *TerminalKey
Output:
EFI_STATUS


InitTerminalKeyBuffer in the TerminalSimpleTextIn.c

Function : InitTerminalKeyBuffer

File: TerminalSimpleTextIn.c
Description:
Initialize Terminal Keyboard Buffer.
Input:
IN TERMINAL_KB_BUFFER *KeyboardBuffer
Output:
EFI_SUCCESS


InsertKeyCode in the TerminalSimpleTextIn.c

Function : InsertKeyCode

File: TerminalSimpleTextIn.c
Description:
Inserts a key code into keyboard buffer.
Input:
KeyboardBuffer  - pointer to Terminal Keyboard Buffer.
Output:
EFI_SUCCESS


IsTerminalKeyboardBufferEmpty in the TerminalSimpleTextIn.c

Function : IsTerminalKeyboardBufferEmpty

File: TerminalSimpleTextIn.c
Description:
Check whether Terminal Keyboard buffer is empty.
Input:
KeyboardBuffer  - pointer to Terminal Keyboard Buffer.
Output:
TRUE if buffer is empty, FALSE otherwise


IsTerminalKeyboardBufferFull in the TerminalSimpleTextIn.c

Function : IsTerminalKeyboardBufferFull

File: TerminalSimpleTextIn.c
Description:
Check whether Terminal Keyboard buffer is full.
Input:
KeyboardBuffer  - pointer to Terminal Keyboard Buffer.
Output:
TRUE if buffer is full, FALSE otherwise


PollingTerminalKey in the TerminalSimpleTextIn.c

Function : PollingTerminalKey

File: TerminalSimpleTextIn.c
Description:
Get the keys from the Serial device
Input:
IN EFI_EVENT    Event
IN VOID         *Context
Output:
VOID


PutBack in the TerminalSimpleTextIn.c

Function : PutBack

File: TerminalSimpleTextIn.c
Description:
Puts the given Unicode character back into our internal
character buffer TerminalDev->UnicodeFIFO.
Input:
IN TERMINAL_DEV *TerminalDev
IN UINT16 UnicodeChar
Output:
VOID


ReadSerialPort in the TerminalSimpleTextIn.c

Function : ReadSerialPort

File: TerminalSimpleTextIn.c
Description:
Calls SerialIo->Read to read characters from the serial port.
The caller must allocate "Buffer."
On input, "Size" is the size of "Buffer."
On output, "Size" is the number of characters read from the
serial port.
Input:
IN EFI_SERIAL_IO_PROTOCOL *SerialIo,
IN OUT UINT8 *Buffer
IN OUT UINTN *Size
Output:
VOID


RemoveCharFromRawBuffer in the TerminalSimpleTextIn.c

Function : RemoveCharFromRawBuffer

File: TerminalSimpleTextIn.c
Description:
Removes a character from our internal raw buffer
TerminalDev->RawFIFO.
Input:
IN TERMINAL_DEV *TerminalDev
IN OUT UINT8* pByte
Output:
BOOLEAN


RemoveCharFromUnicodeBuffer in the TerminalSimpleTextIn.c

Function : RemoveCharFromUnicodeBuffer

File: TerminalSimpleTextIn.c
Description:
Removes a character from our internal
character buffer TerminalDev->UnicodeFIFO.
Input:
IN TERMINAL_DEV *TerminalDev
IN OUT CHAR16* UnicodeChar
Output:
BOOLEAN


RemoveKeyCode in the TerminalSimpleTextIn.c

Function : RemoveKeyCode

File: TerminalSimpleTextIn.c
Description:
Removes a key code from the keyboard buffer.
Input:
KeyboardBuffer  - pointer to Terminal Keyboard Buffer.
TerminalKey          - pointer to buffer that contains Terminal key code.
Output:
EFI_SUCCESS


TerminalCommonReset in the TerminalSimpleTextIn.c

Function : TerminalCommonReset

File: TerminalSimpleTextIn.c
Description:
Terminal Keyboard Data buffer cleared
Input:
IN TERMINAL_DEV    *TerminalDev
IN BOOLEAN         ExtendedVerification
Output:
EFI_STATUS


TerminalInputReadEfiKey in the TerminalSimpleTextIn.c

Function : TerminalInputReadEfiKey

File: TerminalSimpleTextIn.c
Description:
Reads the next keystroke from the input device and
   returns data in the form of AMI_EFI_KEY_DATA structure.
   This routine is a part of AmiEfiKeycode protocol
   implementation.
Input:
   IN AMI_EFIKEYCODE_PROTOCOL *This,
   OUT AMI_EFI_KEY_DATA *KeyData

Output           EFI_STATUS


TerminalInputReadKey in the TerminalSimpleTextIn.c

Function : TerminalInputReadKey

File: TerminalSimpleTextIn.c
Description:
Returns a EFI_INPUT_KEY Key if possible.
Input:
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL   *This
OUT EFI_INPUT_KEY                   *Key
Output:
    EFI_STATUS


TerminalInputReadKeyEx in the TerminalSimpleTextIn.c

Function : TerminalInputReadKeyEx

File: TerminalSimpleTextIn.c
Description:
Reads the next keystroke from the input device and
   returns data in the form of EFI_KEY_DATA structure.
   This routine is a part of SimpleTextInEx protocol
   implementation.
Input:
   IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
   OUT EFI_KEY_DATA *KeyData
Output:
   EFI_STATUS


TerminalInputRegisterKeyNotify in the TerminalSimpleTextIn.c

Function : TerminalInputRegisterKeyNotify

File: TerminalSimpleTextIn.c
Description:
Register a notification function for a particular
   keystroke for the input device.
Input:
This - A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL_EX
           instance.
   KeyData - Key value
   KeyNotificationFunction- Pointer to the Notification Function
   NotificationHandle - Handle to be unregisterd

Output           None


TerminalInputReset in the TerminalSimpleTextIn.c

Function : TerminalInputReset

File: TerminalSimpleTextIn.c
Description:
In our implementation, this function does nothing.
Input:
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL    *This
IN BOOLEAN         			ExtendedVerification
Output:
EFI_STATUS


TerminalInputResetEx in the TerminalSimpleTextIn.c

Function : TerminalInputResetEx

File: TerminalSimpleTextIn.c
Description:
In our implementation, this function does nothing.
Input:
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL    *This
IN BOOLEAN         			ExtendedVerification
Output:
EFI_STATUS


TerminalInputSetState in the TerminalSimpleTextIn.c

Function : TerminalInputSetState

File: TerminalSimpleTextIn.c
Description:
Set certain state for the input device.
Input:
   IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
   IN EFI_KEY_TOGGLE_STATE *KeyToggleState
Output:
   EFI_STATUS


TerminalInputUnRegisterKeyNotify in the TerminalSimpleTextIn.c

Function : TerminalInputUnRegisterKeyNotify

File: TerminalSimpleTextIn.c
Description:
Removes the notification which was previously
   registered by TerminalInputRegisterKeyNotify.
Input:
This - A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL_EX
           instance.
   NotificationHandle - Handle to be unregisterd

Output           None


ValidateKeyRecord in the TerminalSimpleTextIn.c

Function : ValidateKeyRecord

File: TerminalSimpleTextIn.c
Description:
Check for Record is present or Not

Paremeters:      KEY_WAITING_RECORD - *TerminalKeyIn
Output:
FALSE - If Record is deleted from list
   TRUE  - If Record is present in List


WaitForEsc in the TerminalSimpleTextIn.c

Function : WaitForEsc

File: TerminalSimpleTextIn.c
Description:
The function polls the serial port to see if a key is
available.
If a key is available, checks for the ESC sequnce until time out happens.
If ESC sequence found then stops the timer or timeout happens also this
event will be closed
Input:
IN EFI_EVENT    Event
IN VOID         *Context
Output:
VOID


WaitForKey in the TerminalSimpleTextIn.c

Function : WaitForKey

File: TerminalSimpleTextIn.c
Description:
The function polls the serial port to see if a key is
available. If a key is available and the WaitForKey event is signaled.
Input:
IN EFI_EVENT    Event
IN VOID         *Context
Output:
VOID


TerminalSimpleTextOut.c

Description:
Implements the SimpleTextOut protocol for the Terminal.

The following functions are used in the file: TerminalSimpleTextOut.c.

Function | Description
isValidAnsi | Return TRUE is the given character value is less than 256 (both ASCII and extended ASCII characters).
isValidAscii | Return TRUE is the given character value is less than 128.
RefreshScreen | Refresh the whole screen
TerminalClearScreen | Writes an escape sequence to the serial port to clear the screen.
TerminalEnableCursor | In our implementation, the parameter Visible should be set to TRUE. We cannot make the cursor invisible.
TerminalOutputEscapeSequence | Calls TerminalOutputStringHelper with the UpdateCursorPosition parameter set to FALSE.
TerminalOutputString | Wrapper function for TerminalOutputStringHelper. TerminalOutputStringHelper is called with the UpdateCursorPosition parameter set to TRUE.
TerminalOutputStringHelper | This is the function which writes a string to the screen. The characters of the string are translated or encoded as necessary according to the terminal type. The parameter UpdateCursorPosition is set to FALSE if an escape sequence is being written to the screen. For all other strings, the parameter should be set to TRUE.
TerminalQueryMode | We only support whatever mode is specified by the setup question "Resolution." Current possible values for the setup question are modes 0 and 2. If the mode is supported, that if the parameter "ModeNumber" matches the setup question value the function returns the max number of rows and columns for the given ModeNumber.
TerminalReset | Writes escape sequences to the seral port which clear the screen and set the background color to white and the foreground color to black.
TerminalSetAttribute | Writes an escape sequence to the serial port to set various attributes (foreground and background colors and bold/normal text).
TerminalSetCursorPosition | Writes an escape sequence to the serial port to set the cursor position. The given "Column" and "Row" parameters must conform to MODE_0_MAX_COLUMNS and MODE_0_MAX_ROWS respectively.
TerminalSetMode | In our implementation, we only support mode 0 and Mode 1, which is MODE_0_MAX_ROWS or MODE_2_MAX_ROWS and MODE_0_MAX_COLUMNS or MODE_2_MAX_COLUMNS respectively.
TerminalTestString | Writes the given string to the screen. Returns an error if the characters could not be encoded properly if there was some problem writing them to the screen.
TranslateToAnsi | This function translates the Unicode drawing characters required by EFI and defined in SimpleTextOut.h (e.g. for drawing boxes) to extended ASCII. (The extended ASCII drawing characters look nicer than the regular ASCII drawing characters). The Unicode drawing characters have the form 0x25XX or 0x21XX. We look up the Unicode character in the gUnicodeToAscii table. If the given character does not have the correct form or is not in the table, we return 0.
TranslateToAscii | This function translates the Unicode drawing characters required by EFI and defined in SimpleTextOut.h (e.g. for drawing boxes) to ASCII. The Unicode drawing characters have the form 0x25XX or 0x21XX. We look up the Unicode character in the gUnicodeToAscii table. If the given character does not have the correct form or is not in the table, we return 0.
UnicodeToUtf8 | Utf8 is a character encoding for Unicode characters. For Unicode characters with values 0x00-0x7F, (the basic ASCII characters), the Utf8 encoding has one byte which is comprised of '0b' plus the ASCII character. For Unicode characters with values 0x80-0x7FF, the Utf8 encoding has two bytes. The first byte begins with "110b" and the second byte "10b". For Unicode characters with values 0x800-0xFFFF, the Utf8 encoding has three bytes. The first byte begins with "1110b," and the second and third bytes start with "10b".
WriteToSerialPort | Uses the SerialIo protocol's Write function.


isValidAnsi in the TerminalSimpleTextOut.c

Function : isValidAnsi

File: TerminalSimpleTextOut.c
Description:
Return TRUE is the given character value is less than 256
(both ASCII and extended ASCII characters).
Input:
IN CHAR16 c
Output:
BOOLEAN


isValidAscii in the TerminalSimpleTextOut.c

Function : isValidAscii

File: TerminalSimpleTextOut.c
Description:
Return TRUE is the given character value is less than 128.
Input:
IN CHAR16 c
Output:
BOOLEAN


RefreshScreen in the TerminalSimpleTextOut.c

Function : RefreshScreen

File: TerminalSimpleTextOut.c
Description:
Refresh the whole screen
Input:
Output:


TerminalClearScreen in the TerminalSimpleTextOut.c

Function : TerminalClearScreen

File: TerminalSimpleTextOut.c
Description:
Writes an escape sequence to the serial port
to clear the screen.
Input:
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL   *This
Output:
EFI_STATUS


TerminalEnableCursor in the TerminalSimpleTextOut.c

Function : TerminalEnableCursor

File: TerminalSimpleTextOut.c
Description:
In our implementation, the parameter Visible should be set
to TRUE.  We cannot make the cursor invisible.
Input:
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This
IN BOOLEAN                          Visible
Output:
EFI_STATUS


TerminalOutputEscapeSequence in the TerminalSimpleTextOut.c

Function : TerminalOutputEscapeSequence

File: TerminalSimpleTextOut.c
Description:
Calls TerminalOutputStringHelper with the
UpdateCursorPosition parameter set to FALSE.
Input:
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This
IN CHAR16                           *String
Output:
EFI_STATUS


TerminalOutputString in the TerminalSimpleTextOut.c

Function : TerminalOutputString

File: TerminalSimpleTextOut.c
Description:
Wrapper function for TerminalOutputStringHelper.
TerminalOutputStringHelper is called with the
UpdateCursorPosition parameter set to TRUE.
Input:
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This
IN CHAR16                           *String
Output:
EFI_STATUS


TerminalOutputStringHelper in the TerminalSimpleTextOut.c

Function : TerminalOutputStringHelper

File: TerminalSimpleTextOut.c
Description:
This is the function which writes a string to the screen.
The characters of the string are translated or encoded as
necessary according to the terminal type.
The parameter UpdateCursorPosition is set to FALSE if an
escape sequence is being written to the screen.
For all other strings, the parameter should be set to TRUE.
Input:
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This
IN CHAR16                           *String
IN BOOLEAN                          UpdateCursorPosition
Output:
EFI_STATUS


TerminalQueryMode in the TerminalSimpleTextOut.c

Function : TerminalQueryMode

File: TerminalSimpleTextOut.c
Description:
We only support whatever mode is specified by the setup
question "Resolution."
Current possible values for the setup question are
modes 0 and 2.
If the mode is supported, that if the parameter "ModeNumber"
matches the setup question value the function returns the
max number of rows and columns for the given ModeNumber.
Input:
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This
IN UINTN                            ModeNumber
OUT UINTN                           *Columns
OUT UINTN                           *Rows
Output:
EFI_STATUS


TerminalReset in the TerminalSimpleTextOut.c

Function : TerminalReset

File: TerminalSimpleTextOut.c
Description:
Writes escape sequences to the seral port which
clear the screen and set the background color to white and
the foreground color to black.
Input:
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This
IN BOOLEAN                          ExtendedVerification
Output:
EFI_STATUS


TerminalSetAttribute in the TerminalSimpleTextOut.c

Function : TerminalSetAttribute

File: TerminalSimpleTextOut.c
Description:
Writes an escape sequence to the serial port
to set various attributes (foreground and background colors
and bold/normal text).
Input:
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This
IN UINTN                            Attribute
Output:
EFI_STATUS


TerminalSetCursorPosition in the TerminalSimpleTextOut.c

Function : TerminalSetCursorPosition

File: TerminalSimpleTextOut.c
Description:
Writes an escape sequence to the serial port
to set the cursor position.
The given "Column" and "Row" parameters must conform
to MODE_0_MAX_COLUMNS and MODE_0_MAX_ROWS respectively.
Input:
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This
IN UINTN                            Column
IN UINTN                            Row


TerminalSetMode in the TerminalSimpleTextOut.c

Function : TerminalSetMode

File: TerminalSimpleTextOut.c
Description:
In our implementation, we only support mode 0 and Mode 1,
which is MODE_0_MAX_ROWS or MODE_2_MAX_ROWS and  MODE_0_MAX_COLUMNS
or MODE_2_MAX_COLUMNS respectively.
Input:
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This
IN UINTN                            ModeNumber
Output:
EFI_STATUS


TerminalTestString in the TerminalSimpleTextOut.c

Function : TerminalTestString

File: TerminalSimpleTextOut.c
Description:
Writes the given string to the screen.
Returns an error if the characters could not be encoded
properly if there was some problem writing them to the screen.
Input:
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This
IN CHAR16                           *String
Output:
EFI_STATUS


TranslateToAnsi in the TerminalSimpleTextOut.c

Function : TranslateToAnsi

File: TerminalSimpleTextOut.c
Description:
This function translates the Unicode drawing
characters required by EFI and defined in SimpleTextOut.h
(e.g. for drawing boxes) to extended ASCII.
(The extended ASCII drawing characters look nicer than the
regular ASCII drawing characters).
The Unicode drawing characters have the form 0x25XX or 0x21XX.
We look up the Unicode character in the gUnicodeToAscii table.
If the given character does not have the correct form or is
not in the table, we return 0.
Input:
IN CHAR16 c: Unicode drawing character.
Output:
CHAR8, extended ascii drawing character.


TranslateToAscii in the TerminalSimpleTextOut.c

Function : TranslateToAscii

File: TerminalSimpleTextOut.c
Description:
This function translates the Unicode drawing
characters required by EFI and defined in SimpleTextOut.h
(e.g. for drawing boxes) to ASCII.
The Unicode drawing characters have the form 0x25XX or 0x21XX.
We look up the Unicode character in the gUnicodeToAscii table.
If the given character does not have the correct form or is
not in the table, we return 0.
Input:
IN CHAR16 c: Unicode drawing character.
Output:
CHAR8, ascii drawing character.


UnicodeToUtf8 in the TerminalSimpleTextOut.c

Function : UnicodeToUtf8

File: TerminalSimpleTextOut.c
Description:
Utf8 is a character encoding for Unicode characters.

For Unicode characters with values 0x00-0x7F,
(the basic ASCII characters),
the Utf8 encoding has one byte which is comprised of '0b'
plus the ASCII character.

For Unicode characters with values 0x80-0x7FF,
the Utf8 encoding has two bytes.
The first byte begins with "110b" and the second byte "10b".

For Unicode characters with values 0x800-0xFFFF,
the Utf8 encoding has three bytes.
The first byte begins with "1110b,"
and the second and third bytes start with "10b".
Input:
IN CHAR16 Unicode
IN OUT UTF8_CHAR *Utf8Char
IN OUT UINT8 *NumBytes
Output:
EFI_STATUS


WriteToSerialPort in the TerminalSimpleTextOut.c

Function : WriteToSerialPort

File: TerminalSimpleTextOut.c
Description:
Uses the SerialIo protocol's Write function.
Input:
IN UINT8 *Buffer
IN UINTN Length
Output:
EFI_STATUS


TerminalSrc.mak

Description:
The Module "Serial Redirection Sources" is compiled into the
binary Terminal.lib in the Build directory.
This binary file in the Build directory is included in the
module "Serial Redirection" if the "Serial Redirection Sources"
module is part of the project.
Otherwise, a version which is a part of the "Serial Redirection" module
is used.

In the "Serial Redirection" module, Terminalx64.lib is the x64 version
of the "Serial Redirectiono Sources."
Terminal.lib is renamed to Terminalx64.lib.


Functions in Alphabetical Order

In Alphabetical Order

The following topics provide a list in alphabetical order.
For a list by file name, see By File Name.

  • A
  • C
  • D
  • E
  • F
  • G
  • I
  • L
  • P
  • R
  • S
  • T
  • U
  • V
  • W


Functions in Alphabetical Order

A

Function | Description
AcpiSpcrTable | Gets the Spcr values which are configurable in Setup (the port number, terminal type, etc.). Calls CreateSpcrAcpiTable or calls RegisterProtocolCallback to call CreateSpcrAcpiTableWrapper when the AcpiSupportProtocol is installed.
AddCharToUnicodeBuffer | Adds a character to our internal unicode buffer TerminalDev->UnicodeFIFO.
AddSerialFifo | Add the data to the loopback buffer
ASCIIControlCodeConversion | Convert the ASCII control codes into CTRL+Unicode(Key)values

Data Structure | Description
AcpiOemRev | Variable to replace ACPI_OEM_REV token.


Functions in Alphabetical Order

C

Function | Description
CheckForLoopbackDevice | Checks if a hardware loopback plug is attached and sets the result in Parameters->SerialDevicePresentOnPort.
CheckKeyboardDataFromSerial | Check the Keyboard Data from Serial Port and Convert them into proper Keyboard data. Once the Keyboard data is found added into Keyboard Local buffer
CheckKeyinBuffer | Checks if any key is present in the buffer
CheckKeyNotify | Call the notification function based on the key pressed Paremeters: Key - Key pressed
CheckSerialFifoEmpty | Check the loopback buffer empty or not
CheckThreBit | Serial Read and Write will be failed incase if it's reaches the maximum error count Once it reaches the error count, this event will be activated to monitor the serial port working state. If Transmistter Holding Register ready to accept the data, Error count will be reset so that redirection will start working again. Also this event fucntion will check if host can accept data(CTS is Set) when flow control is enabled. If Set it resets FlowCtrlCTSnotSet so that redirection will start working again.
ClearFiFoBuffers | Function to clear the Fifo buffers
ConvertUtf8ToUnicode | Creates a Unicode character from a Utf8 character.
CreateSpcrAcpiTable | Creates an spcr table and register it with AcpiSupportProtocol->SetAcpiTable().
CreateSpcrAcpiTableWrapper | Calls CreateSpcrAcpiTable when the AcpiSupport protocol becomes available.

Data Structure | Description
CoreRevision | Variable to replace CORE_REVISION token.


Functions in Alphabetical Order

D

Data Structure | Description
Dont_Send_Ascii_Control_Printable_Characters | Variable to replace Dont_Send_Ascii_Control_Printable_Characters. token.


Functions in Alphabetical Order

E

Function | Description
EfiSerialGetControl | Protocol interface to get the serial device control bits.
EfiSerialRead | Protocol interface to read data from a serial device. In the case of a buffer overrun error, we dump the receive FIFO buffer. We use a semaphore (Parameters->ReadWriteSemaphore).
EfiSerialReset | Resets the serial device. Arguments: This - A Pointer to the Serial IO Interface.
EfiSerialSetAttributes | Protocol interface to set the serial device attributes. Sets the baud rate, receive FIFO depth, transmit/receice time out, parity, data buts, and stop bits on a serial device.
EfiSerialSetControl | Protocol interface to set the serial device control bits.
EfiSerialWrite | Protocol interface to write data to a serial device. We use a semaphore Parameters->ReadWriteSemaphore.
EnableFifoBuffers | If the UART is of type 16550A or a later one, if "NewFifoDepth" is 1, the FIFO buffers are disabled; else they are enabled. If the UART is of a earlier type than 16550A (in which case there are no FIFO buffers), the FIFO buffers are disabled.
ExtractUtf8CharFromRawBuffer | Creates a Uft8 char from our internal raw buffer of characters TerminalDev->RawFIFO.


Functions in Alphabetical Order

F

Function | Description
FillRawBuffer | Fills our internal raw buffer TerminalDev->RawFIFO with characters read from the serial port.
FillUnicodeBufferFromSerial | Fills our internal Unicode buffer TerminalDev->UnicodeFIFO from our internal buffer of raw characters TerminalDev->RawFIFO. If the terminal type is Utf8, the bytes from the RawFIFO have to be decoded to form Unicode characters. In the case of all other supported terminal types (ANSI, VT100, VT100+), no processing is needed and characters are simply transferred from one buffer to the other.


Functions in Alphabetical Order

G

Function | Description
GetAcpiSpcrTableValues | Returns the configurable aspects of the acpi spcr table com port (the com port number, whether the console redirection is enabled, the terminal type, baude rate, and flow control type used).
GetComPortNumber | The function analyzes the device path to determine if the serial port is a SuperIo serial port or a PCI serial port. If it's a SuperIo serial port, it uses the EISA Pnp ID in the Acpi device path node to get the com port number. If it's a PCI serial port, it uses the PciIo protocol to get the com port number. This is a slight modification of SerialIo.c's GetSerialIo_DP.
GetDefaultConsoleRedirectionStatus | Returns the default settings of the ConsoleRedirection enable status
GetKeyData | Get the Keyboard Data
GetKeyFromSerial | Reads the serial port and returns a corresponding AMI_EFI_KEY_DATA value. In some cases, multiple bytes must be read from the serial port to determine an EFI_INPUT_KEY value (e.g. escape sequences and Utf8 encoded characters).
GetSerialIo_DP | This fuction returns the last node in the device path for the given controller, which is the Acpi device path for the Serial port.
GetSetupValuesForSerialIoMode | Returns the user configured SERIAL_IO_MODE values.
GetSetupValuesForTerminal | Returns the Setup setttings for the terminal (whether redirection is enabled and the terminal type).


Functions in Alphabetical Order

I

Function | Description
InitSerialPortsEnabledVar | Initializes the variables SERIAL_PORTS_ENABLED_VAR and PCI_SERIAL_PORTS_LOCATION_VAR. SERIAL_PORTS_ENABLED_VAR keeps track of which serial ports (both SuperIO and PCI) are enabled. PCI_SERIAL_PORTS_LOCATION_VAR keeps contains location information about the pci serial ports (device and function numbers).
InitTerminalKeyBuffer | Initialize Terminal Keyboard Buffer.
InitTerminalStrings | Certain strings in the terminal setup page can only be updated at runtime, which is what this function does. The pci serial port names are changed to contain the location (device and function numbers) of the port. If any serial ports are disabled, "Disabled" is concatenated to their names.
InsertKeyCode | Inserts a key code into keyboard buffer.
IsTerminalKeyboardBufferEmpty | Check whether Terminal Keyboard buffer is empty.
IsTerminalKeyboardBufferFull | Check whether Terminal Keyboard buffer is full.
isValidAnsi | Return TRUE is the given character value is less than 256 (both ASCII and extended ASCII characters).
isValidAscii | Return TRUE is the given character value is less than 128.


Functions in Alphabetical Order

L

Function | Description
LookupHID | "hid" should match EISA_PNP_ID(0x501).


Functions in Alphabetical Order

P

Function | Description
PollingTerminalKey | Get the keys from the Serial device
PutBack | Puts the given Unicode character back into our internal character buffer TerminalDev->UnicodeFIFO.


Functions in Alphabetical Order

R

Function | Description
ReadSerialPort | Calls SerialIo->Read to read characters from the serial port. The caller must allocate "Buffer." On input, "Size" is the size of "Buffer." On output, "Size" is the number of characters read from the serial port.
RefreshScreen | Refresh the whole screen
RemoveCharFromRawBuffer | Removes a character from our internal raw buffer TerminalDev->RawFIFO.
RemoveCharFromUnicodeBuffer | Removes a character from our internal character buffer TerminalDev->UnicodeFIFO.
RemoveKeyCode | Removes a key code from the keyboard buffer.
RemoveSerialFifo | Remove the data from the loopback buffer


Functions in Alphabetical Order

S

Function | Description
SerialIoEntryPoint | Installs the driver binding protocol for this driver.
SerialIoGetControllerName | Gets the name of the controller.
SerialIoStart | Starts the driver.
SerialIoStop | Stops the driver.
SerialIoSupported | This driver supports the given controller if (1) the EISA UID and HID are values are correct or (2) the controller supports the PciIo Protocol and the Revision Id field in the configuration space indicates that the device is a serial port.
SerialReadPort | Reads a byte from the serial port.
SerialWritePort | Write the byte "Data" to the serial port.
SerialZeroMemory | Clears the buffer
SetComSuperIoSpcrTableValues | Gets the Spcr table values for SuperIo com ports (Base Address, IRQ) from the AMI_SIO_PROTOCOL installed on the controller and writes them to the global table of spcr values gSpcrInfo.
SetPciSerialSpcrTableValues | Gets the Spcr table values for Pci com ports (Base Address, IRQ, device id, vendor id, bus number, device number, function number) and stores them in the global table of spcr values gSpcrInfo.
SetSerialPortsEnabledVar_Pci | Keeping track of which pci serial ports are enabled a bit complicated. Unlike the SuperIO serial ports, pci serial ports do not have UIDs. We distinguish them by their locations. For each pci serial port, we store the entire device path under the variable names in gPciSerialPortsDevicePathVarName ("COM5," "COM6", etc). We check the parameter "DevicePath" against our stored device paths. If it matches, we return the com port number of that device path. If it doesn't match, we use a new entry in SERIAL_PORTS_ENABLED_VAR for the pci serial port. We also use a new entry in PCI_SERIAL_PORTS_LOCATION_VAR and store the device and function numbers.
SetSerialPortsEnabledVar_Sio | Sets SERIAL_PORTS_ENABLED_VAR[Port] to 1.
SetUartType | In our implementation, we check the characteristics of the FIFO buffers and set the Uart type accordingly to UART16550A, UART16550, or UART16450.
StrCat | Wrapper function around Wcscpy. Concantenates the second Unicode string to the first.

Data Structure | Description
SpcrAccessSize | Variable to replace spcr_access_size token.
SpcrAddrBitOffset | Variable to replace spcr_addr_bit_offset token.
SpcrAddrBitWidth | Variable to replace spcr_addr_bit_width token.
SpcrAddrSpcId | Variable to replace spcr_addr_spc_id token.
SpcrGlobalSystemInit | Variable to replace spcr_global_system_int token.
SpcrInterfaceType | Variable to replace spcr_interface_type token.
SpcrInterruptType | Variable to replace spcr_interrupt_type token.
SpcrParity | Variable to replace spcr_parity token.
SpcrPciBusNumber | Variable to replace spcr_pci_bus_number token.
SpcrPciDeviceId | Variable to replace spcr_pci_device_id token.
SpcrPciDeviceNumber | Variable to replace spcr_interface_type token.
SpcrPciFlags | Variable to replace spcr_pci_flags token.
SpcrPciFunctionNumber | Variable to replace spcr_pci_function_number token.
SpcrPciSegment | Variable to replace spcr_pci_segment token.
SpcrPciVendorId | Variable to replace spcr_pci_vendor_id token.
SpcrStopBits | Variable to replace spcr_stop_bits token.


Functions in Alphabetical Order

T

Function | Description
TerminalAcpiEnableDisableCallBack | This routine will be called to disable PCI redirection at ACPI enable/disable call and reset Interrupt Enable Register to disable interrupt from PCI Serial device & replace actual INT08h.
TerminalClearScreen | Writes an escape sequence to the serial port to clear the screen.
TerminalCommonReset | Terminal Keyboard Data buffer cleared
TerminalEnableCursor | In our implementation, the parameter Visible should be set to TRUE. We cannot make the cursor invisible.
TerminalEntryPoint | Entry point for the Terminal driver. Installs the driver binding protocol. Calls InitParts which will result in the SerialIo driver entry point being called. Calls InitSerialPortsEnabledVar (this inits the variable which keeps track of how many serial ports have been enabled).
TerminalGetControllerName | returns EFI_UNSUPPORTED.
TerminalGetDriverName | Gets the driver name.
TerminalInputReadEfiKey | Reads the next keystroke from the input device and returns data in the form of AMI_EFI_KEY_DATA structure. This routine is a part of AmiEfiKeycode protocol implementation.
TerminalInputReadKey | Returns a EFI_INPUT_KEY Key if possible.
TerminalInputReadKeyEx | Reads the next keystroke from the input device and returns data in the form of EFI_KEY_DATA structure. This routine is a part of SimpleTextInEx protocol implementation.
TerminalInputRegisterKeyNotify | Register a notification function for a particular keystroke for the input device.
TerminalInputReset | In our implementation, this function does nothing.
TerminalInputResetEx | In our implementation, this function does nothing.
TerminalInputSetState | Set certain state for the input device.
TerminalInputUnRegisterKeyNotify | Removes the notification which was previously registered by TerminalInputRegisterKeyNotify.
TerminalOutputEscapeSequence | Calls TerminalOutputStringHelper with the UpdateCursorPosition parameter set to FALSE.
TerminalOutputString | Wrapper function for TerminalOutputStringHelper. TerminalOutputStringHelper is called with the UpdateCursorPosition parameter set to TRUE.
TerminalOutputStringHelper | This is the function which writes a string to the screen. The characters of the string are translated or encoded as necessary according to the terminal type. The parameter UpdateCursorPosition is set to FALSE if an escape sequence is being written to the screen. For all other strings, the parameter should be set to TRUE.
TerminalQueryMode | We only support whatever mode is specified by the setup question "Resolution." Current possible values for the setup question are modes 0 and 2. If the mode is supported, that if the parameter "ModeNumber" matches the setup question value the function returns the max number of rows and columns for the given ModeNumber.
TerminalReset | Writes escape sequences to the seral port which clear the screen and set the background color to white and the foreground color to black.
TerminalSetAttribute | Writes an escape sequence to the serial port to set various attributes (foreground and background colors and bold/normal text).
TerminalSetCursorPosition | Writes an escape sequence to the serial port to set the cursor position. The given "Column" and "Row" parameters must conform to MODE_0_MAX_COLUMNS and MODE_0_MAX_ROWS respectively.
TerminalSetMode | In our implementation, we only support mode 0 and Mode 1, which is MODE_0_MAX_ROWS or MODE_2_MAX_ROWS and MODE_0_MAX_COLUMNS or MODE_2_MAX_COLUMNS respectively.
TerminalStart | Installs the SimpleTextIn and SimpleTextOut protocols. Adds a node to the device path for the terminal type. Modifies the SerialIo protocol according to Setup values.
TerminalStop | Closes the SerialIo protocol. Uninstalls the SimpleTextIn and SimpleTextOut protocols. Closes timeout events like WaitForKey.
TerminalSupported | Checks whether the device path and serial io protocols are supported. Checks whether the terminal type is supported.
TerminalTestString | Writes the given string to the screen. Returns an error if the characters could not be encoded properly if there was some problem writing them to the screen.
TranslateToAnsi | This function translates the Unicode drawing characters required by EFI and defined in SimpleTextOut.h (e.g. for drawing boxes) to extended ASCII. (The extended ASCII drawing characters look nicer than the regular ASCII drawing characters). The Unicode drawing characters have the form 0x25XX or 0x21XX. We look up the Unicode character in the gUnicodeToAscii table. If the given character does not have the correct form or is not in the table, we return 0.
TranslateToAscii | This function translates the Unicode drawing characters required by EFI and defined in SimpleTextOut.h (e.g. for drawing boxes) to ASCII. The Unicode drawing characters have the form 0x25XX or 0x21XX. We look up the Unicode character in the gUnicodeToAscii table. If the given character does not have the correct form or is not in the table, we return 0.


Functions in Alphabetical Order

U

Function | Description
UnicodeToUtf8 | Utf8 is a character encoding for Unicode characters. For Unicode characters with values 0x00-0x7F, (the basic ASCII characters), the Utf8 encoding has one byte which is comprised of '0b' plus the ASCII character. For Unicode characters with values 0x80-0x7FF, the Utf8 encoding has two bytes. The first byte begins with "110b" and the second byte "10b". For Unicode characters with values 0x800-0xFFFF, the Utf8 encoding has three bytes. The first byte begins with "1110b," and the second and third bytes start with "10b".


Functions in Alphabetical Order

V

Function | Description
ValidateKeyRecord | Check for Record is present or Not Paremeters: KEY_WAITING_RECORD - *TerminalKeyIn
ValidatePciSerialNvram | Checks for the Presence of PCI Serial device with values present in the NVRAM Variable PciSerialPortsLocationVar. If found donot change NVRAM variable.If not found delete the NVRAM variable describing the device path and make current PciSerialPortsLocationVar.Bus[i],Device[i] and function[i] to zero.


Functions in Alphabetical Order

W

Function | Description
WaitForEsc | The function polls the serial port to see if a key is available. If a key is available, checks for the ESC sequnce until time out happens. If ESC sequence found then stops the timer or timeout happens also this event will be closed
WaitForKey | The function polls the serial port to see if a key is available. If a key is available and the WaitForKey event is signaled.
WriteToSerialPort | Uses the SerialIo protocol's Write function.


General Information