]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg/PlatformDxe: Handle all requests in ExtractConfig and RouteConfig
authorDimitrije Pavlov <dimitrije.pavlov@arm.com>
Thu, 18 Aug 2022 19:58:42 +0000 (14:58 -0500)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 5 Sep 2022 13:52:51 +0000 (13:52 +0000)
commitaefcc91805fd69e4aad4bc08a9f708db11cae5f0
tree21cae17d01ae6a051a08279a7ff05738b15f03cb
parent165b5bcd68e2c563f93f8f5121d20efeab939a6a
OvmfPkg/PlatformDxe: Handle all requests in ExtractConfig and RouteConfig

Per the UEFI specification, if the Request argument in
EFI_HII_CONFIG_ACCESS_PROTOCOL.ExtractConfig() is NULL or does not contain
any request elements, the implementation should return all of the settings
being abstracted for the particular ConfigHdr reference.

The current implementation returns EFI_INVALID_PARAMETER if Request is
NULL or does not contain any request elements. Instead, construct
a new ConfigRequest to handle these cases per the specification.

In addition, per the UEFI specification, if the Configuration argument in
EFI_HII_CONFIG_ACCESS_PROTOCOL.RouteConfig() has a ConfigHdr that
specifies a non-existing target, the implementation should return
EFI_NOT_FOUND.

The current implementation returns EFI_INVALID_PARAMETER if Configuration
has a non-existing target in ConfigHdr. Instead, perform a check and
return EFI_NOT_FOUND in this case.

Signed-off-by: Dimitrije Pavlov <Dimitrije.Pavlov@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
OvmfPkg/PlatformDxe/Platform.c
OvmfPkg/PlatformDxe/PlatformConfig.c
OvmfPkg/PlatformDxe/PlatformConfig.h