You've already forked edk2-platforms
mirror of
https://github.com/Dasharo/edk2-platforms.git
synced 2026-03-06 14:51:43 -08:00
Due to the method in which NV variables are stored on removable media for the Raspberry Pi platform, and the manner in which we dump updated variables right before reset, it is possible, and has been repeatedly demonstrated with SSD-based USB 3.0 devices, that the updated file does not actually end up being written to permanent storage, due to the device write-cache not having enough time to be flushed before reset. To compensate for this, since we don't know of a generic method that would allow turning off USB mass storage devices write cache (and also because we are seeing an issue that seems related for SD-based media), we add a new reset delay PCD, which can be set by the user, and which we also set as required when NV variables are being dumped. Our testing show that, with more than 3 seconds of extra delay, the storage media has enough time to finalize its internal write, thus solving the issue of configuration changes not being persisted. Signed-off-by: Pete Batard <pete@akeo.ie> Reviewed-by: Andrei Warkentin <awarkentin@vmware.com> Tested-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
46 lines
1.1 KiB
INI
46 lines
1.1 KiB
INI
#/** @file
|
|
#
|
|
# Reset System lib using PSCI hypervisor or secure monitor calls.
|
|
# Signals the gRaspberryPiEventResetGuid event group on reset.
|
|
#
|
|
# Copyright (c) 2018, Andrei Warkentin <andrey.warkentin@gmail.com>
|
|
# Copyright (c) 2014, Linaro Ltd. All rights reserved.
|
|
# Copyright (c) 2014, ARM Ltd. All rights reserved.
|
|
# Copyright (c) 2008, Apple Inc. All rights reserved.
|
|
#
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
#
|
|
#**/
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x0001001A
|
|
BASE_NAME = ResetLib
|
|
FILE_GUID = B9F59B69-A105-41C7-8F5A-2C60DD7FD7AB
|
|
MODULE_TYPE = BASE
|
|
VERSION_STRING = 1.0
|
|
LIBRARY_CLASS = EfiResetSystemLib
|
|
|
|
[Sources]
|
|
ResetLib.c
|
|
|
|
[Packages]
|
|
ArmPkg/ArmPkg.dec
|
|
MdePkg/MdePkg.dec
|
|
EmbeddedPkg/EmbeddedPkg.dec
|
|
Platform/RaspberryPi/RaspberryPi.dec
|
|
|
|
[LibraryClasses]
|
|
DebugLib
|
|
BaseLib
|
|
ArmSmcLib
|
|
PcdLib
|
|
TimerLib
|
|
UefiLib
|
|
UefiRuntimeLib
|
|
|
|
[Guids]
|
|
gRaspberryPiEventResetGuid
|
|
|
|
[Pcd]
|
|
gRaspberryPiTokenSpaceGuid.PcdPlatformResetDelay ## CONSUMES
|