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