public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Julien Grall <julien@xen.org>
To: Ard Biesheuvel <ard.biesheuvel@arm.com>,
	Sami Mujawar <sami.mujawar@arm.com>,
	devel@edk2.groups.io
Cc: leif@nuviainc.com, lersek@redhat.com, Alexandru.Elisei@arm.com,
	Andre.Przywara@arm.com, Matteo.Carlini@arm.com,
	Laura.Moretta@arm.com, nd@arm.com
Subject: Re: [PATCH v3 07/15] ArmVirtPkg: Early serial port initialisation
Date: Fri, 26 Jun 2020 10:23:23 +0100	[thread overview]
Message-ID: <2b167b65-8460-c85d-a08b-d654d694e38a@xen.org> (raw)
In-Reply-To: <2b729fe3-83f3-52f0-9124-f908cbaf61cd@arm.com>

Hi,

On 25/06/2020 12:42, Ard Biesheuvel wrote:
> (+ Julien)

Thank you for the CC!

> On 6/24/20 3:34 PM, Sami Mujawar wrote:
>> Initialise serial port early so that the platform
>> memory map can be logged.
>>
>> Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
>> ---
>>   ArmVirtPkg/PrePi/PrePi.c | 10 +++++-----
>>   1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/ArmVirtPkg/PrePi/PrePi.c b/ArmVirtPkg/PrePi/PrePi.c
>> index 
>> 4f0c3f98bad63d0682cccd76a0a062d1fd4f46ab..5e144f4bdefb810708238097a3373f11d150bfe5 
>> 100755
>> --- a/ArmVirtPkg/PrePi/PrePi.c
>> +++ b/ArmVirtPkg/PrePi/PrePi.c
>> @@ -1,6 +1,6 @@
>>   /** @file
>>   *
>> -*  Copyright (c) 2011-2014, ARM Limited. All rights reserved.
>> +*  Copyright (c) 2011-2020, ARM Limited. All rights reserved.
>>   *
>>   *  SPDX-License-Identifier: BSD-2-Clause-Patent
>>   *
>> @@ -60,16 +60,16 @@ PrePiMain (
>>     //
>>     InvalidateDataCacheRange((VOID *)(UINTN)PcdGet64 
>> (PcdFdBaseAddress), PcdGet32 (PcdFdSize));
>> -  // Initialize MMU and Memory HOBs (Resource Descriptor HOBs)
>> -  Status = MemoryPeim (UefiMemoryBase, FixedPcdGet32 
>> (PcdSystemMemoryUefiRegionSize));
>> -  ASSERT_EFI_ERROR (Status);
>> -
>>     // Initialize the Serial Port
>>     SerialPortInitialize ();
>>     CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"UEFI firmware 
>> (version %s built at %a on %a)\n\r",
>>       (CHAR16*)PcdGetPtr(PcdFirmwareVersionString), __TIME__, __DATE__);
>>     SerialPortWrite ((UINT8 *) Buffer, CharCount);
>> +  // Initialize MMU and Memory HOBs (Resource Descriptor HOBs)
>> +  Status = MemoryPeim (UefiMemoryBase, FixedPcdGet32 
>> (PcdSystemMemoryUefiRegionSize));
>> +  ASSERT_EFI_ERROR (Status);
>> +
>>     // Create the Stacks HOB (reserve the memory for all stacks)
>>     StacksSize = PcdGet32 (PcdCPUCorePrimaryStackSize);
>>     BuildStackHob (StacksBase, StacksSize);
>>
> 
> We need to check whether this works on Xen - I don't remember whether we 
> use some kind of cache coherent shared memory ring there for the serial 
> console that only works if the MMU and caches are enabled. Julien?

Xen Console is using a shared memory ring that requires to be cache 
coherent. So you wouldn't be able to use the current driver before the 
MMU and caches are enabled.

It might be possible to make it work by issuing cache maintenance when 
sending the characters.

Cheers,

-- 
Julien Grall

  reply	other threads:[~2020-06-26  9:23 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-24 13:34 [PATCH v3 00/15] Kvmtool guest firmware support for Arm Sami Mujawar
2020-06-24 13:34 ` [PATCH v3 01/15] PcAtChipsetPkg: Add MMIO Support to RTC driver Sami Mujawar
2020-06-25 11:24   ` Ard Biesheuvel
2020-06-29  2:36     ` [edk2-devel] " Guomin Jiang
2020-06-24 13:34 ` [PATCH v3 02/15] ArmVirtPkg: Add Kvmtool RTC Fdt Client Library Sami Mujawar
2020-06-25 11:31   ` Ard Biesheuvel
2020-06-24 13:34 ` [PATCH v3 03/15] ArmPlatformPkg: Dynamic flash variable base Sami Mujawar
2020-06-24 13:34 ` [PATCH v3 04/15] ArmVirtPkg: Add kvmtool platform driver Sami Mujawar
2020-06-25 11:35   ` Ard Biesheuvel
2020-06-24 13:34 ` [PATCH v3 05/15] ArmVirtPkg: kvmtool platform memory map Sami Mujawar
2020-06-24 13:34 ` [PATCH v3 06/15] ArmVirtPkg: Add Kvmtool NOR flash lib Sami Mujawar
2020-06-25  8:45   ` Philippe Mathieu-Daudé
2020-06-25 11:19     ` [edk2-devel] " Ard Biesheuvel
2020-06-25 11:41       ` Philippe Mathieu-Daudé
2020-06-25 11:38   ` Ard Biesheuvel
2020-06-25 17:33     ` Sami Mujawar
2020-06-24 13:34 ` [PATCH v3 07/15] ArmVirtPkg: Early serial port initialisation Sami Mujawar
2020-06-25 11:42   ` Ard Biesheuvel
2020-06-26  9:23     ` Julien Grall [this message]
2020-06-24 13:34 ` [PATCH v3 08/15] MdeModulePkg: Fix constructor invocation ordering Sami Mujawar
2020-06-25 13:51   ` Ard Biesheuvel
2020-06-26 13:22     ` Laszlo Ersek
2020-06-27 11:37       ` Ard Biesheuvel
2020-06-24 13:34 ` [PATCH v3 09/15] ArmVirtPkg: GUID Hob for 16550 UART base address Sami Mujawar
2020-06-25 13:52   ` Ard Biesheuvel
2020-06-24 13:34 ` [PATCH v3 10/15] ArmVirtPkg: 16550 UART Platform hook library Sami Mujawar
2020-06-25 13:56   ` Ard Biesheuvel
2020-06-24 13:34 ` [PATCH v3 11/15] ArmVirtPkg: Add Kvmtool Platform Pei Lib Sami Mujawar
2020-06-25 14:05   ` Ard Biesheuvel
2020-06-24 13:34 ` [PATCH v3 12/15] ArmVirtPkg: Support for kvmtool virtual platform Sami Mujawar
2020-06-25 14:08   ` Ard Biesheuvel
2020-06-26 13:26     ` Laszlo Ersek
2020-06-24 13:34 ` [PATCH v3 13/15] ArmVirtPkg: Package dependency for MC146818 RTC Sami Mujawar
2020-06-25 14:08   ` Ard Biesheuvel
2020-06-24 13:34 ` [PATCH v3 14/15] ArmVirtPkg: Add kvmtool to package dictionary Sami Mujawar
2020-06-25 14:09   ` Ard Biesheuvel
2020-06-24 13:34 ` [PATCH v3 15/15] Maintainer.txt: Add Kvmtool platform reviewer Sami Mujawar
2020-06-25 14:09   ` Ard Biesheuvel

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=2b167b65-8460-c85d-a08b-d654d694e38a@xen.org \
    --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