All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	Andrew Jones <drjones@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Graeme Gregory <graeme.gregory@linaro.org>,
	Al Stone <al.stone@linaro.org>,
	Marcel Apfelbaum <marcel@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] hw/arm/virt-acpi - reserve ECAM space as PNP0C02 device
Date: Tue, 17 Jan 2017 09:50:24 +0100	[thread overview]
Message-ID: <acc3f75b-5df0-de8c-fbfa-2cf29f728031@redhat.com> (raw)
In-Reply-To: <CAKv+Gu_Rap-_gnXqF6cRYS+CUvm2QMzxKWnSRNyJ7-wqJcdNGA@mail.gmail.com>

(my reply is no longer related to the patch, so maybe I shouldn't send
it... I can't resist, sorry :))

On 01/17/17 08:47, Ard Biesheuvel wrote:
> On 16 January 2017 at 22:35, Laszlo Ersek <lersek@redhat.com> wrote:

>> The UEFI memory map will reflect allocations from the GCD memory space,
>> for the Reserved and MMIO types. See "Figure 2. GCD Memory State
>> Transitions" in "7.2.2 GCD Memory Resources", Vol2 of the PI spec.
>>
>> See also "9.7.1 UEFI Boot Services Dependencies" in the same,
>>
>>   9.7.1.8 GetMemoryMap()
>>
>>   The GetMemoryMap() implementation must include into the UEFI memory
>>   map all GCD map entries of types EfiGcdMemoryTypeReserved and
>>   EfiPersistentMemory, and all GCD map entries of type
>>   EfiGcdMemoryTypeMemoryMappedIo that have EFI_MEMORY_RUNTIME attribute
>>   set.
>>
>> (Note that I wrote Reserved earlier, not MMIO.)
>>
> 
> What the PI spec stipulates is irrelevant: the contract between the
> firmware and the OS is in the UEFI and ACPI specifications, not in the
> PI spec.

I disagree that what the PI spec stipulates is irrelevant. For platforms
that implement both PI and UEFI, the PI spec expresses additional
requirements for the UEFI implementation (in PI terminology). So what it
says certainly matters for the ArmVirtQemu firmware specifically.

End-to-end, if we want to achieve a particular result in a UEFI OS, we
can certainly work towards that end in the PEI phase (or in the DXE
phase, using the DXE services) in a specific firmware that aims to
conform to both PI and UEFI. Because, the effects that those low-level
operations will have on the UEFI level (and consequently, on the OS) are
well defined in the PI spec.

> 
>> However, you are right that *just* the UEFI memmap entry is not
>> sufficient, according to the PCI firmware spec. (Regardless of the fact
>> that in practice, just the memmap entry does keep Linux happy. Or is it
>> about to change?)
>>
> 
> The kernel uses the UEFI memory map for two purposes:
> - finding out where memory is, and which parts are usable (i.e., non-reserved)
> - setting up page tables to allow UEFI runtime services calls, which
> may include MMIO mappings
> 
> This means that MMIO regions in the UEFI memory map are *not*
> considered reservations. [...]

Yes, I understand that. Now please understand that my suggestion was
never to cover the MMCONFIG area with MMIO type memory; all along I've
been saying "reserved memory".

(Again, this is now independent of the patch.)

Thanks,
Laszlo

  reply	other threads:[~2017-01-17  8:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-13 17:32 [Qemu-devel] [PATCH v2] hw/arm/virt-acpi - reserve ECAM space as PNP0C02 device Ard Biesheuvel
2017-01-16 17:25 ` Peter Maydell
2017-01-16 17:30   ` Ard Biesheuvel
2017-01-16 18:20     ` Peter Maydell
2017-01-16 19:31       ` Ard Biesheuvel
2017-01-16 21:13         ` Laszlo Ersek
2017-01-16 21:23           ` Ard Biesheuvel
2017-01-16 22:35             ` Laszlo Ersek
2017-01-17  7:47               ` Ard Biesheuvel
2017-01-17  8:50                 ` Laszlo Ersek [this message]
2017-01-17  9:06                   ` Ard Biesheuvel
2017-01-17  9:28                     ` Laszlo Ersek
2017-01-17 14:46               ` Michael S. Tsirkin
2017-01-17  9:49         ` Andrew Jones
2017-01-17 10:56           ` Peter Maydell
2017-01-18 15:18             ` Igor Mammedov
2017-01-18 15:55               ` Laszlo Ersek
2017-01-18 17:02                 ` Ard Biesheuvel
2017-01-18 17:26                   ` Laszlo Ersek
2017-01-19 13:16                     ` Peter Maydell
2017-01-18 14:49           ` 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-all 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=acc3f75b-5df0-de8c-fbfa-2cf29f728031@redhat.com \
    --to=lersek@redhat.com \
    --cc=al.stone@linaro.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=drjones@redhat.com \
    --cc=graeme.gregory@linaro.org \
    --cc=leif.lindholm@linaro.org \
    --cc=marcel@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.