From: Matt Fleming <matt@console-pimps.org>
To: Leif Lindholm <leif.lindholm@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org,
linux-kernel@vger.kernel.org, matt.fleming@intel.com,
grant.likely@secretlab.ca, roy.franz@linaro.org,
msalter@redhat.com
Subject: Re: [PATCH v2 2/3] arm: Add [U]EFI runtime services support
Date: Thu, 17 Oct 2013 15:07:39 +0100 [thread overview]
Message-ID: <20131017140739.GI10834@console-pimps.org> (raw)
In-Reply-To: <1380799481-5470-3-git-send-email-leif.lindholm@linaro.org>
On Thu, 03 Oct, at 12:24:40PM, Leif Lindholm wrote:
> +/*
> + * If you need to (temporarily) support buggy firmware.
> + */
> +#define KEEP_BOOT_SERVICES_REGIONS
Have you seen firmware that requires this? I'm just curious more than
anything else.
> +/*
> + * Returns 1 if 'facility' is enabled, 0 otherwise.
> + */
> +int efi_enabled(int facility)
> +{
> + return test_bit(facility, &arm_efi_facility) != 0;
> +}
> +EXPORT_SYMBOL(efi_enabled);
This should move to drivers/firmware/efi/efi.c. Let me write a patch
that moves the x86 stuff out of arch/x86 and means you can get rid of
this hunk.
> +/*
> + * Called explicitly from init/mm.c
> + */
That's init/main.c.
> +void __init efi_enter_virtual_mode(void)
> +{
> + efi_status_t status;
> +
> + if (!efi_enabled(EFI_BOOT)) {
> + pr_info("EFI services will not be available.\n");
> + return;
This is dead code as PATCH 3 does,
diff --git a/init/main.c b/init/main.c
index af310af..ec6d76e 100644
--- a/init/main.c
+++ b/init/main.c
@@ -875,6 +875,10 @@ static noinline void __init
kernel_init_freeable(void)
smp_prepare_cpus(setup_max_cpus);
do_pre_smp_initcalls();
+
+ if (IS_ENABLED(CONFIG_ARM) && efi_enabled(EFI_BOOT))
+ efi_enter_virtual_mode();
+
--
Matt Fleming, Intel Open Source Technology Center
next prev parent reply other threads:[~2013-10-17 14:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-03 11:24 [PATCH v2 0/3] arm: " Leif Lindholm
2013-10-03 11:24 ` [PATCH v2 1/3] Documentation: arm: add UEFI support documentation Leif Lindholm
2013-10-03 16:11 ` Rob Herring
2013-10-03 17:18 ` Leif Lindholm
2013-10-04 12:54 ` Mark Rutland
2013-10-03 17:10 ` Mark Rutland
2013-10-03 19:44 ` Leif Lindholm
2013-10-03 11:24 ` [PATCH v2 2/3] arm: Add [U]EFI runtime services support Leif Lindholm
2013-10-17 14:07 ` Matt Fleming [this message]
2013-10-17 14:31 ` Leif Lindholm
2013-10-17 16:58 ` Mark Salter
2013-10-03 11:24 ` [PATCH v2 3/3] init: efi: arm: enable (U)EFI runtime services on arm Leif Lindholm
2013-11-15 18:04 ` [PATCH v2 0/3] arm: [U]EFI runtime services support Olof Johansson
2013-11-15 18:54 ` Leif Lindholm
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=20131017140739.GI10834@console-pimps.org \
--to=matt@console-pimps.org \
--cc=grant.likely@secretlab.ca \
--cc=leif.lindholm@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.fleming@intel.com \
--cc=msalter@redhat.com \
--cc=roy.franz@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®