mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-18 02:24:18 +00:00

Currently sptool generates a single blob containing all the Secure Partitions, with latest SPM implementation, it is desirable to have individual blobs for each Secure Partition. It allows to leverage packaging and parsing of SP on existing FIP framework. It also allows SP packages coming from different sources. This patch modifies sptool so that it takes number of SP payload pairs as input and generates number of SP blobs instead of a single blob. Each SP blob can optionally have its own header containing offsets and sizes of different payloads along with a SP magic number and version. It is also associated in FIP with a UUID, provided by SP owner. Usage example: sptool -i sp1.bin:sp1.dtb -o sp1.pkg -i sp2.bin:sp2.dtb -o sp2.pkg ... Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: Ie2db8e601fa1d4182d0a1d22e78e9533dce231bc
25 lines
457 B
C
25 lines
457 B
C
/*
|
|
* Copyright (c) 2018-2020, Arm Limited. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef SPTOOL_H
|
|
#define SPTOOL_H
|
|
|
|
#include <stdint.h>
|
|
|
|
/* 4 Byte magic name "SPKG" */
|
|
#define SECURE_PARTITION_MAGIC 0x474B5053
|
|
|
|
/* Header for a secure partition package. */
|
|
struct sp_pkg_header {
|
|
uint32_t magic;
|
|
uint32_t version;
|
|
uint32_t pm_offset;
|
|
uint32_t pm_size;
|
|
uint32_t img_offset;
|
|
uint32_t img_size;
|
|
};
|
|
|
|
#endif /* SPTOOL_H */
|