ZynqMP PMU Firmware Code Size Management

Introduction

ZynqMP PMU module has limited in-built memory of 128KB. ZynqMP provides a lot of features for the user to choose based on the customer application. These all features can't fit into 128KB memory. So Xilinx recommends to use following features to reduce the code size of PMU and fit it into 128KB.

Code Optimization

Xilinx uses following compiler options to optimize the code. Don't disable these compiler options.

Compiler options

-Os -flto -ffat-lto-objects

Code Selection

The user can enable/disable following features. When the user enables the feature, it adds the code of that feature to PMU firmware. Following table gives the list of features available for inclusion/exclusion from PMU firmware and memory each feature occupies if included in PMU firmware. The macro names used to enable/disable the feature is given in bracket under PMU feature column. For example to enable CRC for IPI communication macro ENABLE_IPI_CRC_VAL should be set to 1U, to disable XilFpga macro FPGA_LOAD_VAL should be set to 0U. These macros are defined in PMU firmware file xpfw_config.h.


#


PMU Feature

Default

Option


Dependency

~Size in KB
2018.32019.12019.2
1Basic PMUFW (All macros Disabled)

15.851562520.3906
2Error Manager (ENABLE_EM_VAL)Disabled
3.16406253.0625
3Scheduler (ENABLE_SCHEDULER_VAL)Disabled
0.3281250.29688
4XilFpga (ENABLE_FPGA_LOAD_VAL)Enabled

Power Management (ENABLE_PM_VAL)

XilSecure (ENABLE_SECURE_VAL)

9.6328125
9.171855
5XilSecure (ENABLE_SECURE_VAL)Enabled

Power Management (ENABLE_PM_VAL)

21.929687520.2813
6

STL (ENABLE_STL_VAL) (Register Coverage)

Disabled

Power Management (ENABLE_PM_VAL)

4.9218754.75781
7WDT(ENABLE_WDT_VAL)DisabledScheduler (ENABLE_SCHEDULER_VAL)1.11718751.03125
8CRC for IPI communication (ENABLE_IPI_CRC_VAL)Disabled
0.2343750.09375
9Platform Management (ENABLE_PM_VAL)Enabled
64.562565.375
10WDT based restart of APU sub-system (ENABLE_RECOVERY_VAL)DisabledPower Management (ENABLE_PM_VAL)0.6718750.65625
11WDT based restart of system (ENABLE_RECOVERY_RESET_SYSTEM_VAL)Disabled

Power Management (ENABLE_PM_VAL), ENABLE_RECOVERY

00
12WDT based restart of PS
(ENABLE_RECOVERY_RESET_PS_ONLY_VAL)
DisabledPower Management (ENABLE_PM_VAL), ENABLE_RECOVERY00
13Escalation of sub-system restart to SRST/PS-only if the first restart attempt fails (ENABLE_ESCALATION_VAL)DisabledPower Management (ENABLE_PM_VAL), ENABLE_RECOVERY00
14Check Healthy boot (CHECK_HEALTHY_BOOT_VAL)DisabledPower Management (ENABLE_PM_VAL), ENABLE_RECOVERY0.0156250.03125
15Idling peripherals before PS or System reset (IDLE_PERIPHERALS_VAL)DisabledPower Management (ENABLE_PM_VAL)0.031250.04688
16Enables idling and reset of nodes before force power down of subsystem (ENABLE_NODE_IDLING_VAL)DisabledPower Management (ENABLE_PM_VAL)3.7656253.95313
17Enable Power Off Suspend feature(ENABLE_POS_VAL)DisabledPower Management (ENABLE_PM_VAL)10.804687510.4063
18RTC Test (ENABLE_RTC_TEST_VAL)Disabled
0.2343750.23438
19Enable unused RPU power down feature (ENABLE_UNUSED_RPU_PWR_DWN_VAL)EnabledPower Management (ENABLE_PM_VAL)0.3281250.29688
20CONNECT_PMU_GPO_2_VALEnabledPower Management (ENABLE_PM_VAL)
0.01563
21CONNECT_PMU_GPO_3_VALEnabledPower Management (ENABLE_PM_VAL)
0.046875
22CONNECT_PMU_GPO_4_VALEnabledPower Management (ENABLE_PM_VAL)
0.04688
23CONNECT_PMU_GPO_5_VALEnabledPower Management (ENABLE_PM_VAL)
0.04688
24Xilskey (ENABLE_EFUSE_ACCESS)DisabledPower Management (ENABLE_PM_VAL)10.773437510.5313
25Enable DDR self refresh over warm restart feature (ENABLE_DDR_SR_WR_VAL)DisabledPower Management (ENABLE_PM_VAL)0.5156250.5625
26Disable clock permission checking (DISABLE_CLK_PERMS_VAL)DisabledPower Management (ENABLE_PM_VAL)-0.1875-0.1719
27Enable board shutdown related code for ZCU100 (PMU_MIO_INPUT_PIN_VAL)DisabledPower Management (ENABLE_PM_VAL)0.2343750.20313
28Tell Board shutdown pin and state (BOARD_SHUTDOWN_PIN_VAL),(BOARD_SHUTDOWN_PIN_STATE_VAL)DisabledPower Management (ENABLE_PM_VAL)0.0468750.0625
29Secure Access to PMU Global registers (SECURE_ACCESS_VAL)DisabledPower Management (ENABLE_PM_VAL)0.6015630.60156
Total PMU Firmware Size with all default features112.3046875
115.6719

Table of Content