From: "Marcin Juszkiewicz" <marcin.juszkiewicz@linaro.org>
To: devel@edk2.groups.io, quic_llindhol@quicinc.com
Subject: Re: [edk2-devel] [PATCH v5 2/2] add ArmCpuInfo EFI application
Date: Thu, 20 Apr 2023 16:42:15 +0200 [thread overview]
Message-ID: <b4732cfe-0918-db7d-928e-6af7fccd878c@linaro.org> (raw)
In-Reply-To: <ZEEzg5v0seTLPwP7@qc-i7.hemma.eciton.net>
W dniu 20.04.2023 o 14:43, Leif Lindholm pisze:
> On Fri, Apr 07, 2023 at 17:29:57 +0200, Marcin Juszkiewicz wrote:
>> +#
>> +# This flag specifies whether HII resource section is generated into PE image.
>> +#
>> + UEFI_HII_RESOURCE_SECTION = TRUE
>
> The above stanza, and its comment, can be dropped.
> This relates to native language support, which there isn't any in this app.
done
>> +VOID
>> +PrintText (
>> + CONST CHAR8 *field,
>
> For coding style, name should be "*Field".
done, in all places
>> + CONST CHAR8 *Bits,
>> + CONST UINT8 Value,
>> + CONST CHAR8 *Description
>> + )
>> +{
>> + STATIC CONST CHAR8 binaries[][5] = {
>
> Could I propose renaming "binaries" to "Nibbles", since this is an
> array holding string values for all possible nibbles?
done
>> + "0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111",
>> + "1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111"
>> + };
>> + switch (Value) {
>> + case 0b0000:
>
> I agree with Pedro's concern w.r.t. binary literals being a GCC
> extension. But I also think this is the most appropriate
> representation since this is how it's documented in the ARM ARM.
>
> A bit hacky, but could we do
>
> enum {
> b0000,
> b0001,
> ...
> b1111
> };
>
> and then use those instead?
>
> (you can build with -pedantic to verify you catch them all)
done, passed with -pedantic
>> + // only valid for BigEnd != 0b0000
>
> Could we possibly reword as
> // If mixed-endian support is present, check whether supported at EL0
done
>> + case 0b0001: // add FEAT_LPA2 check
>
> That's sounds like a TODO. And we don't want TODOs in code.
> Can we either drop the comment, add the check, or skip the test?
> (That is my order of preference - we shouldn't need to be verifying
> architectural compliance.)
dropped
>> + case 0b0010: // add FEAT_LPA2 check
>
> Same comment as for 4k.
dropped as well
>> + Bits = "59:56";
>> + Value = (Aa64Pfr0 >> 56) & 0xf;
>> + switch (Value) {
>> + case 0b0000:
>> + Description = "no info is FEAT_CSV2 implemented.";
>
> Consider rewording.
> Is the text from the ARM ARM too long?
> "The implementation does not disclose whether FEAT_CSV2 is
> implemented."
> if so, maybe
> "Not disclosed whether FEAT_CSV2 is implemented."?
thx, done
>> + PrintValues (RegName, Bits, Value, Description);
>> +
>> + // 35:32 is CSV2_frac
>
> That's a TODO.
Is it more info why those bits are not handled here. Same with 15:12 for
RAS_frac and 19:16 for MPAM_frac. They are not reserved like 63:40 are.
And CSV2_frac bits are used earlier, in PRF0 handling. If we have CSV2
implemented then CSV2_frac says do we have CSV2_1p1 or CSV2_1p2 implemented.
MPAM_frac and RAS_frac are used in PRF0 handling as well.
>> +EFI_STATUS
>> +EFIAPI
>> +UefiMain (
>
> Stray space before '(' here too. Is it an editor setting?
fixed
next prev parent reply other threads:[~2023-04-20 14:42 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-31 18:02 [PATCH] add ArmCpuInfo EFI application Marcin Juszkiewicz
2023-04-06 21:05 ` [edk2-devel] " Rebecca Cran
2023-04-07 10:39 ` [PATCH v2] " Marcin Juszkiewicz
2023-04-07 10:55 ` [edk2-devel] " Ard Biesheuvel
2023-04-07 12:46 ` Marcin Juszkiewicz
2023-04-07 13:07 ` Ard Biesheuvel
2023-04-07 12:47 ` [PATCH v3] " Marcin Juszkiewicz
2023-04-07 13:02 ` [edk2-devel] " Pedro Falcato
2023-04-07 13:05 ` Pedro Falcato
2023-04-07 13:29 ` Marcin Juszkiewicz
2023-04-07 13:40 ` Pedro Falcato
2023-04-07 13:41 ` Pedro Falcato
2023-04-07 13:42 ` Marcin Juszkiewicz
2023-04-07 14:02 ` [PATCH v4] " Marcin Juszkiewicz
[not found] ` <1753ABF1A296B040.11304@groups.io>
2023-04-07 15:11 ` [edk2-devel] " Marcin Juszkiewicz
2023-04-07 15:29 ` [PATCH v5 0/2] add ArmCpuInfo application Marcin Juszkiewicz
2023-04-07 15:29 ` [PATCH v5 1/2] ArmLib: add functions to read system registers Marcin Juszkiewicz
2023-04-20 10:54 ` Leif Lindholm
2023-04-07 15:29 ` [PATCH v5 2/2] add ArmCpuInfo EFI application Marcin Juszkiewicz
2023-04-20 12:43 ` Leif Lindholm
2023-04-20 14:42 ` Marcin Juszkiewicz [this message]
2023-04-20 14:44 ` [PATCH v6 1/2] ArmLib: add functions to read system registers Marcin Juszkiewicz
2023-04-20 14:44 ` [PATCH v6 2/2] add ArmCpuInfo EFI application Marcin Juszkiewicz
2023-04-20 17:29 ` Leif Lindholm
2023-04-21 14:37 ` [edk2-devel] " Rebecca Cran
2023-04-21 14:59 ` Marcin Juszkiewicz
2023-04-21 15:15 ` Rebecca Cran
2023-04-21 15:51 ` [PATCH v7 1/2] ArmLib: add functions to read system registers Marcin Juszkiewicz
2023-04-21 15:51 ` [PATCH v7 2/2] add ArmCpuInfo EFI application Marcin Juszkiewicz
2023-04-21 20:18 ` Leif Lindholm
2023-04-21 16:33 ` [edk2-devel] [PATCH v6 " Leif Lindholm
2023-04-13 9:31 ` [PATCH v5 0/2] add ArmCpuInfo application Marcin Juszkiewicz
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=b4732cfe-0918-db7d-928e-6af7fccd878c@linaro.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