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