diff options
author | Pete Batard <pete@akeo.ie> | 2020-12-22 13:45:28 +0000 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@arm.com> | 2021-01-04 18:08:28 +0100 |
commit | 94e9fba43d7e132be3c582c676968a7f408072c1 (patch) | |
tree | 81d2b2e682af696e0ae40982e748946b31769b3b /Platform/RaspberryPi/RPi3 | |
parent | a34e27a1fa792c3c074cb602097c05dd3b54acda (diff) |
Platform/RaspberryPi: Add system/user defined reset delay
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>
Diffstat (limited to 'Platform/RaspberryPi/RPi3')
-rw-r--r-- | Platform/RaspberryPi/RPi3/RPi3.dsc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Platform/RaspberryPi/RPi3/RPi3.dsc b/Platform/RaspberryPi/RPi3/RPi3.dsc index 9408138d..530b4279 100644 --- a/Platform/RaspberryPi/RPi3/RPi3.dsc +++ b/Platform/RaspberryPi/RPi3/RPi3.dsc @@ -509,6 +509,12 @@ gRaspberryPiTokenSpaceGuid.PcdFanTemp|L"FanTemp"|gConfigDxeFormSetGuid|0x0|0
#
+ # Reset-related.
+ #
+
+ gRaspberryPiTokenSpaceGuid.PcdPlatformResetDelay|L"ResetDelay"|gRaspberryPiTokenSpaceGuid|0x0|0
+
+ #
# Common UEFI ones.
#
|