1702e6014SWolfgang DenkOverview 2702e6014SWolfgang Denk-------- 3702e6014SWolfgang DenkMPC8572DS is a high-performance computing, evaluation and development platform 4702e6014SWolfgang Denksupporting the mpc8572 PowerTM processor. 5702e6014SWolfgang Denk 6*a187559eSBin MengBuilding U-Boot 7702e6014SWolfgang Denk----------- 8702e6014SWolfgang Denk make MPC8572DS_config 9702e6014SWolfgang Denk make 10702e6014SWolfgang Denk 11702e6014SWolfgang DenkFlash Banks 12702e6014SWolfgang Denk----------- 13702e6014SWolfgang DenkMPC8572DS board has two flash banks. They are both present on boot, but their 14702e6014SWolfgang Denklocations can be swapped using the dip-switch SW9[1:2]. 15702e6014SWolfgang Denk 16702e6014SWolfgang DenkBooting is always from the boot bank at 0xec00_0000. 17702e6014SWolfgang Denk 18702e6014SWolfgang Denk 19702e6014SWolfgang DenkMemory Map 20702e6014SWolfgang Denk---------- 21702e6014SWolfgang Denk 22702e6014SWolfgang Denk0xe800_0000 - 0xebff_ffff Alternate bank 64MB 23702e6014SWolfgang Denk0xec00_0000 - 0xefff_ffff Boot bank 64MB 24702e6014SWolfgang Denk 25*a187559eSBin Meng0xebf8_0000 - 0xebff_ffff Alternate U-Boot address 512KB 26*a187559eSBin Meng0xeff8_0000 - 0xefff_ffff Boot U-Boot address 512KB 27702e6014SWolfgang Denk 28702e6014SWolfgang Denk 29702e6014SWolfgang DenkFlashing Images 30702e6014SWolfgang Denk--------------- 31702e6014SWolfgang Denk 32*a187559eSBin MengTo place a new U-Boot image in the alternate flash bank and then reset with that 33702e6014SWolfgang Denk new image temporarily, use this: 34702e6014SWolfgang Denk 35702e6014SWolfgang Denk tftp 1000000 u-boot.bin 36702e6014SWolfgang Denk erase ebf80000 ebffffff 37702e6014SWolfgang Denk cp.b 1000000 ebf80000 80000 38702e6014SWolfgang Denk pixis_reset altbank 39702e6014SWolfgang Denk 40702e6014SWolfgang Denk 41702e6014SWolfgang DenkTo program the image in the boot flash bank: 42702e6014SWolfgang Denk 43702e6014SWolfgang Denk tftp 1000000 u-boot.bin 44702e6014SWolfgang Denk protect off all 45702e6014SWolfgang Denk erase eff80000 ffffffff 46702e6014SWolfgang Denk cp.b 1000000 eff80000 80000 47702e6014SWolfgang Denk 48702e6014SWolfgang Denk 49702e6014SWolfgang DenkThe pixis_reset command 50702e6014SWolfgang Denk----------------------- 51702e6014SWolfgang DenkThe command - "pixis_reset", is introduced to reset mpc8572ds board 52702e6014SWolfgang Denkusing the FPGA sequencer. When the board restarts, it has the option 53702e6014SWolfgang Denkof using either the current or alternate flash bank as the boot 54702e6014SWolfgang Denkimage, with or without the watchdog timer enabled, and finally with 55702e6014SWolfgang Denkor without frequency changes. 56702e6014SWolfgang Denk 57702e6014SWolfgang DenkUsage is; 58702e6014SWolfgang Denk 59702e6014SWolfgang Denk pixis_reset 60702e6014SWolfgang Denk pixis_reset altbank 61702e6014SWolfgang Denk pixis_reset altbank wd 62702e6014SWolfgang Denk pixis_reset altbank cf <SYSCLK freq> <COREPLL ratio> <MPXPLL ratio> 63702e6014SWolfgang Denk pixis_reset cf <SYSCLK freq> <COREPLL ratio> <MPXPLL ratio> 64702e6014SWolfgang Denk 65702e6014SWolfgang DenkExamples: 66702e6014SWolfgang Denk 67702e6014SWolfgang Denk /* reset to current bank, like "reset" command */ 68702e6014SWolfgang Denk pixis_reset 69702e6014SWolfgang Denk 70702e6014SWolfgang Denk /* reset board but use the to alternate flash bank */ 71702e6014SWolfgang Denk pixis_reset altbank 72702e6014SWolfgang Denk 73702e6014SWolfgang Denk 74702e6014SWolfgang DenkUsing the Device Tree Source File 75702e6014SWolfgang Denk--------------------------------- 76702e6014SWolfgang DenkTo create the DTB (Device Tree Binary) image file, 77702e6014SWolfgang Denkuse a command similar to this: 78702e6014SWolfgang Denk 79702e6014SWolfgang Denk dtc -b 0 -f -I dts -O dtb mpc8572ds.dts > mpc8572ds.dtb 80702e6014SWolfgang Denk 81702e6014SWolfgang DenkLikely, that .dts file will come from here; 82702e6014SWolfgang Denk 83702e6014SWolfgang Denk linux-2.6/arch/powerpc/boot/dts/mpc8572ds.dts 84702e6014SWolfgang Denk 85702e6014SWolfgang Denk 86702e6014SWolfgang DenkBooting Linux 87702e6014SWolfgang Denk------------- 88702e6014SWolfgang Denk 89702e6014SWolfgang DenkPlace a linux uImage in the TFTP disk area. 90702e6014SWolfgang Denk 91702e6014SWolfgang Denk tftp 1000000 uImage.8572 92702e6014SWolfgang Denk tftp c00000 mpc8572ds.dtb 93702e6014SWolfgang Denk bootm 1000000 - c00000 94702e6014SWolfgang Denk 95702e6014SWolfgang Denk 96702e6014SWolfgang DenkImplementing AMP(Asymmetric MultiProcessing) 97702e6014SWolfgang Denk------------- 98702e6014SWolfgang Denk1. Build kernel image for core0: 99702e6014SWolfgang Denk 100702e6014SWolfgang Denk a. $ make 85xx/mpc8572_ds_defconfig 101702e6014SWolfgang Denk 102702e6014SWolfgang Denk b. $ make menuconfig 103702e6014SWolfgang Denk - un-select "Processor support"->"Symetric multi-processing support" 104702e6014SWolfgang Denk 105702e6014SWolfgang Denk c. $ make uImage 106702e6014SWolfgang Denk 107702e6014SWolfgang Denk d. $ cp arch/powerpc/boot/uImage /tftpboot/uImage.core0 108702e6014SWolfgang Denk 109702e6014SWolfgang Denk2. Build kernel image for core1: 110702e6014SWolfgang Denk 111702e6014SWolfgang Denk a. $ make 85xx/mpc8572_ds_defconfig 112702e6014SWolfgang Denk 113702e6014SWolfgang Denk b. $ make menuconfig 114702e6014SWolfgang Denk - Un-select "Processor support"->"Symetric multi-processing support" 115702e6014SWolfgang Denk - Select "Advanced setup" -> " Prompt for advanced kernel 116702e6014SWolfgang Denk configuration options" 117702e6014SWolfgang Denk - Select "Set physical address where the kernel is loaded" and 118702e6014SWolfgang Denk set it to 0x20000000, assuming core1 will start from 512MB. 119702e6014SWolfgang Denk - Select "Set custom page offset address" 120702e6014SWolfgang Denk - Select "Set custom kernel base address" 121702e6014SWolfgang Denk - Select "Set maximum low memory" 122702e6014SWolfgang Denk - "Exit" and save the selection. 123702e6014SWolfgang Denk 124702e6014SWolfgang Denk c. $ make uImage 125702e6014SWolfgang Denk 126702e6014SWolfgang Denk d. $ cp arch/powerpc/boot/uImage /tftpboot/uImage.core1 127702e6014SWolfgang Denk 128702e6014SWolfgang Denk3. Create dtb for core0: 129702e6014SWolfgang Denk 130702e6014SWolfgang Denk $ dtc -I dts -O dtb -f -b 0 arch/powerpc/boot/dts/mpc8572ds_core0.dts > /tftpboot/mpc8572ds_core0.dtb 131702e6014SWolfgang Denk 132702e6014SWolfgang Denk4. Create dtb for core1: 133702e6014SWolfgang Denk 134702e6014SWolfgang Denk $ dtc -I dts -O dtb -f -b 1 arch/powerpc/boot/dts/mpc8572ds_core1.dts > /tftpboot/mpc8572ds_core1.dtb 135702e6014SWolfgang Denk 136702e6014SWolfgang Denk5. Bring up two cores separately: 137702e6014SWolfgang Denk 138*a187559eSBin Meng a. Power on the board, under U-Boot prompt: 139702e6014SWolfgang Denk => setenv <serverip> 140702e6014SWolfgang Denk => setenv <ipaddr> 141702e6014SWolfgang Denk => setenv bootargs root=/dev/ram rw console=ttyS0,115200 142702e6014SWolfgang Denk b. Bring up core1's kernel first: 143702e6014SWolfgang Denk => setenv bootm_low 0x20000000 144702e6014SWolfgang Denk => setenv bootm_size 0x10000000 145702e6014SWolfgang Denk => tftp 21000000 8572/uImage.core1 146702e6014SWolfgang Denk => tftp 22000000 8572/ramdiskfile 147702e6014SWolfgang Denk => tftp 20c00000 8572/mpc8572ds_core1.dtb 148702e6014SWolfgang Denk => interrupts off 149702e6014SWolfgang Denk => bootm start 21000000 22000000 20c00000 150702e6014SWolfgang Denk => bootm loados 151702e6014SWolfgang Denk => bootm ramdisk 152702e6014SWolfgang Denk => bootm fdt 153702e6014SWolfgang Denk => fdt boardsetup 154702e6014SWolfgang Denk => fdt chosen $initrd_start $initrd_end 155702e6014SWolfgang Denk => bootm prep 156702e6014SWolfgang Denk => cpu 1 release $bootm_low - $fdtaddr - 157*a187559eSBin Meng c. Bring up core0's kernel(on the same U-Boot console): 158702e6014SWolfgang Denk => setenv bootm_low 0 159702e6014SWolfgang Denk => setenv bootm_size 0x20000000 160702e6014SWolfgang Denk => tftp 1000000 8572/uImage.core0 161702e6014SWolfgang Denk => tftp 2000000 8572/ramdiskfile 162702e6014SWolfgang Denk => tftp c00000 8572/mpc8572ds_core0.dtb 163702e6014SWolfgang Denk => bootm 1000000 2000000 c00000 164702e6014SWolfgang Denk 165*a187559eSBin MengPlease note only core0 will run U-Boot, core1 starts kernel directly after 166702e6014SWolfgang Denk"cpu release" command is issued. 167