From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MC1FTjmM; spf=pass (domain: redhat.com, ip: 207.211.31.81, mailfrom: philmd@redhat.com) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by groups.io with SMTP; Tue, 01 Oct 2019 01:49:45 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1569919784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VVV5RgbcfPLl/57R2mUcoG3vxYqmEEUArqSIOarvZd4=; b=MC1FTjmMr3qxfE12qGdEPPvrproK5bhZJgKG5UDEmsRmhfPkP2R9bjyjQfj54Lhqr3y3ik b3sf+y7Q94FpHxlgJ9EnJS6rrwol8/F705IbwSRmiit2fPE1PEcMYpByrWdx2+It/2mBpz jzOaVIsgTmxSQzvzMefn+yrfkxNIylY= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-113-ZjqY49j4OrmDGh2VkSIEjw-1; Tue, 01 Oct 2019 04:49:41 -0400 Received: by mail-wr1-f69.google.com with SMTP id n18so5681630wro.11 for ; Tue, 01 Oct 2019 01:49:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=dDgqFS8L224gVc1WW1go9oXwYaY4S7onBpVaL9Pm150=; b=d39Z3CGK4OBvL/zeJwpruyLjw1p1XsvzdpM3zIrcEyZg3ipjj/HzBQy17kFOwB5QBv /Tkp1FEvs6e/nPkVC5la7M2rERM/Ky+ilf4T9i5lsII5eEG6cenecJ8R7zS6xf0X9yd6 bZ1+4desVVeSKXUW1pDbapRxJjhgejYKMNOpysauZheRCVmBfHmnM0BMegTZKbOoLZ7x FH8IOkjwuN6E/y0izhvdsAdngPmvhsdj+tvdn2anz/5L9dwmbrJ41dfFO6AEKWsZqVEQ K/KxGNm3GM8VhE1fL6o0MabDyngFSjGkz04RYMnh5vTPx4GKE5m8EYSZscxMb/w5Ikgu 2NVA== X-Gm-Message-State: APjAAAU0P/lKL1BxQqDyENZUnJQBbOAZS9dRjyAIqgcAg3MfAgDrBNQe iAvgvtbL/rEQMIb84443MKfoBmRKh2pfU5nO+guVJoXAcMVJIRQxOn8b/oW68k+m6vPZ7xCTsqh E39qW+H4jod1HyQ== X-Received: by 2002:a5d:4f0d:: with SMTP id c13mr17145493wru.317.1569919779923; Tue, 01 Oct 2019 01:49:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOUGcssqM/CmIxzSIB3yOYYxm4WLcZhZTXm4tRZfwupXtrwczhuWDICfB11AK4jh7qnX9cqQ== X-Received: by 2002:a5d:4f0d:: with SMTP id c13mr17145472wru.317.1569919779596; Tue, 01 Oct 2019 01:49:39 -0700 (PDT) Return-Path: Received: from [192.168.1.35] (240.red-88-21-68.staticip.rima-tde.net. [88.21.68.240]) by smtp.gmail.com with ESMTPSA id d9sm22795230wrc.44.2019.10.01.01.49.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Oct 2019 01:49:39 -0700 (PDT) Subject: Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 09/29] MdePkg/BaseIoLibIntrinsic: RISC-V I/O intrinsic functions. To: devel@edk2.groups.io, leif.lindholm@linaro.org, abner.chang@hpe.com References: <1569198715-31552-1-git-send-email-abner.chang@hpe.com> <1569198715-31552-11-git-send-email-abner.chang@hpe.com> <20190926233928.GL25504@bivouac.eciton.net> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Message-ID: <90c04adf-79b1-2d89-1683-c916444126c7@redhat.com> Date: Tue, 1 Oct 2019 10:49:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: <20190926233928.GL25504@bivouac.eciton.net> X-MC-Unique: ZjqY49j4OrmDGh2VkSIEjw-1 X-Mimecast-Spam-Score: 0 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Leif, On 9/27/19 1:39 AM, Leif Lindholm wrote: > On Mon, Sep 23, 2019 at 08:31:35AM +0800, Abner Chang wrote: >> RISC-V MMIO library instance. RISC-V only supports memory map I/O. >=20 > We need fewer, not more, C implementations of MMIO accessors. > While this set doesn't need to wait for upstream to get sorted, please > just use IoLibArm.c which should be completely equivalent to what you > have implemented here. This shows this file name is misleading. However I can't come with a=20 clever one :/ >> Signed-off-by: Abner Chang >> --- >> .../BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf | 8 +- >> MdePkg/Library/BaseIoLibIntrinsic/IoLibRiscV.c | 601 ++++++++++++= +++++++++ >> 2 files changed, 607 insertions(+), 2 deletions(-) >> create mode 100644 MdePkg/Library/BaseIoLibIntrinsic/IoLibRiscV.c >> >> diff --git a/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf b= /MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf >> index 457cce9..fbb568e 100644 >> --- a/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf >> +++ b/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf >> @@ -2,13 +2,14 @@ >> # Instance of I/O Library using compiler intrinsics. >> # >> # I/O Library that uses compiler intrinsics to perform IN and OUT in= structions >> -# for IA-32 and x64. On IPF, I/O port requests are translated into M= MIO requests. >> +# for IA-32, x64 and RISC-V. On IPF, I/O port requests are translate= d into MMIO requests. >> # MMIO requests are forwarded directly to memory. For EBC, I/O port= requests >> # ASSERT(). >> # >> # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.=
>> # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved= .
>> # Copyright (c) 2017, AMD Incorporated. All rights reserved.
>> +# Portinos Copyright (c) 2016, Hewlett Packard Enterprise Development= LP. All rights reserved.
>> # >> # SPDX-License-Identifier: BSD-2-Clause-Patent >> # >> @@ -25,7 +26,7 @@ >> =20 >> =20 >> # >> -# VALID_ARCHITECTURES =3D IA32 X64 EBC ARM AARCH64 >> +# VALID_ARCHITECTURES =3D IA32 X64 EBC ARM AARCH64 RISCV64 >> # >> =20 >> [Sources] >> @@ -55,6 +56,9 @@ >> [Sources.AARCH64] >> IoLibArm.c >> =20 >> +[Sources.RISCV64] >> + IoLibRiscV.c >> + >> [Packages] >> MdePkg/MdePkg.dec >> =20 >> diff --git a/MdePkg/Library/BaseIoLibIntrinsic/IoLibRiscV.c b/MdePkg/Li= brary/BaseIoLibIntrinsic/IoLibRiscV.c >> new file mode 100644 >> index 0000000..789928b >> --- /dev/null >> +++ b/MdePkg/Library/BaseIoLibIntrinsic/IoLibRiscV.c >> @@ -0,0 +1,601 @@ >> +/** @file >> + Common I/O Library routines for RISC-V >> + >> + Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development LP= . All rights reserved.
>> + >> + This program and the accompanying materials >> + are licensed and made available under the terms and conditions of th= e BSD License >> + which accompanies this distribution. The full text of the license ma= y be found at >> + http://opensource.org/licenses/bsd-license.php >> + >> + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS= , >> + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR= IMPLIED. >> +**/ >> + >> +#include "BaseIoLibIntrinsicInternal.h" >> + >> +/** >> + Reads an 8-bit MMIO register. >> + >> + Reads the 8-bit MMIO register specified by Address. The 8-bit read v= alue is >> + returned. This function must guarantee that all MMIO read and write >> + operations are serialized. >> + >> + If 8-bit MMIO register operations are not supported, then ASSERT(). >> + >> + @param Address The MMIO register to read. >> + >> + @return The value read. >> + >> +**/ >> +UINT8 >> +EFIAPI >> +MmioRead8 ( >> + IN UINTN Address >> + ) >> +{ >> + return *(volatile UINT8*)Address; >> +} >> + >> +/** >> + Writes an 8-bit MMIO register. >> + >> + Writes the 8-bit MMIO register specified by Address with the value s= pecified >> + by Value and returns Value. This function must guarantee that all MM= IO read >> + and write operations are serialized. >> + >> + If 8-bit MMIO register operations are not supported, then ASSERT(). >> + >> + @param Address The MMIO register to write. >> + @param Value The value to write to the MMIO register. >> + >> + @return Value. >> + >> +**/ >> +UINT8 >> +EFIAPI >> +MmioWrite8 ( >> + IN UINTN Address, >> + IN UINT8 Value >> + ) >> +{ >> + *(volatile UINT8 *)Address =3D Value; >> + return Value; >> +} >> + >> +/** >> + Reads a 16-bit MMIO register. >> + >> + Reads the 16-bit MMIO register specified by Address. The 16-bit read= value is >> + returned. This function must guarantee that all MMIO read and write >> + operations are serialized. >> + >> + If 16-bit MMIO register operations are not supported, then ASSERT(). >> + If Address is not aligned on a 16-bit boundary, then ASSERT(). >> + >> + @param Address The MMIO register to read. >> + >> + @return The value read. >> + >> +**/ >> +UINT16 >> +EFIAPI >> +MmioRead16 ( >> + IN UINTN Address >> + ) >> +{ >> + return *(volatile UINT16 *)Address; >> +} >> + >> +/** >> + Writes a 16-bit MMIO register. >> + >> + Writes the 16-bit MMIO register specified by Address with the value = specified >> + by Value and returns Value. This function must guarantee that all MM= IO read >> + and write operations are serialized. >> + >> + If 16-bit MMIO register operations are not supported, then ASSERT(). >> + If Address is not aligned on a 16-bit boundary, then ASSERT(). >> + >> + @param Address The MMIO register to write. >> + @param Value The value to write to the MMIO register. >> + >> + @return Value. >> + >> +**/ >> +UINT16 >> +EFIAPI >> +MmioWrite16 ( >> + IN UINTN Address, >> + IN UINT16 Value >> + ) >> +{ >> + *(volatile UINT16 *)Address =3D Value; >> + return Value; >> +} >> + >> +/** >> + Reads a 32-bit MMIO register. >> + >> + Reads the 32-bit MMIO register specified by Address. The 32-bit read= value is >> + returned. This function must guarantee that all MMIO read and write >> + operations are serialized. >> + >> + If 32-bit MMIO register operations are not supported, then ASSERT(). >> + If Address is not aligned on a 32-bit boundary, then ASSERT(). >> + >> + @param Address The MMIO register to read. >> + >> + @return The value read. >> + >> +**/ >> +UINT32 >> +EFIAPI >> +MmioRead32 ( >> + IN UINTN Address >> + ) >> +{ >> + return *(volatile UINT32 *)Address; >> +} >> + >> +/** >> + Writes a 32-bit MMIO register. >> + >> + Writes the 32-bit MMIO register specified by Address with the value = specified >> + by Value and returns Value. This function must guarantee that all MM= IO read >> + and write operations are serialized. >> + >> + If 32-bit MMIO register operations are not supported, then ASSERT(). >> + If Address is not aligned on a 32-bit boundary, then ASSERT(). >> + >> + @param Address The MMIO register to write. >> + @param Value The valu return *(volatile UINT8*)Address; >> + to write to the MMIO register. >> + >> + @return Value. >> + >> +**/ >> +UINT32 >> +EFIAPI >> +MmioWrite32 ( >> + IN UINTN Address, >> + IN UINT32 Value >> + ) >> +{ >> + *(volatile UINT32 *)Address =3D Value; >> + return Value; >> +} >> + >> +/** >> + Reads a 64-bit MMIO register. >> + >> + Reads the 64-bit MMIO register specified by Address. The 64-bit read= value is >> + returned. This function must guarantee that all MMIO read and write >> + operations are serialized. >> + >> + If 64-bit MMIO register operations are not supported, then ASSERT(). >> + If Address is not aligned on a 64-bit boundary, then ASSERT(). >> + >> + @param Address The MMIO register to read. >> + >> + @return The value read. >> + >> +**/ >> +UINT64 >> +EFIAPI >> +MmioRead64 ( >> + IN UINTN Address >> + ) >> +{ >> + return *(volatile UINT64 *)Address; >> +} >> + >> +/** >> + Writes a 64-bit MMIO register. >> + >> + Writes the 64-bit MMIO register specified by Address with the value = specified >> + by Value and returns Value. This function must guarantee that all MM= IO read >> + and write operations are serialized. >> + >> + If 64-bit MMIO register operations are not supported, then ASSERT(). >> + If Address is not aligned on a 64-bit boundary, then ASSERT(). >> + >> + @param Address The MMIO register to write. >> + @param Value The value to write to the MMIO register. >> + >> +**/ >> +UINT64 >> +EFIAPI >> +MmioWrite64 ( >> + IN UINTN Address, >> + IN UINT64 Value >> + ) >> +{ >> + *(volatile UINT64 *)Address =3D Value; >> + return Value; >> +} >> + >> +/** >> + Reads an 8-bit I/O port. >> + >> + Reads the 8-bit I/O port specified by Port. The 8-bit read value is = returned. >> + This function must guarantee that all I/O read and write operations = are >> + serialized. >> + >> + If 8-bit I/O port operations are not supported, then ASSERT(). >> + >> + @param Port The I/O port to read. >> + >> + @return The value read. >> + >> +**/ >> +UINT8 >> +EFIAPI >> +IoRead8 ( >> + IN UINTN Port >> + ) >> +{ >> + DEBUG((DEBUG_ERROR, "%a:RISC-V unsupportted function.\n", __FUNCTION= __)); >> + ASSERT (FALSE); >> + return 0; >> +} >> + >> +/** >> + Writes an 8-bit I/O port. >> + >> + Writes the 8-bit I/O port specified by Port with the value specified= by Value >> + and returns Value. This function must guarantee that all I/O read an= d write >> + operations are serialized. >> + >> + If 8-bit I/O port operations are not supported, then ASSERT(). >> + >> + @param Port The I/O port to write. >> + @param Value The value to write to the I/O port. >> + >> + @return The value written the I/O port. >> + >> +**/ >> + >> +UINT8 >> +EFIAPI >> +IoWrite8 ( >> + IN UINTN Port, >> + IN UINT8 Value >> + ) >> +{ >> + DEBUG((DEBUG_ERROR, "%a:RISC-V unsupportted function.\n", __FUNCTION= __)); >> + ASSERT (FALSE); >> + return 0; >> +} >> + >> +/** >> + Reads a 16-bit I/O port. >> + >> + Reads the 16-bit I/O port specified by Port. The 16-bit read value i= s returned. >> + This function must guarantee that all I/O read and write operations = are >> + serialized. >> + >> + If 16-bit I/O port operations are not supported, then ASSERT(). >> + >> + @param Port The I/O port to read. >> + >> + @return The value read. >> + >> +**/ >> +UINT16 >> +EFIAPI >> +IoRead16 ( >> + IN UINTN Port >> + ) >> +{ >> + DEBUG((DEBUG_ERROR, "%a:RISC-V unsupportted function.\n", __FUNCTION= __)); >> + ASSERT (FALSE); >> + return 0; >> +} >> + >> +/** >> + Writes a 16-bit I/O port. >> + >> + Writes the 16-bit I/O port specified by Port with the value specifie= d by Value >> + and returns Value. This function must guarantee that all I/O read an= d write >> + operations are serialized. >> + >> + If 16-bit I/O port operations are not supported, then ASSERT(). >> + >> + @param Port The I/O port to write. >> + @param Value The value to write to the I/O port. >> + >> + @return The value written the I/O port. >> + >> +**/ >> +UINT16 >> +EFIAPI >> +IoWrite16 ( >> + IN UINTN Port, >> + IN UINT16 Value >> + ) >> +{ >> + DEBUG((DEBUG_ERROR, "%a:RISC-V unsupportted function.\n", __FUNCTION= __)); >> + ASSERT (FALSE); >> + return 0; >> +} >> + >> +/** >> + Reads a 32-bit I/O port. >> + >> + Reads the 32-bit I/O port specified by Port. The 32-bit read value i= s returned. >> + This function must guarantee that all I/O read and write operations = are >> + serialized. >> + >> + If 32-bit I/O port operations are not supported, then ASSERT(). >> + >> + @param Port The I/O port to read. >> + >> + @return The value read. >> + >> +**/ >> +UINT32 >> +EFIAPI >> +IoRead32 ( >> + IN UINTN Port >> + ) >> +{ >> + DEBUG((DEBUG_ERROR, "%a:RISC-V unsupportted function.\n", __FUNCTION= __)); >> + ASSERT (FALSE); >> + return 0; >> +} >> + >> +/** >> + Writes a 32-bit I/O port. >> + >> + Writes the 32-bit I/O port specified by Port with the value specifie= d by Value >> + and returns Value. This function must guarantee that all I/O read an= d write >> + operations are serialized. >> + >> + If 32-bit I/O port operations are not supported, then ASSERT(). >> + >> + @param Port The I/O port to write. >> + @param Value The value to write to the I/O port. >> + >> + @return The value written the I/O port. >> + >> +**/ >> +UINT32 >> +EFIAPI >> +IoWrite32 ( >> + IN UINTN Port, >> + IN UINT32 Value >> + ) >> +{ >> + DEBUG((DEBUG_ERROR, "%a:RISC-V unsupportted function.\n", __FUNCTION= __)); >> + ASSERT (FALSE); >> + return 0; >> +} >> + >> +/** >> + Reads a 64-bit I/O port. >> + >> + Reads the 64-bit I/O port specified by Port. The 64-bit read value i= s returned. >> + This function must guarantee that all I/O read and write operations = are >> + serialized. >> + >> + If 64-bit I/O port operations are not supported, then ASSERT(). >> + If Port is not aligned on a 64-bit boundary, then ASSERT(). >> + >> + @param Port The I/O port to read. >> + >> + @return The value read. >> + >> +**/ >> +UINT64 >> +EFIAPI >> +IoRead64 ( >> + IN UINTN Port >> + ) >> +{ >> + DEBUG((DEBUG_ERROR, "%a:RISC-V unsupportted function.\n", __FUNCTION= __)); >> + ASSERT (FALSE); >> + return 0; >> +} >> + >> +/** >> + Writes a 64-bit I/O port. >> + >> + Writes the 64-bit I/O port specified by Port with the value specifie= d by Value >> + and returns Value. This function must guarantee that all I/O read an= d write >> + operations are serialized. >> + >> + If 64-bit I/O port operations are not supported, then ASSERT(). >> + If Port is not aligned on a 64-bit boundary, then ASSERT(). >> + >> + @param Port The I/O port to write. >> + @param Value The value to write to the I/O port. >> + >> + @return The value written to the I/O port. >> + >> +**/ >> +UINT64 >> +EFIAPI >> +IoWrite64 ( >> + IN UINTN Port, >> + IN UINT64 Value >> + ) >> +{ >> + DEBUG((DEBUG_ERROR, "%a:RISC-V unsupportted function.\n", __FUNCTION= __)); >> + ASSERT (FALSE); >> + return 0; >> +} >> + >> +/** >> + Reads an 8-bit I/O port fifo into a block of memory. >> + >> + Reads the 8-bit I/O fifo port specified by Port. >> + The port is read Count times, and the read data is >> + stored in the provided Buffer. >> + >> + This function must guarantee that all I/O read and write operations = are >> + serialized. >> + >> + If 8-bit I/O port operations are not supported, then ASSERT(). >> + >> + @param Port The I/O port to read. >> + @param Count The number of times to read I/O port. >> + @param Buffer The buffer to store the read data into. >> + >> +**/ >> +VOID >> +EFIAPI >> +IoReadFifo8 ( >> + IN UINTN Port, >> + IN UINTN Count, >> + OUT VOID *Buffer >> + ) >> +{ >> + DEBUG((DEBUG_ERROR, "%a:RISC-V unsupportted function.\n", __FUNCTION= __)); >> + ASSERT (FALSE); >> +} >> + >> +/** >> + Writes a block of memory into an 8-bit I/O port fifo. >> + >> + Writes the 8-bit I/O fifo port specified by Port. >> + The port is written Count times, and the write data is >> + retrieved from the provided Buffer. >> + >> + This function must guarantee that all I/O write and write operations= are >> + serialized. >> + >> + If 8-bit I/O port operations are not supported, then ASSERT(). >> + >> + @param Port The I/O port to write. >> + @param Count The number of times to write I/O port. >> + @param Buffer The buffer to retrieve the write data from. >> + >> +**/ >> +VOID >> +EFIAPI >> +IoWriteFifo8 ( >> + IN UINTN Port, >> + IN UINTN Count, >> + IN VOID *Buffer >> + ) >> +{ >> + DEBUG((DEBUG_ERROR, "%a:RISC-V unsupportted function.\n", __FUNCTION= __)); >> + ASSERT (FALSE); >> +} >> + >> +/** >> + Reads a 16-bit I/O port fifo into a block of memory. >> + >> + Reads the 16-bit I/O fifo port specified by Port. >> + The port is read Count times, and the read data is >> + stored in the provided Buffer. >> + >> + This function must guarantee that all I/O read and write operations = are >> + serialized. >> + >> + If 16-bit I/O port operations are not supported, then ASSERT(). >> + >> + @param Port The I/O port to read. >> + @param Count The number of times to read I/O port. >> + @param Buffer The buffer to store the read data into. >> + >> +**/ >> +VOID >> +EFIAPI >> +IoReadFifo16 ( >> + IN UINTN Port, >> + IN UINTN Count, >> + OUT VOID *Buffer >> + ) >> +{ >> + DEBUG((DEBUG_ERROR, "%a:RISC-V unsupportted function.\n", __FUNCTION= __)); >> + ASSERT (FALSE); >> +} >> + >> +/** >> + Writes a block of memory into a 16-bit I/O port fifo. >> + >> + Writes the 16-bit I/O fifo port specified by Port. >> + The port is written Count times, and the write data is >> + retrieved from the provided Buffer. >> + >> + This function must guarantee that all I/O write and write operations= are >> + serialized. >> + >> + If 16-bit I/O port operations are not supported, then ASSERT(). >> + >> + @param Port The I/O port to write. >> + @param Count The number of times to write I/O port. >> + @param Buffer The buffer to retrieve the write data from. >> + >> +**/ >> +VOID >> +EFIAPI >> +IoWriteFifo16 ( >> + IN UINTN Port, >> + IN UINTN Count, >> + IN VOID *Buffer >> + ) >> +{ >> + DEBUG((DEBUG_ERROR, "%a:RISC-V unsupportted function.\n", __FUNCTION= __)); >> + ASSERT (FALSE); >> +} >> + >> +/** >> + Reads a 32-bit I/O port fifo into a block of memory. >> + >> + Reads the 32-bit I/O fifo port specified by Port. >> + The port is read Count times, and the read data is >> + stored in the provided Buffer. >> + >> + This function must guarantee that all I/O read and write operations = are >> + serialized. >> + >> + If 32-bit I/O port operations are not supported, then ASSERT(). >> + >> + @param Port The I/O port to read. >> + @param Count The number of times to read I/O port. >> + @param Buffer The buffer to store the read data into. >> + >> +**/ >> +VOID >> +EFIAPI >> +IoReadFifo32 ( >> + IN UINTN Port, >> + IN UINTN Count, >> + OUT VOID *Buffer >> + ) >> +{ >> + DEBUG((DEBUG_ERROR, "%a:RISC-V unsupportted function.\n", __FUNCTION= __)); >> + ASSERT (FALSE); >> +} >> + >> +/** >> + Writes a block of memory into a 32-bit I/O port fifo. >> + >> + Writes the 32-bit I/O fifo port specified by Port. >> + The port is written Count times, and the write data is >> + retrieved from the provided Buffer. >> + >> + This function must guarantee that all I/O write and write operations= are >> + serialized. >> + >> + If 32-bit I/O port operations are not supported, then ASSERT(). >> + >> + @param Port The I/O port to write. >> + @param Count The number of times to write I/O port. >> + @param Buffer The buffer to retrieve the write data from. >> + >> +**/ >> +VOID >> +EFIAPI >> +IoWriteFifo32 ( >> + IN UINTN Port, >> + IN UINTN Count, >> + IN VOID *Buffer >> + ) >> +{ >> + DEBUG((DEBUG_ERROR, "%a:RISC-V unsupportted function.\n", __FUNCTION= __)); >> + ASSERT (FALSE); >> +} >> --=20 >> 2.7.4 >> >> >> >> >=20 >=20 >=20