]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/CapsuleRuntimeDxe/Arm/CapsuleReset.c
IntelSiliconPkg: 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
AB
7\r
8 This program and the accompanying materials are licensed and made available\r
9 under the terms and conditions of the BSD License which accompanies this\r
10 distribution. The full text of the license may be found at\r
11 http://opensource.org/licenses/bsd-license.php\r
12\r
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
15\r
16**/\r
17\r
18#include "CapsuleService.h"\r
19\r
e077a93d
AB
20/**\r
21 Whether the platform supports capsules that persist across reset. Note that\r
22 some platforms only support such capsules at boot time.\r
23\r
24 @return TRUE if a PersistAcrossReset capsule may be passed to UpdateCapsule()\r
25 at this time\r
26 FALSE otherwise\r
27**/\r
28BOOLEAN\r
29IsPersistAcrossResetCapsuleSupported (\r
30 VOID\r
31 )\r
32{\r
33 //\r
34 // ARM requires the capsule payload to be cleaned to the point of coherency\r
35 // (PoC), but only permits doing so using cache maintenance instructions that\r
36 // operate on virtual addresses. Since at runtime, we don't know the virtual\r
37 // addresses of the data structures that make up the scatter/gather list, we\r
38 // cannot perform the maintenance, and all we can do is give up.\r
39 //\r
40 return FeaturePcdGet (PcdSupportUpdateCapsuleReset) && !EfiAtRuntime ();\r
41}\r
42\r