Go to the source code of this file.
Set the imageId to be the active image (after device reset).
- Parameters
-
Clear all the resources used by the pal_update APIs.
- Returns
- The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
Flush the entire image data after writing ends for imageId.
- Parameters
-
- Returns
- The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
Retrieve the hash value of the active image to hash buffer with max size hash maxBufferLength, and set the hash bufferLength to the hash size.
- Parameters
-
[out] | hash | The hash and actual size of hash read. |
Retrieve the version of the active image to version buffer with the size set to version bufferLength.
- Parameters
-
[out] | version | The version and actual size of version read. |
Verify whether the imageId is readable and set imagePtr to point to the beginning of the image in the memory and imageSizeInBytes to the image size. In case of failure sets imagePtr to NULL and returns the relevant palStatus_t error.
- Parameters
-
[in] | imageId | The image ID. |
[out] | imagePtr | A pointer to the start of the image. |
[out] | imageSizeInBytes | The size of the image. |
- Returns
- The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
palStatus_t pal_plat_imageGetMaxNumberOfImages |
( |
uint8_t * |
imageNumber | ) |
|
Set the imageNumber to the number of available images. You can do this through hard coded define inside the linker script.
- Parameters
-
[out] | imageNumber | The total number of images the system supports. |
- Returns
- The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
Set the callback function that is called before the end of each API (except imageGetDirectMemAccess).
- Parameters
-
[in] | CBfunction | A pointer to the callback function. |
- Returns
- The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
Read the max of chunk maxBufferLength bytes from the imageId with relative offset and store it in chunk buffer. Set the chunk bufferLength value to the actual number of bytes read. Note: Please use this API in case the image is not directly accessible via the imageGetDirectMemAccess function.
- Parameters
-
[in] | imageId | The image ID. |
[in] | offset | The offset to start reading from. |
[out] | chunk | The data and actual bytes read. |
Claim space in the relevant storage region for imageId with the size of the image.
- Parameters
-
[in] | imageId | The image ID. |
[in] | imageSize | The size of the images. |
- Returns
- The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
Set up the details for the image header. The data is written when the image write is called for the first time.
- Parameters
-
[in] | imageId | The image ID. |
[in] | details | The data needed to build the image header. |
- Returns
- The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
Update the image version of imageId to version written in version buffer with version bufferLength.
- Parameters
-
[in] | imageId | The image ID. |
[in] | version | The image version and its length. |
- Returns
- The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
Write the data in the chunk buffer with the size written in chunk bufferLength in the location of imageId adding the relative offset.
- Parameters
-
[in] | imageId | The image ID. |
[in] | offset | the relative offset to write the data into |
[in] | chunk | A pointer to struct containing the data and the data length to write. |
- Returns
- The status in the form of palStatus_t; PAL_SUCCESS(0) in case of success, a negative value indicating a specific error code in case of failure.
Write the dataId stored in dataBuffer to memory accessible to the bootloader. Currently, only HASH is available.
- Parameters
-
[in] | hashValue | The data and size of the HASH. |