public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Vivek Kumar Gautam" <vivek.gautam@arm.com>
To: Sami Mujawar <sami.mujawar@arm.com>, devel@edk2.groups.io
Cc: ardb+tianocore@kernel.org, leif@nuviainc.com,
	Pierre.Gondois@arm.com, "nd@arm.com" <nd@arm.com>
Subject: Re: [edk2-platforms][PATCH V3 4/5] Platform/Sgi: Initialize additional UART controllers
Date: Thu, 27 Apr 2023 10:58:29 +0530	[thread overview]
Message-ID: <11a6e408-4bd7-d5f2-3816-318f9079f834@arm.com> (raw)
In-Reply-To: <edf443bc-9de5-deb1-b1fd-15ca4754656b@arm.com>

Hi Sami,


On 4/26/23 21:47, Sami Mujawar wrote:
> Hi Vivek,
> 
> Thank you for this patch.
> 
> I have some minor feedback that I will address before merging.
> 
> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Thank you for the review of this patch and other patches in the series. 
Please find my comments inline below.

> 
> Regards,
> 
> Sami Mujawar
> 
> On 24/03/2023 11:03 am, Vivek Gautam wrote:
>> From: Shriram K <shriram.k@arm.com>
>>
>> The IO virtualization block on reference design platforms allow
>> connecting SoC expansion devices such as PL011 UART. On platforms
>> that support this, initialize the UART controller connected to the
>> IO virtualization block.
>>
>> Signed-off-by: Shriram K <shriram.k@arm.com>
>> Signed-off-by: Vivek Gautam <vivek.gautam@arm.com>
>> ---
>>   Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf  |  9 ++-
>>   Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf  |  6 +-
>>   Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c    | 64 
>> +++++++++++++++++++-
>>   Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c | 44 
>> +++++++++++++-
>>   4 files changed, 116 insertions(+), 7 deletions(-)
>>
>> diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf 
>> b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
>> index 9d89314a594e..3cd7e2329c22 100644
>> --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
>> +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf
>> @@ -1,5 +1,5 @@
>>   #
>> -#  Copyright (c) 2018, ARM Limited. All rights reserved.
>> +#  Copyright (c) 2018 - 2023, ARM Limited. All rights reserved.
>>   #
>>   #  SPDX-License-Identifier: BSD-2-Clause-Patent
>>   #
>> @@ -17,6 +17,7 @@
>>     VirtioDevices.c
>>   [Packages]
>> +  ArmPlatformPkg/ArmPlatformPkg.dec
>>     EmbeddedPkg/EmbeddedPkg.dec
>>     MdePkg/MdePkg.dec
>>     OvmfPkg/OvmfPkg.dec
>> @@ -37,10 +38,16 @@
>>     gArmSgiTokenSpaceGuid.PcdVirtioNetSupported
>>   [FixedPcd]
>> +  gArmSgiTokenSpaceGuid.PcdChipCount
>> +  gArmSgiTokenSpaceGuid.PcdIoVirtSocExpBlk0Base
>> +  gArmSgiTokenSpaceGuid.PcdIoVirtSocExpBlkUartEnable
>> +  gArmSgiTokenSpaceGuid.PcdMaxAddressBitsPerChip
>>     gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
>>     gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
>>     gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress
>>     gArmSgiTokenSpaceGuid.PcdVirtioNetSize
>> +  gArmPlatformTokenSpaceGuid.PcdSerialDbgUartClkInHz
>> +
>>   [Depex]
>>     TRUE
>> diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf 
>> b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf
>> index 1ca7679b4191..020bde0d1f56 100644
>> --- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf
>> +++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf
>> @@ -1,5 +1,5 @@
>>   #
>> -#  Copyright (c) 2018 - 2022, Arm Limited. All rights reserved.
>> +#  Copyright (c) 2018 - 2023, Arm Limited. All rights reserved.
>>   #
>>   #  SPDX-License-Identifier: BSD-2-Clause-Patent
>>   #
>> @@ -41,10 +41,12 @@
>>     gArmPlatformTokenSpaceGuid.PcdCoreCount
>>     gArmPlatformTokenSpaceGuid.PcdArmHdLcdBase
>> -  gArmSgiTokenSpaceGuid.PcdMaxAddressBitsPerChip
>>     gArmSgiTokenSpaceGuid.PcdDramBlock2Base
>>     gArmSgiTokenSpaceGuid.PcdDramBlock2Size
>>     gArmSgiTokenSpaceGuid.PcdGicSize
>> +  gArmSgiTokenSpaceGuid.PcdIoVirtSocExpBlk0Base
>> +  gArmSgiTokenSpaceGuid.PcdIoVirtSocExpBlkUartEnable
>> +  gArmSgiTokenSpaceGuid.PcdMaxAddressBitsPerChip
>>     gArmTokenSpaceGuid.PcdSystemMemoryBase
>>     gArmTokenSpaceGuid.PcdSystemMemorySize
>> diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c 
>> b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
>> index 2f72e7152ff3..b3a998bc1585 100644
>> --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
>> +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
>> @@ -1,6 +1,6 @@
>>   /** @file
>>   *
>> -*  Copyright (c) 2018, ARM Limited. All rights reserved.
>> +*  Copyright (c) 2018 - 2023, ARM Limited. All rights reserved.
>>   *
>>   *  SPDX-License-Identifier: BSD-2-Clause-Patent
>>   *
>> @@ -9,6 +9,9 @@
>>   #include <Library/AcpiLib.h>
>>   #include <Library/DebugLib.h>
>>   #include <Library/HobLib.h>
>> +#include <Library/PL011UartLib.h>
>> +
>> +#include <IoVirtSoCExp.h>
>>   #include <SgiPlatform.h>
>>   VOID
>> @@ -16,6 +19,64 @@ InitVirtioDevices (
>>     VOID
>>     );
>> +/**
>> +  Initialize UART controllers connected to IO Virtualization block.
>> +
>> +  Use PL011UartLib Library to initialize UART controllers that are 
>> present in
>> +  the SoC expansion block. This SoC expansion block is connected to 
>> the IO
>> +  virtualization block on Arm infrastructure reference design (RD) 
>> platforms.
>> +
>> +  @retval  None
>> +**/
>> +STATIC
>> +VOID
>> +InitIoVirtSocExpBlkUartControllers (VOID)
>> +{
>> +  EFI_STATUS                 Status;
>> +  EFI_PARITY_TYPE            Parity;
>> +  EFI_STOP_BITS_TYPE         StopBits;
>> +  UINT64                     BaudRate;
>> +  UINT32                     ReceiveFifoDepth;
>> +  UINT8                      DataBits;
>> +  UINT8                      UartIdx;
>> +  UINT32                     ChipIdx;
>> +  UINT64                     UartAddr;
>> +
>> +  if (FixedPcdGet32 (PcdIoVirtSocExpBlkUartEnable) == 0)
>> +    return;
> 
> [SAMI] edk2 coding standard requires to use opening and closing curly 
> brackets even when the if condition has a single enclosing statement.
> 
> Also the function parameters must be on separate lines. However, I will 
> address that locally before merging.

I will keep these things in mind for future. Thanks for taking care of 
these in this patch.

Best regards
Vivek

> 
> [/SAMI]
> 

[snip]

  reply	other threads:[~2023-04-27  5:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-24 11:02 [edk2-platforms][PATCH V3 0/5] Enable SoC expansion block and Virtio-P9 for RD-N2 variants Vivek Kumar Gautam
2023-03-24 11:02 ` [edk2-platforms][PATCH V3 1/5] Platform/Sgi: Add SSDT table for Virtio-P9 Vivek Kumar Gautam
2023-04-26 16:02   ` Sami Mujawar
2023-03-24 11:03 ` [edk2-platforms][PATCH V3 2/5] Platform/Sgi: Enable virtio-p9 device on RD-N2 platform variants Vivek Kumar Gautam
2023-04-26 16:03   ` Sami Mujawar
2023-03-24 11:03 ` [edk2-platforms][PATCH V3 3/5] Platform/Sgi: Add SSDT table for IO virtualization SoC expansion block Vivek Kumar Gautam
2023-04-26 16:17   ` Sami Mujawar
2023-03-24 11:03 ` [edk2-platforms][PATCH V3 4/5] Platform/Sgi: Initialize additional UART controllers Vivek Kumar Gautam
2023-04-26 16:17   ` Sami Mujawar
2023-04-27  5:28     ` Vivek Kumar Gautam [this message]
2023-03-24 11:03 ` [edk2-platforms][PATCH V3 5/5] Platform/Sgi: Enable SoC expansion block for RD-N2 variants Vivek Kumar Gautam
2023-04-26 16:17   ` Sami Mujawar
2023-03-30  9:46 ` [edk2-platforms][PATCH V3 0/5] Enable SoC expansion block and Virtio-P9 " PierreGondois
2023-03-30  9:52   ` Vivek Kumar Gautam
2023-04-27  7:18 ` Sami Mujawar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11a6e408-4bd7-d5f2-3816-318f9079f834@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox