be called in bl31 to jump to the TEE OS and start the TEE OS.
When the TEE-OS image is started, a security monitoring mode call with ID
TEESMC_OPTEED_RETURN_ENTRY_DONE will be triggered. This call is used to inform the EL3
TEE OS image that the initialization has been completed, and then restore the CPU state to the
position of bl31_init to continue execution. bl31 traverses the linked list of all image information
recorded in bl2 to find the image of bl33 that needs to be executed. Then, by obtaining the information
of the bl33 image, set the CPU context of the next stage, exit el3 and enter the bl33 image to start
execution.
2.4 MA35D1 Platform Setting
The follow will describe MA35D1 platform setting in ATF. Build MA35D1 TFA will have three files:
bl2.bin, bl2.dtb and fip.bin
bl2.bin: Trusted Boot-loader.
bl2.dtb: bl2 device tree information.
fip.bin: Firmware Image Package. It includes bl31.bin, op-tee, and u-boot.bin
2.4.1 ma35d1.dtsi
Provide the platform relative information into device tree. Common setting is in ma35d1.dtsi. Different
setting is in ma35d1-xxx.dts.
Clock
Here is the device node sample the describes the attribute of clock controller.
clk: clock-controller@40460200 {
“compatible” and “reg” has to set as following example, otherwise the driver cannot function properly.
compatible = "nuvoton,ma35d1-clk", "syscon", "simple-mfd";
reg = <0x00000000 0x40460200 0x0 0x100>;
There are 6 PLLs in MA35D1, following entries defines their default clock rate and clock switch.
assigned-clocks = <&clk capll>, <&clk syspll>,
<&clk ddrpll>, <&clk apll>,
<&clk epll>, <&clk vpll>;
assigned-clock-rates =<800000000>, <180000000>,
<266000000>, <200000000>,
<500000000>, <150000000>;
“lxt-enable” is used to enable 32.768 kHz external low speed crystal. “rtc-pwrctl-enable” is used to
enable RTC power control. “set-ph8-ph9-hight” is used to set PH.8 and PH.9 internal pull high.
lxt-enable = <1>;
rtc-pwrctl-enable = <1>;
set-ph8-ph9-hight = <0>;
DDR
Here is the device node sample the describes the attribute of DDR controller.
ddr: ddr-controller {
“compatible” has to set as following example, need select the correct DDR type, otherwise the