Skip to content

Commit

Permalink
Revert #168. Move changes into Terminal driver's Terminal ConIn. (#378)
Browse files Browse the repository at this point in the history
# Preface

Please ensure you have read the [contribution
docs](https://github.com/microsoft/mu/blob/master/CONTRIBUTING.md) prior
to submitting the pull request. In particular,
[pull request
guidelines](https://github.com/microsoft/mu/blob/master/CONTRIBUTING.md#pull-request-best-practices).

## Description
Revert #168 implementation. Move implementation into Terminal driver.

Moving this because serial ports don't need to be able to receive data
unless the port is being used for simple text in.

For each item, place an "x" in between `[` and `]` if true. Example:
`[x]`.
_(you can also check items in the GitHub UI)_

- [x] Impacts functionality?
- **Functionality** - Does the change ultimately impact how firmware
functions?
- Examples: Add a new library, publish a new PPI, update an algorithm,
...
- [ ] Impacts security?
- **Security** - Does the change have a direct security impact on an
application,
    flow, or firmware?
  - Examples: Crypto algorithm change, buffer overflow fix, parameter
    validation improvement, ...
- [ ] Breaking change?
- **Breaking change** - Will anyone consuming this change experience a
break
    in build or boot behavior?
- Examples: Add a new library class, move a module to a different repo,
call
    a function in a new library class in a pre-existing module, ...
- [ ] Includes tests?
  - **Tests** - Does the change include any explicit test code?
  - Examples: Unit tests, integration tests, robot tests, ...
- [ ] Includes documentation?
- **Documentation** - Does the change contain explicit documentation
additions
    outside direct code modifications (and comments)?
- Examples: Update readme file, add feature readme file, link to
documentation
    on an a separate Web page, ...

## How This Was Tested
Verified that remote keys over serial work correcty

## Integration Instructions

n/a
  • Loading branch information
apop5 authored Apr 26, 2023
1 parent 3d7ad17 commit 8211df9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
10 changes: 0 additions & 10 deletions MdeModulePkg/Bus/Pci/PciSioSerialDxe/SerialIo.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,16 +632,6 @@ SerialReset (
(EFI_STOP_BITS_TYPE)This->Mode->StopBits
);

// MU_CHANGE [BEGIN]
//
// Terminal Reset is complete, enable modem to receive data
//
Mcr.Data = READ_MCR (SerialDevice);
Mcr.Bits.DtrC = 1;
Mcr.Bits.Rts = 1;
WRITE_MCR (SerialDevice, Mcr.Data);
// MU_CHANGE [END]

if (EFI_ERROR (Status)) {
gBS->RestoreTPL (Tpl);
return EFI_DEVICE_ERROR;
Expand Down
8 changes: 8 additions & 0 deletions MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ TerminalConInReset (
);
}

// MU_CHANGE [BEGIN] - Ensure serial device is ready to receive data
// by setting data terminal ready and request to send
if (!EFI_ERROR (Status)) {
Status = TerminalDevice->SerialIo->SetControl (TerminalDevice->SerialIo, EFI_SERIAL_DATA_TERMINAL_READY|EFI_SERIAL_REQUEST_TO_SEND);
}

// MU_CHANGE [END]

return Status;
}

Expand Down

0 comments on commit 8211df9

Please sign in to comment.