public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Sunny Wang" <Sunny.Wang@arm.com>
To: "Wu, Hao A" <hao.a.wu@intel.com>,
	gaoliming <gaoliming@byosoft.com.cn>,
	edk2-devel-groups-io <devel@edk2.groups.io>
Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>,
	Sunny Wang <Sunny.Wang@arm.com>,
	G Edhaya Chandran <Edhaya.Chandran@arm.com>,
	"xypron.glpk@gmx.de" <xypron.glpk@gmx.de>
Subject: Return EFI_INVALID_PARAMETER if attribute only has EFI_VARIABLE_NON_VOLATILE set
Date: Thu, 21 Oct 2021 10:18:40 +0000	[thread overview]
Message-ID: <DB8PR08MB3993369FB3983ECAEA7BAF1685BF9@DB8PR08MB3993.eurprd08.prod.outlook.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1432 bytes --]

Hi Liming, Hao, and all

Now we're checking the SCT runtime variable service test case. https://github.com/tianocore/edk2-test/blob/92a0343c1553342c53fae9d9d646b763add232c0/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/VariableServices/BlackBoxTest/VariableServicesBBTestConformance.c#L3401 and have a question below.

Is there any use case to call the runtime variable service functions with the Attributes that only has EFI_VARIABLE_NON_VOLATILE set?

We checked UEFI spec, documents, and current EDK2 implementation. There is no specific description or any implementation for this. However, there seems an implication that EFI_VARIABLE_NON_VOLATILE must be set with at least EFI_VARIABLE_BOOTSERVICE_ACCESS.  Actually, it looks like making NO sense to have a variable attribute combination that doesn't have any XXXXX_ACCESS attribute (BS, RT, or AT) set.

Therefore, we think only having EFI_VARIABLE_NON_VOLATILE set may be an invalid case and would like to add a check into the EDK2 variable driver to return EFI_INVALID_PARAMETER.  What do you guys think?

Best Regards,
Sunny




IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

[-- Attachment #2: Type: text/html, Size: 3974 bytes --]

             reply	other threads:[~2021-10-21 10:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-21 10:18 Sunny Wang [this message]
2021-10-22  1:13 ` 回复: [edk2-devel] Return EFI_INVALID_PARAMETER if attribute only has EFI_VARIABLE_NON_VOLATILE set gaoliming
2021-10-23 11:03 ` Heinrich Schuchardt

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=DB8PR08MB3993369FB3983ECAEA7BAF1685BF9@DB8PR08MB3993.eurprd08.prod.outlook.com \
    --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