Hi all,
How to configure u-boot to boot in AMP mode? I need to boot Linux on each core separately, i have configured the linux kernel and prepared the Device Tree Blob for each core but how can i boot ASMP linux on each core? Do we need to boot u-boot first in ASMP mode and seperately give the bootm command through separate serial port or run u-boot in smp mode and modify bootm command to boot AMP linux?
Any pointer to or around it will be really helpfull.
Thanks & Regards
@$hi$h
Hi Yiping Wang,
I have set the following parameters in Linux kernel
Set physical address where the kernel is loaded set it to 0x10000000
[*] Set custom page offset address
0xd0000000
[*] Set custom kernel base address
0xd0000000
[*] Set maximum low memory
0xd0000000
After uImage and dtb build I ran the following command on u-boot:
setenv bootm_low 0x10000000
setenv bootm_size 0x8000000
tftp 11000000 uImage.core1
tftp 12000000 rootfs_min.ext2.gz.uboot
tftp 10c00000 <platform>_camp_core1.dtb
interrupts off (for this it saying unrecognized command)
bootm start 11000000 12000000 10c00000
bootm loados (when I ran this command the current drops and freezes at Uncompressing Kernel Image ....)
Here is the snapshot what happened:
BOSSv2.0=> bootm start 11000000 12000000 10c00000
## Booting kernel from Legacy Image at 11000000 ...
Image Name: Linux-3.14.0
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 2803453 Bytes = 2.7 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 12000000 ...
Image Name: rootfs
Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
Data Size: 5733110 Bytes = 5.5 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 10c00000
Booting using the fdt blob at 0x10c00000
BOSSv2.0=> bootm loados
Uncompressing Kernel Image ...
why its freezing at uncompressing Kernel Image? I tried with device tree it successfully uncompressed? Do I need to update u-boot?
u-boot runs on core0 and u-boot code is located on the top address of DDR, in order not to conflict with u-boot code, please try to use this way, setup core1 at low address first, then boot core 0 at high address.
For example,
Bring up core1's kernel first:
=> setenv bootm_low 0x0
=> setenv bootm_size 0x10000000
=> tftp 1000000 uImage.core1
=> tftp 2000000 ramdiskfile
=> tftp c00000 <platform>.core1.dtb
=> interrupts off
=> bootm start 1000000 2000000 c00000
=> bootm loados
=> bootm ramdisk
=> bootm fdt
=> fdt boardsetup
=> fdt chosen $initrd_start $initrd_end
=> bootm prep
=> cpu 1 release $bootm_low - $fdtaddr -
Bring up core0's Kernel(on the same u-boot console)
=> setenv bootm_low 0x10000000
=> setenv bootm_size 0x10000000
=> tftp 11000000 uImage.core0
=> tftp 12000000 ramdiskfile
=> tftp 10c00000 p2020ds.core0.dtb
=> bootm 11000000 12000000 10c00000
Please configure core0's physical address where the kernel is loaded at 0x10000000 and other parameters kept kept as the default.
Have a great day,
Yiping Wang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
According to MPC8641D Linux User manual, I think you need to choose the first option, booting u-boot first in ASMP mode and separately give the bootm command through separate serial port.
First please switch the system to the ASMP mode, please switch the SW5[6] on the Ver.1.03 board to OFF and connect the J1 header in the board to the second Serial Port. On the Ver.1.02 board, please turn the ASMP/SMP swtich to ASMP side. The switch is under the label “SMP – ASMP”.
In ASMP mode, core 0 U-Boot will boot up from Serial Port 1 with eTSEC1, eTSEC3 and the first PCI Express bus, core 1 U-Boot will boot up from Serial Port 2 with eTSEC2 and eTSEC4 and the second PCI Express bus (PCI Express slot).
Power on or reset the system, the board will boot up completely for ASMP mode. The console of core 0 is on Serial Port 1 and the console of core 1 is on Serial Port 2. The core 0 kernel could use the harddisk RFS for its root file system and core1 use ramdisk boot.
Then run different commands at core0 and core1 in U-Boot prompt:
Core0:
=> run asmpboot0
Core1:
=> run asmpboot1
u-boot environment is as the following.
=> setenv boothdno 0
=> setenv bootpartition 3
=> setenv rfsdev /dev/sda3
=> setenv bootfile /boot/uImage
=> setenv dtbfile /boot/mpc8641_hpcn.dtb
=> setenv loadimage ‘ext2load scsi $boothdno:$bootpartition $loadaddr $bootfile;ext2load scsi $boothdno:$bootpartition $dtbaddr $dtbfile'
=> setenv sethdbootarg ‘setenv bootargs root=$rfsdev console=$consoledev,$baudrate $othbootargs’
=> setenv hdboot 'run loadimage;bootm $loadaddr - $dtbaddr'
=> setenv bootfilecore0 /boot/uImage.asmp
=> setenv bootfilecore1 <your_asmp_uImage>
=> setenv asmpboot0 'set bootfile $bootfilecore0; set dtbfile $dtbcore0; run sethdbootarg; run hdboot'
=> setenv asmpboot1 'set bootfile $bootfilecore1; set dtbfile $dtbcore1; run ramboot'
Have a great day,
Yiping Wang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks a lot for your reply. I have been running the u-boot-2013.04 version and In this when I am enabling ASMP boot its only boot from core0 and for core1 it displays "Core1 Translation Enabled". so the newer version of u-boot does not support ASMP booting on mpc8641 based board? which version of u-boot supports ASMP booting?
The above information is according to u-boot 1.3.0 in Linux BSP MPC8641DHPCN_20080118_Minimal-ltib.iso.
If you use new version u-boot, please try whether you could use the following procedure for AMP.
1. Bring up core1's kernel first:
=> setenv bootm_low 0x10000000
=> setenv bootm_size 0x8000000
=> tftp 11000000 uImage.core1
=> tftp 12000000 rootfs_min.ext2.gz.uboot
=> tftp 10c00000 <platform>_camp_core1.dtb
=> interrupts off
=> bootm start 11000000 12000000 10c00000
=> bootm loados
=> bootm ramdisk
=> bootm fdt
=> fdt boardsetup
=> fdt chosen $initrd_start $initrd_end
=> bootm prep
=> cpu 1 release $bootm_low - $fdtaddr -
As soon as, when you run the cpu 1 release $bootm_low - $fdtaddr - command, Core-1 starts booting
and boot-up log can be observed on the UART#2 console.
2. Bring up core0's kernel(on the same u-boot console -UART#1):
=> setenv bootm_low 0x0
=> setenv bootm_size x10000000
=> tftp 1000000 uImage.core0
=> tftp 2000000 rootfs_min.ext2.gz.uboot
=> tftp c00000 <platform>_camp_core0.dtb
=> bootm 1000000 2000000 c00000
If you try to use the above method, please pay attention to kernel and device tree configuration.
Kernel Configuration for core0
Configuration for SMP support Processor support
[ ] Symmetric multi-processing support Disable the SMP support
Kernel Configuration for core1
Configuration for SMP support Processor support
[ ] Symmetric multi-processing support Disable the SMP support
Advanced Setup(Asssuming core1 will start from 512MB.)
[*]Prompt for advanced kernel configuration options"
[*] Set physical address where the kernel is loaded set it to
0x20000000
[*] Set custom page offset address
[*] Set custom kernel base address
[*] Set maximum low memory
Device tree configuration.
Core 0
cpus {
#address-cells = <1>;
#size-cells = <0>;
PowerPC,<CPU>@0 {
device_type = "cpu";
reg = <0x0>;
next-level-cache = <&L2>;
};
./scripts/dtc/dtc -I dts -O dtb -R 0x0008 -p 0x1000 -b 0 -o <platform>_camp_core0.dtb
arch/powerpc/boot/dts/<platform>_camp_core0.dts
Core1
cpus {
#address-cells = <1>;
#size-cells = <0>;
PowerPC,<CPU>@1 {
device_type = "cpu";
reg = <0x1>;
next-level-cache = <&L2>;
};
./scripts/dtc/dtc -I dts -O dtb -R 0x0008 -p 0x1000 -b 1 -o <platform>_camp_core1.dtb
arch/powerpc/boot/dts/<platform>_camp_core1.dts
Thanks for your quick reply. I ran menuconfig but in "Prompt for Advanced Kernel Configuration" only following options are available:
│ │ | [*] Prompt for advanced kernel configuration options | │ │ |
│ │ | [ ] Set maximum low memory | │ │ |
│ │ | [ ] Set custom page offset address | │ │ |
│ │ | [ ] Set custom kernel base address | │ │ |
│ │ | [ ] Set custom user task size | │ │ |
│ │ |
I am using Linux- 3.14 version. SO how i will set physical address for core1 to boot? Board have 512MB of DDR.
I have checked Kernel 3.8.13 in SDK 1.5, all these options are included after running the command "make ARCH=powerpc menuconfig".
Have a great day,
Yiping Wang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------