From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (NAM11-DM6-obe.outbound.protection.outlook.com [40.107.223.49]) by mx.groups.io with SMTP id smtpd.web11.8801.1687311480481795216 for ; Tue, 20 Jun 2023 18:38:00 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=P4qrm5i6; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.223.49, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MN5TBGbm+QJBMjE38xjcFb2JEYwiWbjJOuEzi6MOCQs3v4oknKjDZ9DL5d9m/9TjBlXiskZd8CfJ/pIQu7jYWE/c7pVIGfTu7J1KUNnNGnOET5LpOZmSIALeqVDmmDeCrH7yk7vjToFGHzUr0XI9t8YuYs+Wn4+f+bifSW70Vo0LQ+ZlO/LINl11674WR4N5QYeJNgwNOF+PjCIdNkHWIaQnVaQxTppOO6Heccma9et1D0DJd3JRLFa1KUcx6D4mrKpcSuAAlzmusNS1Wj3xq08XrBUVfQJ58uTsQ9nbUVhlI7aYn+QNiZUlfHGt4AqrrpyiwckWKW4O7nAuBAS6sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0aVw6W0LPb1ioQylOqvRHLFD0odY0WNuRmn00RHOM/k=; b=X1/0990GcMg9/1OXnWEw5AjgIAv5nwJTaKHpLounh7rVXwHkzB5HmIfAx4sYZo+kmdiJocBBIbUrCnUfV7pziSsdQzNGY1WZXPM0T3caSJYS1S3D0bcyAwEDtoWwXAWttt3KKA+K4nRN19eigehhuuF59GWoWuJe4gzkm7X+GTVR8P5sl9r9EYvJnmAw/IoII0P4tdhoh0u2Ram2YLPsz/7IzGu8TI3k4aA0u/9bCWDe1cmu0FkJeebn29qz7fWRgEwADfZRgm/yC06EWuSJDgAiJc+Cd0ngY2HAJ8ILuGpZqagy7vJPXOXSQdQlbrVZVW/ju2pUli5mL8ArUsJTFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0aVw6W0LPb1ioQylOqvRHLFD0odY0WNuRmn00RHOM/k=; b=P4qrm5i6BjHtD+QG4kfTrR0JhsKOoQX/B2yZveO/Asa0pPKja/B/Xr5qHe/7VgCD8JF51qvSUYYfodbUnpLZlLXOxRXx056deKS9ZiQEdwN3ye3Ettnqkt+ytC2B2reW4cN3xMtTsSNHpp9L2FP1NNOxkjXJWjhnQV+52bU41B8= Received: from SA1P222CA0078.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:2c1::25) by SJ0PR12MB5423.namprd12.prod.outlook.com (2603:10b6:a03:301::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.37; Wed, 21 Jun 2023 01:37:58 +0000 Received: from SN1PEPF0002636E.namprd02.prod.outlook.com (2603:10b6:806:2c1:cafe::85) by SA1P222CA0078.outlook.office365.com (2603:10b6:806:2c1::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23 via Frontend Transport; Wed, 21 Jun 2023 01:37:57 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF0002636E.mail.protection.outlook.com (10.167.241.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6521.17 via Frontend Transport; Wed, 21 Jun 2023 01:37:57 +0000 Received: from TPE-L1-ABNCHANG.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 20 Jun 2023 20:37:56 -0500 From: "Chang, Abner" To: CC: Abdul Lateef Attar Subject: [edk2-platforms][PATCH 2/2] AmdPlatformPkg/SimulatorSerialPortLibPort80: Simulator serial port lib Date: Wed, 21 Jun 2023 09:37:44 +0800 Message-ID: <20230621013744.157-2-abner.chang@amd.com> X-Mailer: git-send-email 2.37.1.windows.1 In-Reply-To: <20230621013744.157-1-abner.chang@amd.com> References: <20230621013744.157-1-abner.chang@amd.com> MIME-Version: 1.0 Return-Path: Abner.Chang@amd.com X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002636E:EE_|SJ0PR12MB5423:EE_ X-MS-Office365-Filtering-Correlation-Id: 38676df9-93ad-4f1b-998c-08db71f82431 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1dbkDpWLOOsqdMAPdqRQ0LUXC8IV4cSjshuhmyuKSSSWMWWSEezKwWnP2e+dLIohWG/c0V9tbjr5lpMl/IDNTd2y52F01icWSlRyUoqtvndz+BJyCsR6Y7rmeDcfncn6GrZO3AUxFEQoIZ1GQamwhoFghcv0q89l0RoConWYwniCg1GjZZJyyPxXEpX1UBJrQFAZNeN6mPZYiFiefSapRLWAc+9I2T5CWu/LE53u+EHR8AOeFTzl/eI0FeMx1SZfCjGRMOWevUfxcCJW+AO4SUWfk8PpWHF6PiJAhndFdLwt86DYbcsabnc39jS4iar37nn8PC1t4qwrQITpQZw2pq/d8we2GszSU1snq7kVkQLr3TNej7GQQLzdFMhFj6s9e5s/pj6PKuGOcr7Gpdezk0bd8w6qBRxtBDNtWePBerymJvrMfM2Ff1o/YU9IPNVE1V/C2clj3oXgJP2hEo/VzHvFAjYIkbBKhoDa/KLrayWlSL8265dTikYe+qAlUENYvmbWhkwmkwqiYdj4bJ6LjXNcfi8INlbCuZhAm5O/VbGoUnzl7of50/a3+EzHYNO3nw5JOzoZLoOrBoGu5qaF8bvdeWVHupCohsilphxvtv3DCKHIyqpMZpezTr0wkd/fx194g9DDD7EnzKn2njZaDhB9lFSLZyFZoahzCkqWYrQn8QOf9VNPW9pyL8FPWB/KZY3btJznArdXsT1qjSLOPtdNpX8e2V+9hhvN0vnIaV7/FZZPYy3hPAEdS7dH/tndVcFtUTp4SZ5ansjD+Bg6iAZQLJCDmW18PQpsYPGB/rs= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(376002)(396003)(39860400002)(136003)(346002)(451199021)(40470700004)(36840700001)(46966006)(30864003)(82310400005)(356005)(1076003)(26005)(16526019)(5660300002)(81166007)(8676002)(8936002)(82740400003)(186003)(316002)(478600001)(4326008)(36756003)(19627235002)(2876002)(70586007)(70206006)(6916009)(2906002)(41300700001)(40480700001)(47076005)(2616005)(36860700001)(7696005)(86362001)(40460700003)(83380400001)(336012)(6666004)(426003)(213903007)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2023 01:37:57.5490 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 38676df9-93ad-4f1b-998c-08db71f82431 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002636E.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB5423 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain From: Abner Chang AMD simulator port 80 serial port library. Signed-off-by: Abner Chang Cc: Abdul Lateef Attar --- .../AMD/AmdPlatformPkg/AmdPlatformPkg.dsc | 71 ++++++ .../SimulatorSerialPortLibPort80.inf | 31 +++ .../SimulatorSerialPortLibPort80.c | 207 ++++++++++++++++++ 3 files changed, 309 insertions(+) create mode 100644 Platform/AMD/AmdPlatformPkg/Library/SimulatorSerialPort= LibPort80/SimulatorSerialPortLibPort80.inf create mode 100644 Platform/AMD/AmdPlatformPkg/Library/SimulatorSerialPort= LibPort80/SimulatorSerialPortLibPort80.c diff --git a/Platform/AMD/AmdPlatformPkg/AmdPlatformPkg.dsc b/Platform/AMD/= AmdPlatformPkg/AmdPlatformPkg.dsc index d3368c87ee..aa097bba09 100644 --- a/Platform/AMD/AmdPlatformPkg/AmdPlatformPkg.dsc +++ b/Platform/AMD/AmdPlatformPkg/AmdPlatformPkg.dsc @@ -20,3 +20,74 @@ =20 [Packages] AmdPlatformPkg/AmdPlatformPkg.dec + +!include MdePkg/MdeLibs.dsc.inc + +[LibraryClasses.Common] + BaseLib|MdePkg/Library/BaseLib/BaseLib.inf + IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf + UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry= Point.inf + UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBoo= tServicesTableLib.inf + UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/U= efiRuntimeServicesTableLib.inf + UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf + DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD= ebugPrintErrorLevelLib.inf + + # + # Debug libraries + # + DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD= ebugPrintErrorLevelLib.inf +!if $(TARGET) =3D=3D RELEASE + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf +!else + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.in= f +!endif + + BaseLib|MdePkg/Library/BaseLib/BaseLib.inf + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf + SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchroniza= tionLib.inf + HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf + DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf + BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf + PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf + SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull= .inf + UefiLib|MdePkg/Library/UefiLib/UefiLib.inf + HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf + UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServic= esLib.inf + DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf + DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableL= ib.inf + UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry= Point.inf + UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBoo= tServicesTableLib.inf + UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/U= efiRuntimeServicesTableLib.inf + UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf + + # + # CryptLib + # + IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf + BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf + RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf + + # + # Secureboot library + # + SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBo= otVariableLib.inf + SecureBootVariableProvisionLib|SecurityPkg/Library/SecureBootVariablePro= visionLib/SecureBootVariableProvisionLib.inf + PlatformPKProtectionLib|SecurityPkg/Library/PlatformPKProtectionLibVarPo= licy/PlatformPKProtectionLibVarPolicy.inf + + # + # Platform - Replace the modules in this section in platform DSC file. + # + TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplat= e.inf + + # Simulator serial port 80 + SerialPortLib|AmdPlatformPkg/Library/SimulatorSerialPortLibPort80/Simula= torSerialPortLibPort80.inf + +[LibraryClasses.common.DXE_CORE, LibraryClasses.common.DXE_SMM_DRIVER, Lib= raryClasses.common.SMM_CORE, LibraryClasses.common.DXE_DRIVER, LibraryClass= es.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.UEFI_DRIVER, LibraryCla= sses.common.UEFI_APPLICATION] + MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf + ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRepor= tStatusCodeLib.inf + +[Components] + AmdPlatformPkg/Library/SimulatorSerialPortLibPort80/SimulatorSerialPortL= ibPort80.inf + diff --git a/Platform/AMD/AmdPlatformPkg/Library/SimulatorSerialPortLibPort= 80/SimulatorSerialPortLibPort80.inf b/Platform/AMD/AmdPlatformPkg/Library/S= imulatorSerialPortLibPort80/SimulatorSerialPortLibPort80.inf new file mode 100644 index 0000000000..42f46f4c2c --- /dev/null +++ b/Platform/AMD/AmdPlatformPkg/Library/SimulatorSerialPortLibPort80/Simu= latorSerialPortLibPort80.inf @@ -0,0 +1,31 @@ +## @file +# Simlator port80 instance of serial port library functions. +# +# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x00010005 + BASE_NAME =3D SimulatorSerialPortLibPort80 + FILE_GUID =3D 35217E20-489E-64F9-4E42-1EAFABE0A86F + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D SerialPortLib + +# +# VALID_ARCHITECTURES =3D IA32 X64 +# + +[Sources] + SimulatorSerialPortLibPort80.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + +[LibraryClasses] + BaseLib + IoLib diff --git a/Platform/AMD/AmdPlatformPkg/Library/SimulatorSerialPortLibPort= 80/SimulatorSerialPortLibPort80.c b/Platform/AMD/AmdPlatformPkg/Library/Sim= ulatorSerialPortLibPort80/SimulatorSerialPortLibPort80.c new file mode 100644 index 0000000000..3a43760627 --- /dev/null +++ b/Platform/AMD/AmdPlatformPkg/Library/SimulatorSerialPortLibPort80/Simu= latorSerialPortLibPort80.c @@ -0,0 +1,207 @@ +/** @file + AMD simulator port80 serial port library functions. + + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include +#include +#include +#include + +/** + Initialize the serial device hardware. + + If no initialization is required, then return RETURN_SUCCESS. + If the serial device was successfully initialized, then return RETURN_SU= CCESS. + If the serial device could not be initialized, then return RETURN_DEVICE= _ERROR. + + @retval RETURN_SUCCESS The serial device was initialized. + @retval RETURN_DEVICE_ERROR The serial device could not be initialized= . + +**/ +RETURN_STATUS +EFIAPI +SerialPortInitialize ( + VOID + ) +{ + // Chipset defaults properly decoding port 80 to eSPI + return EFI_SUCCESS; +} + +/** + Write data from buffer to serial device. + + Writes NumberOfBytes data bytes from Buffer to the serial device. + The number of bytes actually written to the serial device is returned. + If the return value is less than NumberOfBytes, then the write operation= failed. + If Buffer is NULL, then ASSERT(). + If NumberOfBytes is zero, then return 0. + + @param[in] Buffer The pointer to the data buffer to be writte= n. + @param[in] NumberOfBytes The number of bytes to written to the seria= l device. + + @retval 0 NumberOfBytes is 0. + @retval >0 The number of bytes written to the serial devic= e. + If this value is less than NumberOfBytes, then = the read operation failed. + +**/ +UINTN +EFIAPI +SerialPortWrite ( + IN UINT8 *Buffer, + IN UINTN NumberOfBytes + ) +{ + UINTN ByteCount; + + if ((Buffer =3D=3D NULL) || (NumberOfBytes =3D=3D 0)) { + return 0; + } + + IoWrite32 (0x80, SIGNATURE_32 ('R', 'T', 'S', '_')); + + ByteCount =3D NumberOfBytes; + for ( ; ByteCount !=3D 0; ByteCount--, Buffer++) { + IoWrite8 (0x80, *Buffer); + } + + IoWrite32 (0x80, SIGNATURE_32 ('D', 'N', 'E', '_')); + + return NumberOfBytes; +} + +/** + Read data from serial device and save the datas in buffer. + + Reads NumberOfBytes data bytes from a serial device into the buffer + specified by Buffer. The number of bytes actually read is returned. + If the return value is less than NumberOfBytes, then the rest operation = failed. + If Buffer is NULL, then ASSERT(). + If NumberOfBytes is zero, then return 0. + + @param[out] Buffer The pointer to the data buffer to store th= e data read from the serial device. + @param[in] NumberOfBytes The number of bytes which will be read. + + @retval 0 Read data failed; No data is to be read. + @retval >0 The actual number of bytes read from serial dev= ice. + +**/ +UINTN +EFIAPI +SerialPortRead ( + OUT UINT8 *Buffer, + IN UINTN NumberOfBytes + ) +{ + return 0; +} + +/** + Polls a serial device to see if there is any data waiting to be read. + + Polls a serial device to see if there is any data waiting to be read. + If there is data waiting to be read from the serial device, then TRUE is= returned. + If there is no data waiting to be read from the serial device, then FALS= E is returned. + + @retval TRUE Data is waiting to be read from the serial devi= ce. + @retval FALSE There is no data waiting to be read from the se= rial device. + +**/ +BOOLEAN +EFIAPI +SerialPortPoll ( + VOID + ) +{ + return FALSE; +} + +/** + Sets the control bits on a serial device. + + @param[in] Control Sets the bits of Control that are sett= able. + + @retval RETURN_SUCCESS The new control bits were set on the seria= l device. + @retval RETURN_UNSUPPORTED The serial device does not support this op= eration. + @retval RETURN_DEVICE_ERROR The serial device is not functioning corre= ctly. + +**/ +RETURN_STATUS +EFIAPI +SerialPortSetControl ( + IN UINT32 Control + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + Retrieve the status of the control bits on a serial device. + + @param[out] Control A pointer to return the current contr= ol signals from the serial device. + + @retval RETURN_SUCCESS The control bits were read from the serial= device. + @retval RETURN_UNSUPPORTED The serial device does not support this op= eration. + @retval RETURN_DEVICE_ERROR The serial device is not functioning corre= ctly. + +**/ +RETURN_STATUS +EFIAPI +SerialPortGetControl ( + OUT UINT32 *Control + ) +{ + return RETURN_UNSUPPORTED; +} + +/** + Sets the baud rate, receive FIFO depth, transmit/receice time out, parit= y, + data bits, and stop bits on a serial device. + + @param[in,out] BaudRate The requested baud rate. A BaudRate val= ue of 0 will use the + device's default interface speed. + On output, the value actually set. + @param[in,out] ReveiveFifoDepth The requested depth of the FIFO on the = receive side of the + serial interface. A ReceiveFifoDepth va= lue of 0 will use + the device's default FIFO depth. + On output, the value actually set. + @param[in,out] Timeout The requested time out for a single cha= racter in microseconds. + This timeout applies to both the transm= it and receive side of the + interface. A Timeout value of 0 will us= e the device's default time + out value. + On output, the value actually set. + @param[in,out] Parity The type of parity to use on this seria= l device. A Parity value of + DefaultParity will use the device's def= ault parity value. + On output, the value actually set. + @param[in,out] DataBits The number of data bits to use on the s= erial device. A DataBits + vaule of 0 will use the device's defaul= t data bit setting. + On output, the value actually set. + @param[in,out] StopBits The number of stop bits to use on this = serial device. A StopBits + value of DefaultStopBits will use the d= evice's default number of + stop bits. + On output, the value actually set. + + @retval RETURN_SUCCESS The new attributes were set on the ser= ial device. + @retval RETURN_UNSUPPORTED The serial device does not support thi= s operation. + @retval RETURN_INVALID_PARAMETER One or more of the attributes has an u= nsupported value. + @retval RETURN_DEVICE_ERROR The serial device is not functioning c= orrectly. + +**/ +RETURN_STATUS +EFIAPI +SerialPortSetAttributes ( + IN OUT UINT64 *BaudRate, + IN OUT UINT32 *ReceiveFifoDepth, + IN OUT UINT32 *Timeout, + IN OUT EFI_PARITY_TYPE *Parity, + IN OUT UINT8 *DataBits, + IN OUT EFI_STOP_BITS_TYPE *StopBits + ) +{ + return RETURN_UNSUPPORTED; +} --=20 2.37.1.windows.1