arm-trusted-firmware/include/tools_share/sptool.h
Manish Pandey 3977a82564 SPM: modify sptool to generate individual SP blobs
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
2020-02-10 11:51:19 +00:00

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 */