All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Leif Lindholm <leif.lindholm@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	patches@linaro.org, hpa@linux.intel.com, tglx@linutronix.de,
	matt.fleming@intel.com
Subject: Re: [PATCH 1/4] Documentation: arm: [U]EFI runtime services
Date: Tue, 25 Jun 2013 17:42:59 -0600	[thread overview]
Message-ID: <51CA2B03.4080106@wwwdotorg.org> (raw)
In-Reply-To: <1372183863-11333-2-git-send-email-leif.lindholm@linaro.org>

On 06/25/2013 12:11 PM, Leif Lindholm wrote:
> This patch provides documentation of the [U]EFI runtime services and
> configuration features.


> diff --git a/Documentation/arm/uefi.txt b/Documentation/arm/uefi.txt

> +The implementation depends on receiving pointers to the UEFI memory map
> +and System Table in a Flattened Device Tree - so is only available with
> +CONFIG_OF.
> +
> +It (early) parses the FDT for the following parameters:

Part of this document (the raw requirements for DT content, rather than
the discussion of OS implementation/behaviour in parsing/interpreting
the properties) should be part of a file in
Documentation/devicetree/bindings/ (arm/uefi.txt?).

What node are these properties expected to be contained within?

Shouldn't that node be required to contain a compatible value, which
would define the schema for the other properties?

> +- 'efi-system-table':
> +  Physical address of the system table. (required)
> +- 'efi-runtime-mmap':
> +  Physical address of an EFI memory map, containing at least
> +  the regions to be preserved. (required)
> +- 'efi-runtime-mmap-size':
> +  Size in bytes of the provided memory map. (required)
> +- 'efi-mmap-desc-size':
> +  Size of each descriptor in the memory map. (override default)
> +- 'efi-mmap-desc-ver':
> +  Memory descriptor format version. (override default)
> +
> +Since UEFI firmware on ARM systems are required to use a 1:1 memory map
> +even on LPAE-capable systems, the above fields are 32-bit regardless.

What about ARMv8? Is the intention to have a separate definition for the
UEFI bindings on ARMv8, so that compatibility isn't an issue? What if a
future version of UEFI allows LPAE usage?

It may be better to explicitly state that the size of those properties
is either #address-cells from the parent node (presumably the top-level
of the DT), and/or introduce some property to explicitly state the size
of the properties. Those mechanisms would allow forward-compatibility to
LPAE usage or ARMv8 without requiring the text of the binding definition
to change.

Also, it seems legal to state the physical addresses using 64-bits even
if the actual values themselves are restricted to 32-bit range by the
UEFI spec. Illegal values would presumably cause SW that interprets them
to fail error-checks, and be rejected.

> +After the kernel has mapped the required regions into its address space,
> +a SetVirtualAddressMap() call is made into UEFI in order to update
> +relocations. This call must be performed with all the code in a 1:1

Presumably "all the code" also includes "all .data and .bss", or
whatever the UEFI-equivalent may be? I'm not familiar with UEFI at all;
does the "EFI memory map" mentioned above describe all the memory
regions that must be mapped to use UEFI?

> +mapping. This implementation achieves this by temporarily disabling the
> +MMU for the duration of this call. This can only be done safely:
> +- before secondary CPUs are brought online.
> +- after early_initcalls have completed, sinze it uses setup_mm_for_reboot().


WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Leif Lindholm <leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	hpa-VuQAYsv1563Yd54FQh9/CA@public.gmane.org,
	tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org,
	matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Subject: Re: [PATCH 1/4] Documentation: arm: [U]EFI runtime services
Date: Tue, 25 Jun 2013 17:42:59 -0600	[thread overview]
Message-ID: <51CA2B03.4080106@wwwdotorg.org> (raw)
In-Reply-To: <1372183863-11333-2-git-send-email-leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

On 06/25/2013 12:11 PM, Leif Lindholm wrote:
> This patch provides documentation of the [U]EFI runtime services and
> configuration features.


> diff --git a/Documentation/arm/uefi.txt b/Documentation/arm/uefi.txt

> +The implementation depends on receiving pointers to the UEFI memory map
> +and System Table in a Flattened Device Tree - so is only available with
> +CONFIG_OF.
> +
> +It (early) parses the FDT for the following parameters:

Part of this document (the raw requirements for DT content, rather than
the discussion of OS implementation/behaviour in parsing/interpreting
the properties) should be part of a file in
Documentation/devicetree/bindings/ (arm/uefi.txt?).

What node are these properties expected to be contained within?

Shouldn't that node be required to contain a compatible value, which
would define the schema for the other properties?

> +- 'efi-system-table':
> +  Physical address of the system table. (required)
> +- 'efi-runtime-mmap':
> +  Physical address of an EFI memory map, containing at least
> +  the regions to be preserved. (required)
> +- 'efi-runtime-mmap-size':
> +  Size in bytes of the provided memory map. (required)
> +- 'efi-mmap-desc-size':
> +  Size of each descriptor in the memory map. (override default)
> +- 'efi-mmap-desc-ver':
> +  Memory descriptor format version. (override default)
> +
> +Since UEFI firmware on ARM systems are required to use a 1:1 memory map
> +even on LPAE-capable systems, the above fields are 32-bit regardless.

What about ARMv8? Is the intention to have a separate definition for the
UEFI bindings on ARMv8, so that compatibility isn't an issue? What if a
future version of UEFI allows LPAE usage?

It may be better to explicitly state that the size of those properties
is either #address-cells from the parent node (presumably the top-level
of the DT), and/or introduce some property to explicitly state the size
of the properties. Those mechanisms would allow forward-compatibility to
LPAE usage or ARMv8 without requiring the text of the binding definition
to change.

Also, it seems legal to state the physical addresses using 64-bits even
if the actual values themselves are restricted to 32-bit range by the
UEFI spec. Illegal values would presumably cause SW that interprets them
to fail error-checks, and be rejected.

> +After the kernel has mapped the required regions into its address space,
> +a SetVirtualAddressMap() call is made into UEFI in order to update
> +relocations. This call must be performed with all the code in a 1:1

Presumably "all the code" also includes "all .data and .bss", or
whatever the UEFI-equivalent may be? I'm not familiar with UEFI at all;
does the "EFI memory map" mentioned above describe all the memory
regions that must be mapped to use UEFI?

> +mapping. This implementation achieves this by temporarily disabling the
> +MMU for the duration of this call. This can only be done safely:
> +- before secondary CPUs are brought online.
> +- after early_initcalls have completed, sinze it uses setup_mm_for_reboot().

WARNING: multiple messages have this Message-ID (diff)
From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] Documentation: arm: [U]EFI runtime services
Date: Tue, 25 Jun 2013 17:42:59 -0600	[thread overview]
Message-ID: <51CA2B03.4080106@wwwdotorg.org> (raw)
In-Reply-To: <1372183863-11333-2-git-send-email-leif.lindholm@linaro.org>

On 06/25/2013 12:11 PM, Leif Lindholm wrote:
> This patch provides documentation of the [U]EFI runtime services and
> configuration features.


> diff --git a/Documentation/arm/uefi.txt b/Documentation/arm/uefi.txt

> +The implementation depends on receiving pointers to the UEFI memory map
> +and System Table in a Flattened Device Tree - so is only available with
> +CONFIG_OF.
> +
> +It (early) parses the FDT for the following parameters:

Part of this document (the raw requirements for DT content, rather than
the discussion of OS implementation/behaviour in parsing/interpreting
the properties) should be part of a file in
Documentation/devicetree/bindings/ (arm/uefi.txt?).

What node are these properties expected to be contained within?

Shouldn't that node be required to contain a compatible value, which
would define the schema for the other properties?

> +- 'efi-system-table':
> +  Physical address of the system table. (required)
> +- 'efi-runtime-mmap':
> +  Physical address of an EFI memory map, containing at least
> +  the regions to be preserved. (required)
> +- 'efi-runtime-mmap-size':
> +  Size in bytes of the provided memory map. (required)
> +- 'efi-mmap-desc-size':
> +  Size of each descriptor in the memory map. (override default)
> +- 'efi-mmap-desc-ver':
> +  Memory descriptor format version. (override default)
> +
> +Since UEFI firmware on ARM systems are required to use a 1:1 memory map
> +even on LPAE-capable systems, the above fields are 32-bit regardless.

What about ARMv8? Is the intention to have a separate definition for the
UEFI bindings on ARMv8, so that compatibility isn't an issue? What if a
future version of UEFI allows LPAE usage?

It may be better to explicitly state that the size of those properties
is either #address-cells from the parent node (presumably the top-level
of the DT), and/or introduce some property to explicitly state the size
of the properties. Those mechanisms would allow forward-compatibility to
LPAE usage or ARMv8 without requiring the text of the binding definition
to change.

Also, it seems legal to state the physical addresses using 64-bits even
if the actual values themselves are restricted to 32-bit range by the
UEFI spec. Illegal values would presumably cause SW that interprets them
to fail error-checks, and be rejected.

> +After the kernel has mapped the required regions into its address space,
> +a SetVirtualAddressMap() call is made into UEFI in order to update
> +relocations. This call must be performed with all the code in a 1:1

Presumably "all the code" also includes "all .data and .bss", or
whatever the UEFI-equivalent may be? I'm not familiar with UEFI at all;
does the "EFI memory map" mentioned above describe all the memory
regions that must be mapped to use UEFI?

> +mapping. This implementation achieves this by temporarily disabling the
> +MMU for the duration of this call. This can only be done safely:
> +- before secondary CPUs are brought online.
> +- after early_initcalls have completed, sinze it uses setup_mm_for_reboot().

  parent reply	other threads:[~2013-06-25 23:43 UTC|newest]

Thread overview: 129+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25 18:10 [PATCH 0/4] arm: [U]EFI runtime services support Leif Lindholm
2013-06-25 18:10 ` Leif Lindholm
2013-06-25 18:11 ` [PATCH 1/4] Documentation: arm: [U]EFI runtime services Leif Lindholm
2013-06-25 18:11   ` Leif Lindholm
2013-06-25 18:46   ` Christopher Covington
2013-06-25 18:46     ` Christopher Covington
2013-06-25 18:46     ` Christopher Covington
2013-06-25 23:42   ` Stephen Warren [this message]
2013-06-25 23:42     ` Stephen Warren
2013-06-25 23:42     ` Stephen Warren
2013-06-26 13:20     ` Grant Likely
2013-06-26 13:20       ` Grant Likely
2013-06-26 13:20       ` Grant Likely
2013-06-26 13:53       ` Leif Lindholm
2013-06-26 13:53         ` Leif Lindholm
2013-06-26 13:53         ` Leif Lindholm
2013-06-26 13:59         ` Matt Fleming
2013-06-26 13:59           ` Matt Fleming
2013-06-26 13:59           ` Matt Fleming
2013-06-26 14:38           ` James Bottomley
2013-06-26 14:38             ` James Bottomley
2013-06-26 14:38             ` James Bottomley
2013-06-27  1:32             ` Matthew Garrett
2013-06-27  1:32               ` Matthew Garrett
2013-06-27  1:32               ` Matthew Garrett
2013-06-27  6:23               ` Grant Likely
2013-06-27  6:23                 ` Grant Likely
2013-06-27  6:23                 ` Grant Likely
2013-06-27  6:33                 ` James Bottomley
2013-06-27  6:33                   ` James Bottomley
2013-06-27  6:33                   ` James Bottomley
2013-06-27 14:37                   ` Matthew Garrett
2013-06-27 14:37                     ` Matthew Garrett
2013-06-27 14:37                     ` Matthew Garrett
2013-06-27 15:09                     ` James Bottomley
2013-06-27 15:09                       ` James Bottomley
2013-06-27 15:09                       ` James Bottomley
2013-06-27 15:37                       ` Grant Likely
2013-06-27 15:37                         ` Grant Likely
2013-06-27 15:37                         ` Grant Likely
2013-06-27 17:28                       ` Matthew Garrett
2013-06-27 17:28                         ` Matthew Garrett
2013-06-27 17:28                         ` Matthew Garrett
2013-06-27 14:54                   ` Grant Likely
2013-06-27 14:54                     ` Grant Likely
2013-06-27 14:54                     ` Grant Likely
2013-06-27 15:04                     ` James Bottomley
2013-06-27 15:04                       ` James Bottomley
2013-06-27 15:04                       ` James Bottomley
2013-06-27 18:32                       ` Russell King - ARM Linux
2013-06-27 18:32                         ` Russell King - ARM Linux
2013-06-27 18:32                         ` Russell King - ARM Linux
2013-06-27  9:00               ` Leif Lindholm
2013-06-27  9:00                 ` Leif Lindholm
2013-06-27  9:00                 ` Leif Lindholm
2013-06-27 14:38                 ` Matthew Garrett
2013-06-27 14:38                   ` Matthew Garrett
2013-06-27 14:38                   ` Matthew Garrett
2013-06-27 18:32             ` H. Peter Anvin
2013-06-27 18:32               ` H. Peter Anvin
2013-06-27 18:32               ` H. Peter Anvin
2013-06-26 18:32       ` Stephen Warren
2013-06-26 18:32         ` Stephen Warren
2013-06-26 18:32         ` Stephen Warren
2013-06-26 19:31         ` Leif Lindholm
2013-06-26 19:31           ` Leif Lindholm
2013-06-26 19:31           ` Leif Lindholm
2013-06-27 18:04           ` Stephen Warren
2013-06-27 18:04             ` Stephen Warren
2013-06-27 18:04             ` Stephen Warren
2013-06-27 20:11             ` Grant Likely
2013-06-27 20:11               ` Grant Likely
2013-06-27 20:11               ` Grant Likely
2013-06-26 13:13   ` Grant Likely
2013-06-26 13:13     ` Grant Likely
2013-06-26 13:13     ` Grant Likely
2013-06-26 14:04     ` Leif Lindholm
2013-06-26 14:04       ` Leif Lindholm
2013-06-26 14:04       ` Leif Lindholm
2013-06-26 14:35       ` Grant Likely
2013-06-26 14:35         ` Grant Likely
2013-06-26 14:35         ` Grant Likely
2013-06-27 14:22     ` Arnd Bergmann
2013-06-27 14:22       ` Arnd Bergmann
2013-06-27 14:22       ` Arnd Bergmann
2013-06-30  3:21   ` Rob Landley
2013-06-30  3:21     ` Rob Landley
2013-06-30  3:21     ` Rob Landley
2013-06-25 18:11 ` [PATCH 2/4] x86: efi: break efi_lookup_mapped_addr out to generic code Leif Lindholm
2013-06-25 18:11   ` Leif Lindholm
2013-06-26 13:30   ` Grant Likely
2013-06-26 13:30     ` Grant Likely
2013-06-26 13:30     ` Grant Likely
2013-06-26 13:32   ` Matt Fleming
2013-06-26 13:32     ` Matt Fleming
2013-06-26 13:32     ` Matt Fleming
2013-06-26 14:11     ` Leif Lindholm
2013-06-26 14:11       ` Leif Lindholm
2013-06-26 14:11       ` Leif Lindholm
2013-06-26 14:40       ` Matt Fleming
2013-06-26 14:40         ` Matt Fleming
2013-06-25 18:11 ` [PATCH 3/4] arm: Add [U]EFI runtime services support Leif Lindholm
2013-06-25 18:11   ` Leif Lindholm
2013-06-25 18:11   ` Leif Lindholm
2013-06-25 18:20   ` Matthew Garrett
2013-06-25 18:20     ` Matthew Garrett
2013-06-26 13:46     ` Grant Likely
2013-06-26 13:46       ` Grant Likely
2013-06-26 13:46       ` Grant Likely
2013-06-26 13:46   ` Grant Likely
2013-06-26 13:46     ` Grant Likely
2013-06-26 13:46     ` Grant Likely
2013-06-26 13:54     ` Matt Fleming
2013-06-26 13:54       ` Matt Fleming
2013-06-26 13:54       ` Matt Fleming
2013-06-26 14:15       ` Borislav Petkov
2013-06-26 14:15         ` Borislav Petkov
2013-06-26 14:15         ` Borislav Petkov
2013-06-26 14:35         ` Grant Likely
2013-06-26 14:35           ` Grant Likely
2013-06-26 14:35           ` Grant Likely
2013-06-26 14:22     ` Leif Lindholm
2013-06-26 14:22       ` Leif Lindholm
2013-06-26 14:22       ` Leif Lindholm
2013-06-25 18:11 ` [PATCH 4/4] init: efi: arm: enable (U)EFI runtime services on arm Leif Lindholm
2013-06-25 18:11   ` Leif Lindholm
2013-06-26 13:24   ` Grant Likely
2013-06-26 13:24     ` Grant Likely
2013-06-26 13:24     ` Grant Likely

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=51CA2B03.4080106@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=hpa@linux.intel.com \
    --cc=leif.lindholm@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=patches@linaro.org \
    --cc=tglx@linutronix.de \
    /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.