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