1*fc54c7faSLiu Gang--------------------------------------- 2*fc54c7faSLiu GangSRIO and PCIE Boot on Corenet Platforms 3*fc54c7faSLiu Gang--------------------------------------- 4*fc54c7faSLiu Gang 5*fc54c7faSLiu GangFor some PowerPC processors with SRIO or PCIE interface, boot location can be 6*fc54c7faSLiu Gangconfigured to SRIO or PCIE by RCW. The processor booting from SRIO or PCIE can 7*fc54c7faSLiu Gangdo without flash for u-boot image, ucode and ENV. All the images can be fetched 8*fc54c7faSLiu Gangfrom another processor's memory space by SRIO or PCIE link connected between 9*fc54c7faSLiu Gangthem. 10*fc54c7faSLiu Gang 11*fc54c7faSLiu GangThis document describes the processes based on an example implemented on P4080DS 12*fc54c7faSLiu Gangplatforms and a RCW example with boot from SRIO or PCIE configuration. 13*fc54c7faSLiu Gang 14*fc54c7faSLiu GangEnvironment of the SRIO or PCIE boot: 15*fc54c7faSLiu Gang a) Master and slave can be SOCs in one board or SOCs in separate boards. 16*fc54c7faSLiu Gang b) They are connected with SRIO or PCIE links, whether 1x, 2x or 4x, and 17*fc54c7faSLiu Gang directly or through switch system. 18*fc54c7faSLiu Gang c) Only Master has NorFlash for booting, and all the Master's and Slave's 19*fc54c7faSLiu Gang U-Boot images, UCodes will be stored in this flash. 20*fc54c7faSLiu Gang d) Slave has its own EEPROM for RCW and PBI. 21*fc54c7faSLiu Gang e) Slave's RCW should configure the SerDes for SRIO or PCIE boot port, set 22*fc54c7faSLiu Gang the boot location to SRIO or PCIE, and holdoff all the cores. 23*fc54c7faSLiu Gang 24*fc54c7faSLiu Gang ---------- ----------- ----------- 25*fc54c7faSLiu Gang | | | | | | 26*fc54c7faSLiu Gang | | | | | | 27*fc54c7faSLiu Gang | NorFlash|<----->| Master |SRIO or PCIE | Slave |<---->[EEPROM] 28*fc54c7faSLiu Gang | | | |<===========>| | 29*fc54c7faSLiu Gang | | | | | | 30*fc54c7faSLiu Gang ---------- ----------- ----------- 31*fc54c7faSLiu Gang 32*fc54c7faSLiu GangThe example based on P4080DS platform: 33*fc54c7faSLiu Gang Two P4080DS platforms can be used to implement the boot from SRIO or PCIE. 34*fc54c7faSLiu Gang Their SRIO or PCIE ports 1 will be connected directly and will be used for 35*fc54c7faSLiu Gang the boot from SRIO or PCIE. 36*fc54c7faSLiu Gang 37*fc54c7faSLiu Gang 1. Slave's RCW example for boot from SRIO port 1 and all cores in holdoff. 38*fc54c7faSLiu Gang 00000000: aa55 aa55 010e 0100 0c58 0000 0000 0000 39*fc54c7faSLiu Gang 00000010: 1818 1818 0000 8888 7440 4000 0000 2000 40*fc54c7faSLiu Gang 00000020: f440 0000 0100 0000 0000 0000 0000 0000 41*fc54c7faSLiu Gang 00000030: 0000 0000 0083 0000 0000 0000 0000 0000 42*fc54c7faSLiu Gang 00000040: 0000 0000 0000 0000 0813 8040 063c 778f 43*fc54c7faSLiu Gang 44*fc54c7faSLiu Gang 2. Slave's RCW example for boot from PCIE port 1 and all cores in holdoff. 45*fc54c7faSLiu Gang 00000000: aa55 aa55 010e 0100 0c58 0000 0000 0000 46*fc54c7faSLiu Gang 00000010: 1818 1818 0000 8888 1440 4000 0000 2000 47*fc54c7faSLiu Gang 00000020: f040 0000 0100 0000 0020 0000 0000 0000 48*fc54c7faSLiu Gang 00000030: 0000 0000 0083 0000 0000 0000 0000 0000 49*fc54c7faSLiu Gang 00000040: 0000 0000 0000 0000 0813 8040 547e ffc9 50*fc54c7faSLiu Gang 51*fc54c7faSLiu Gang 3. Sequence in Step by Step. 52*fc54c7faSLiu Gang a) Update RCW for slave with boot from SRIO or PCIE port 1 configuration. 53*fc54c7faSLiu Gang b) Program slave's U-Boot image, UCode, and ENV parameters into master's 54*fc54c7faSLiu Gang NorFlash. 55*fc54c7faSLiu Gang c) Set environment variable "bootmaster" to "SRIO1" or "PCIE1" and save 56*fc54c7faSLiu Gang environment for master. 57*fc54c7faSLiu Gang setenv bootmaster SRIO1 58*fc54c7faSLiu Gang or 59*fc54c7faSLiu Gang setenv bootmaster PCIE1 60*fc54c7faSLiu Gang saveenv 61*fc54c7faSLiu Gang d) Restart up master and it will boot up normally from its NorFlash. 62*fc54c7faSLiu Gang Then, it will finish necessary configurations for slave's boot from 63*fc54c7faSLiu Gang SRIO or PCIE port 1. 64*fc54c7faSLiu Gang e) Master will set inbound SRIO or PCIE windows covered slave's U-Boot 65*fc54c7faSLiu Gang image stored in master's NorFlash. 66*fc54c7faSLiu Gang f) Master will set an inbound SRIO or PCIE window covered slave's UCode 67*fc54c7faSLiu Gang and ENV stored in master's NorFlash. 68*fc54c7faSLiu Gang g) Master will set outbound SRIO or PCIE windows in order to configure 69*fc54c7faSLiu Gang slave's registers for the core's releasing. 70*fc54c7faSLiu Gang h) Since all cores of slave in holdoff, slave should be powered on before 71*fc54c7faSLiu Gang all the above master's steps, and wait to be released by master. In the 72*fc54c7faSLiu Gang startup phase of the slave from SRIO or PCIE, it will finish some 73*fc54c7faSLiu Gang necessary configurations. 74*fc54c7faSLiu Gang i) Slave will set a specific TLB entry for the boot process. 75*fc54c7faSLiu Gang j) Slave will set a LAW entry with the TargetID SRIO or PCIE port 1 for 76*fc54c7faSLiu Gang the boot. 77*fc54c7faSLiu Gang k) Slave will set a specific TLB entry in order to fetch UCode and ENV 78*fc54c7faSLiu Gang from master. 79*fc54c7faSLiu Gang l) Slave will set a LAW entry with the TargetID SRIO or PCIE port 1 for 80*fc54c7faSLiu Gang UCode and ENV. 81*fc54c7faSLiu Gang 82*fc54c7faSLiu GangHow to use this feature: 83*fc54c7faSLiu Gang To use this feature, you need to focus those points. 84*fc54c7faSLiu Gang 85*fc54c7faSLiu Gang 1. Slave's RCW with SRIO or PCIE boot configurations, and all cores in holdoff 86*fc54c7faSLiu Gang configurations. 87*fc54c7faSLiu Gang Please refer to the examples given above. 88*fc54c7faSLiu Gang 89*fc54c7faSLiu Gang 2. U-Boot image's compilation. 90*fc54c7faSLiu Gang For master, U-Boot image should be generated normally. 91*fc54c7faSLiu Gang 92*fc54c7faSLiu Gang For example, master U-Boot image used on P4080DS should be compiled with 93*fc54c7faSLiu Gang 94*fc54c7faSLiu Gang make P4080DS_config. 95*fc54c7faSLiu Gang 96*fc54c7faSLiu Gang For slave, U-Boot image should be generated specifically by 97*fc54c7faSLiu Gang 98*fc54c7faSLiu Gang make xxxx_SRIO_PCIE_BOOT_config. 99*fc54c7faSLiu Gang 100*fc54c7faSLiu Gang For example, slave U-Boot image used on P4080DS should be compiled with 101*fc54c7faSLiu Gang 102*fc54c7faSLiu Gang make P4080DS_SRIO_PCIE_BOOT_config. 103*fc54c7faSLiu Gang 104*fc54c7faSLiu Gang 3. Necessary modifications based on a specific environment. 105*fc54c7faSLiu Gang For a specific environment, the addresses of the slave's U-Boot image, 106*fc54c7faSLiu Gang UCode, ENV stored in master's NorFlash, and any other configurations 107*fc54c7faSLiu Gang can be modified in the file: 108*fc54c7faSLiu Gang include/configs/corenet_ds.h. 109*fc54c7faSLiu Gang 110*fc54c7faSLiu Gang 4. Set and save the environment variable "bootmaster" with "SRIO1", "SRIO2" 111*fc54c7faSLiu Gang or "PCIE1", "PCIE2", "PCIE3" for master, and then restart it in order to 112*fc54c7faSLiu Gang perform the role as a master for boot from SRIO or PCIE. 113