Mistake on this page? Email us
pal_plat_update.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright 2016, 2017 ARM Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *******************************************************************************/
16 
17 
18 #ifndef PAL_PLAT_UPDATE_HEADER
19 #define PAL_PLAT_UPDATE_HEADER
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 #include "pal.h"
26 
27 
39 
40 
45 
51 
57 palStatus_t pal_plat_imageReserveSpace(palImageId_t imageId, size_t imageSize);
58 
59 
68 
75 palStatus_t pal_plat_imageWrite(palImageId_t imageId, size_t offset, palConstBuffer_t* chunk);
76 
83 
89 
98 palStatus_t pal_plat_imageGetDirectMemAccess(palImageId_t imageId, void** imagePtr, size_t* imageSizeInBytes);
99 
100 
109 palStatus_t pal_plat_imageReadToBuffer(palImageId_t imageId, size_t offset, palBuffer_t* chunk);
110 
115 
120 
125 
130 
131 
132 
133 
134 #endif /* SOURCE_PAL_IMPL_MODULES_UPDATE_PAL_PALT_UPDATE_H_ */
135 #ifdef __cplusplus
136 }
137 #endif
PAL. This file contains the general API to initiate and destroy the PAL component. This is part of the PAL service API.
Definition: pal_types.h:57
palStatus_t pal_plat_imageSetVersion(palImageId_t imageId, const palConstBuffer_t *version)
Update the image version of imageId.
palStatus_t pal_plat_imageInitAPI(palImageSignalEvent_t CBfunction)
Set the callback function that is called before the end of each API, except for imageGetDirectMemAcce...
Definition: pal_update.h:40
palStatus_t pal_plat_imageWriteHashToMemory(const palConstBuffer_t *const hashValue)
palStatus_t pal_plat_imageGetActiveVersion(palBuffer_t *version)
Retrieve the version of the active image to the version buffer with the size set to version bufferLen...
palStatus_t pal_plat_imageWrite(palImageId_t imageId, size_t offset, palConstBuffer_t *chunk)
Write data from a chunk buffer to an image.
palStatus_t pal_plat_imageFlush(palImageId_t imageId)
Flush the entire image data after writing ends for imageId.
palStatus_t pal_plat_imageGetMaxNumberOfImages(uint8_t *imageNumber)
Set the imageNumber to the number of available images. You can do this through the hard coded define ...
palStatus_t pal_plat_imageGetActiveHash(palBuffer_t *hash)
Retrieve the hash value of the active image to the hash buffer with the max size hash maxBufferLength...
Definition: pal_types.h:64
palStatus_t pal_plat_imageDeInit(void)
Clear all the resources used by the pal_update APIs.
void(* palImageSignalEvent_t)(palImageEvents_t event)
Definition: pal_update.h:71
palStatus_t pal_plat_imageSetHeader(palImageId_t imageId, palImageHeaderDeails_t *details)
Set up the details for the image header.
palStatus_t pal_plat_imageReadToBuffer(palImageId_t imageId, size_t offset, palBuffer_t *chunk)
Read the max of chunk maxBufferLength bytes from the imageId with relative offset and store it in chu...
uint32_t palImageId_t
Definition: pal_update.h:38
palStatus_t pal_plat_imageReserveSpace(palImageId_t imageId, size_t imageSize)
Claim space in the relevant storage region for imageId with the size of the image.
palStatus_t pal_plat_imageGetDirectMemAccess(palImageId_t imageId, void **imagePtr, size_t *imageSizeInBytes)
Verify whether the imageId is readable.
palStatus_t pal_plat_imageActivate(palImageId_t imageId)
Set the imageId to be the active image after device reset.
int32_t palStatus_t
Definition: pal_types.h:55