From: Matt Fleming <matt@console-pimps.org>
To: Leif Lindholm <leif.lindholm@linaro.org>
Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-ia64@vger.kernel.org, matt.fleming@intel.com,
tony.luck@gmail.com, patches@linaro.org
Subject: Re: [PATCH v2 2/5] efi: provide a generic efi_config_init()
Date: Mon, 5 Aug 2013 13:15:40 +0100 [thread overview]
Message-ID: <20130805121540.GP2515@console-pimps.org> (raw)
In-Reply-To: <1375462582-16423-3-git-send-email-leif.lindholm@linaro.org>
On Fri, 02 Aug, at 05:56:19PM, Leif Lindholm wrote:
> Common to (U)EFI support on all platforms is the global "efi" data
> structure, and the code that parses the System Table to locate
> addresses to populate that structure with.
>
> This patch adds both of these to the global EFI driver code.
>
> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
> ---
> drivers/firmware/efi/efi.c | 106 ++++++++++++++++++++++++++++++++++++++++++++
> include/linux/efi.h | 7 +++
> 2 files changed, 113 insertions(+)
[...]
> +static __init int match_config_table(efi_guid_t *guid,
> + unsigned long table,
> + efi_config_table_type_t *table_types)
> +{
> + u8 str[38];
Shouldn't this be 37? You get 36 bytes for your GUID, plus a trailing
NUL? Either way, this should be a #define. The closest thing we have in
include/linux/efi.h is EFI_VARIABLE_GUID_LEN. Perhaps we need a
EFI_GUID_LEN that includes the trailing NUL?
> + int i;
> +
> + if (table_types) {
> + efi_guid_unparse(guid, str);
> +
> + for (i = 0; efi_guidcmp(table_types[i].guid, NULL_GUID); i++) {
> + efi_guid_unparse(&table_types[i].guid, str);
> +
> + if (!efi_guidcmp(*guid, table_types[i].guid)) {
> + *(table_types[i].ptr) = table;
> + pr_cont(" %s=0x%lx ",
> + table_types[i].name, table);
> + return 1;
> + }
> + }
> + }
> +
> + return 0;
> +}
One thing I just noticed that's worth pointing out is that 'pr_fmt'
isn't defined in drivers/firmware/efi/efi.c. Before your patch series
you get,
[ 0.000000] efi: SMBIOS=0xbae41a98 ACPI=0xbac6f000 ACPI 2.0=0xbac6f000 MPS=0xfca90
and after,
[ 0.000000] SMBIOS=0xbae41a98 ACPI=0xbac6f000 ACPI 2.0=0xbac6f000 MPS=0xfca90
which isn't the end of the world, but it does mean that the error
messages are now much less informative, e.g.
> + config_tables = early_memremap(efi.systab->tables,
> + efi.systab->nr_tables * sz);
> + if (config_tables == NULL) {
> + pr_err("could not map configuration table!\n");
> + return -ENOMEM;
> + }
Which goes from,
efi: could not map configuration table!
to become,
could not map configuration table!
--
Matt Fleming, Intel Open Source Technology Center
next prev parent reply other threads:[~2013-08-05 12:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-02 16:56 [PATCH v2 0/5] Make commonly useful UEFI functions common Leif Lindholm
2013-08-02 16:56 ` [PATCH v2 1/5] ia64: add early_memremap() alias for early_ioremap() Leif Lindholm
2013-08-05 10:56 ` Matt Fleming
2013-08-05 16:10 ` Tony Luck
2013-08-06 6:26 ` Matt Fleming
2013-08-02 16:56 ` [PATCH v2 2/5] efi: provide a generic efi_config_init() Leif Lindholm
2013-08-05 12:15 ` Matt Fleming [this message]
2013-08-07 11:54 ` Leif Lindholm
2013-08-02 16:56 ` [PATCH v2 3/5] efi: x86: use common code for (U)EFI configuration scanning Leif Lindholm
2013-08-05 12:18 ` Matt Fleming
2013-08-02 16:56 ` [PATCH v2 4/5] efi: ia64: " Leif Lindholm
2013-08-05 12:18 ` Matt Fleming
2013-08-02 16:56 ` [PATCH v2 5/5] efi: x86: make efi_lookup_mapped_addr() a common function Leif Lindholm
2013-08-05 12:26 ` Matt Fleming
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=20130805121540.GP2515@console-pimps.org \
--to=matt@console-pimps.org \
--cc=leif.lindholm@linaro.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.fleming@intel.com \
--cc=patches@linaro.org \
--cc=tony.luck@gmail.com \
/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