1 Resource Partitioning Auto gen script
2 =====================================
4 When a system integrator has to combine multiple software components
5 into one system, one of the crucial aspect is managing global resources.
7 System firmware helps protect Navigator Subsystem resource across different
8 hosts using firewalls. For this, a boardconfig needs to be passed to it
9 while booting up the system. The SDK comes with a default board cofig, which
10 caters to the SDK demos and applications.
12 However, for running customer applications, it will be necessary to modify
13 this boardconfig to suit the resource requirements of the desired applocation.
14 This host tool can is used for customizring the resource allocation
15 across different hosts in the system.
17 Typical RM board config file is described as an array of following data structure:
19 {
20 .start_resource = %d,
21 .num_resource = %d,
22 .type = RESASG_UTYPE (J721E_DEV_XXXX, RESASG_SUBTYPE_XXXXX),
23 .host_id = HOST_ID_XXXXXXXX,
24 }
26 *SYSFW-NAVSS-ResAssg.xlsx* is a simple Excel sheet which is easy to describe
27 the resource allocation across different hosts. Here, each cell represents
28 the count of resource (row) allocated to a host (col)
30 *RM-autogen.py* is a python script useful for automatically generating
31 the Resource partitioning data for different software components.
33 Setup
34 =====
36 * Install required packages by running `sudo apt-get install python-xlrd python-xlwt`
37 * Modify the excel sheet as per the usecase requirements
38 * Run the script `RM-autogen.py` to generate the entries for RM board config
39 * Update the board config data strucure `resasg_entries`
40 * Update the count of entries in board config data structure `resasg_entries_size`
42 Usage
43 =====
45 Use the --help option to get the latest information on the usage.
47 To generate the entries in the k3-image-gen boardconfig format, run following:
49 ./RM-autogen.py -s j721e -o entries.txt -f boardcfg_kig SYSFW-NAVSS-ResAssg.xlsx
51 To generate the entries in RTOS sciclient boardconfig format, run following:
53 ./RM-autogen.py -s j721e -o entries.txt -f boardcfg_sciclient SYSFW-NAVSS-ResAssg.xlsx
55 To print the assigned resource **per host_id**, use the --perhost option.
56 This is useful for syncing the PDK udma_rmcfg data structures easily
58 Use the **--share** option for sharing resources between two hosts.
59 This option will copy resource assignments of one host to other.
60 This is especially useful in case secure and non secure host_ids are
61 being used. e.g. u-boot uses secure host id for MCU_R5 and later the
62 SDK software uses non secure host_id
64 # For J721E, use --share HOST_ID_MCU_0_R5_0 HOST_ID_MCU_0_R5_1