Use correct address when clearing COM port buffer
All checks were successful
Builds / ExectOS (i686) (push) Successful in 46s
Builds / ExectOS (amd64) (push) Successful in 48s

The code was reading from Port->Address to clear the RBR before the field was initialized.
This commit is contained in:
Aiken Harris 2025-07-20 14:53:04 +02:00 committed by CodingWorkshop Signing Team
parent e778a95a01
commit da3e039a05
Signed by: CodingWorkshop Signing Team
GPG Key ID: 6DC88369C82795D2

View File

@ -277,7 +277,7 @@ HlInitializeComPort(IN OUT PCPPORT Port,
HlIoPortOutByte(PtrToUshort(PortAddress + (ULONG)COMPORT_REG_MCR), COMPORT_MCR_NOM);
/* Read junk data out of the Receive Buffer Register (RBR) */
HlIoPortInByte(PtrToUshort(Port->Address + (ULONG)COMPORT_REG_RBR));
HlIoPortInByte(PtrToUshort(PortAddress + (ULONG)COMPORT_REG_RBR));
/* Store port details */
Port->Address = PortAddress;