binman: Add support for TEE BL32
Add an entry for OP-TEE Trusted OS 'BL32' payload. This is required by platforms using Cortex-A cores with TrustZone technology. Signed-off-by: Roger Quadros <rogerq@kernel.org>
This commit is contained in:
parent
1e96643859
commit
dd0bb6313c
1
Makefile
1
Makefile
|
|
@ -1335,6 +1335,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
|
|||
-I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
|
||||
-I arch/$(ARCH)/dts -a of-list=$(CONFIG_OF_LIST) \
|
||||
-a atf-bl31-path=${BL31} \
|
||||
-a atf-bl32-path=${BL32} \
|
||||
-a default-dt=$(default_dt) \
|
||||
-a scp-path=$(SCP) \
|
||||
$(BINMAN_$(@F))
|
||||
|
|
|
|||
|
|
@ -25,6 +25,19 @@ about ATF.
|
|||
|
||||
|
||||
|
||||
Entry: atf-bl32: Entry containing an OP-TEE Trusted OS (TEE) BL32 blob
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Properties / Entry arguments:
|
||||
- atf-bl32-path: Filename of file to read into entry. This is typically
|
||||
called bl32.bin or bl32.elf
|
||||
|
||||
This entry holds the run-time firmware, typically started by U-Boot SPL.
|
||||
See the U-Boot README for your architecture or board for how to use it. See
|
||||
https://github.com/OP-TEE/optee_os for more information about OP-TEE.
|
||||
|
||||
|
||||
|
||||
Entry: blob: Entry containing an arbitrary binary blob
|
||||
------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
# SPDX-License-Identifier: GPL-2.0+
|
||||
# Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/
|
||||
#
|
||||
# Entry-type module for OP-TEE Trusted OS firmware blob
|
||||
#
|
||||
|
||||
from binman.etype.blob_named_by_arg import Entry_blob_named_by_arg
|
||||
|
||||
class Entry_atf_bl32(Entry_blob_named_by_arg):
|
||||
"""Entry containing an OP-TEE Trusted OS (TEE) BL32 blob
|
||||
|
||||
Properties / Entry arguments:
|
||||
- atf-bl32-path: Filename of file to read into entry. This is typically
|
||||
called bl32.bin or bl32.elf
|
||||
|
||||
This entry holds the run-time firmware, typically started by U-Boot SPL.
|
||||
See the U-Boot README for your architecture or board for how to use it. See
|
||||
https://github.com/OP-TEE/optee_os for more information about OP-TEE.
|
||||
"""
|
||||
def __init__(self, section, etype, node):
|
||||
super().__init__(section, etype, node, 'atf-bl32')
|
||||
self.external = True
|
||||
|
|
@ -76,6 +76,7 @@ FSP_M_DATA = b'fsp_m'
|
|||
FSP_S_DATA = b'fsp_s'
|
||||
FSP_T_DATA = b'fsp_t'
|
||||
ATF_BL31_DATA = b'bl31'
|
||||
ATF_BL32_DATA = b'bl32'
|
||||
SCP_DATA = b'scp'
|
||||
TEST_FDT1_DATA = b'fdt1'
|
||||
TEST_FDT2_DATA = b'test-fdt2'
|
||||
|
|
@ -178,6 +179,7 @@ class TestFunctional(unittest.TestCase):
|
|||
TestFunctional._MakeInputFile('compress', COMPRESS_DATA)
|
||||
TestFunctional._MakeInputFile('compress_big', COMPRESS_DATA_BIG)
|
||||
TestFunctional._MakeInputFile('bl31.bin', ATF_BL31_DATA)
|
||||
TestFunctional._MakeInputFile('bl32.bin', ATF_BL32_DATA)
|
||||
TestFunctional._MakeInputFile('scp.bin', SCP_DATA)
|
||||
|
||||
# Add a few .dtb files for testing
|
||||
|
|
@ -3672,6 +3674,11 @@ class TestFunctional(unittest.TestCase):
|
|||
data = self._DoReadFile('169_atf_bl31.dts')
|
||||
self.assertEqual(ATF_BL31_DATA, data[:len(ATF_BL31_DATA)])
|
||||
|
||||
def testPackBl32(self):
|
||||
"""Test that an image with an ATF BL32 binary can be created"""
|
||||
data = self._DoReadFile('170_atf_bl32.dts')
|
||||
self.assertEqual(ATF_BL32_DATA, data[:len(ATF_BL32_DATA)])
|
||||
|
||||
def testPackScp(self):
|
||||
"""Test that an image with an SCP binary can be created"""
|
||||
data = self._DoReadFile('172_scp.dts')
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
binman {
|
||||
size = <16>;
|
||||
|
||||
atf-bl32 {
|
||||
filename = "bl32.bin";
|
||||
};
|
||||
};
|
||||
};
|
||||
Loading…
Reference in New Issue