]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/CapsuleRuntimeDxe/Arm/CapsuleReset.c
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Universal / CapsuleRuntimeDxe / Arm / CapsuleReset.c
1 /** @file
2 ARM implementation of architecture specific routines related to
3 PersistAcrossReset capsules
4
5 Copyright (c) 2018, Linaro, Ltd. All rights reserved.<BR>
6 Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
7
8 SPDX-License-Identifier: BSD-2-Clause-Patent
9
10 **/
11
12 #include "CapsuleService.h"
13
14 /**
15 Whether the platform supports capsules that persist across reset. Note that
16 some platforms only support such capsules at boot time.
17
18 @return TRUE if a PersistAcrossReset capsule may be passed to UpdateCapsule()
19 at this time
20 FALSE otherwise
21 **/
22 BOOLEAN
23 IsPersistAcrossResetCapsuleSupported (
24 VOID
25 )
26 {
27 //
28 // ARM requires the capsule payload to be cleaned to the point of coherency
29 // (PoC), but only permits doing so using cache maintenance instructions that
30 // operate on virtual addresses. Since at runtime, we don't know the virtual
31 // addresses of the data structures that make up the scatter/gather list, we
32 // cannot perform the maintenance, and all we can do is give up.
33 //
34 return FeaturePcdGet (PcdSupportUpdateCapsuleReset) && !EfiAtRuntime ();
35 }
36