Porting LinuxPPC
Hi,
I have a question about the embedded ppc port of Linux which I hope you can help me with.
I compiled the mpc8xx-2.2.13 sources using the attached configuration for a MPC860T based board with 32MB of RAM. The output vmlinux file was downloaded to
the target using a BDM debugger. I changed the KERNELLOAD and KERNELBASE to 1000000 instead of c0000000 so that the code is located at the start of the 16MB region.
When I step through the code (.../arch/ppc/kernel/head.S), I see that the code is crashing after the rfi. The PC is 0x02000000 (32MB), which is greater than the available RAM. But I checked the value of r0 and it looks reasonable, ie. where the start_here is defined.
*** Line 1753 ***
lis r0,start_here@h
ori r0,r0,start_here@l
1010: mtspr SRR0,r0 SYNC
rfi /* enables MMU */
#ifdef CONFIG_SMP
.globl __secondary_start_psurge__secondary_start_psurge:
li r24,1 /* cpu # */
b __secondary_start
etc.
Do you have any suggestions to how to track down this problem? Is this introduced by the fact that I changed the address of the KERNELBASE?
I hope you can help me here or point me in the right direction for documentation.
Thanks in advance for your comments.
Kind regards,
Daniel
PS. Please reply directly to me as I am not subscribed to the mailing list.
#
# Automatically generated make config: don't edit
#
#
# Platform support
#CONFIG_PPC=y
# CONFIG_6xx is not set
# CONFIG_PPC64 is not set
CONFIG_8xx=y
# CONFIG_MPC821 is not set
# CONFIG_MPC823 is not set
# CONFIG_MPC850 is not set
# CONFIG_MPC860 is not setCONFIG_MPC860T=yCONFIG_SERIAL_CONSOLE=y
# CONFIG_PMAC is not set
# CONFIG_PREP is not set
# CONFIG_CHRP is not set
# CONFIG_ALL_PPC is not set
# CONFIG_APUS is not setCONFIG_MBX=y
# CONFIG_RPXLITE is not set
# CONFIG_RPXCLASSIC is not set
# CONFIG_BSEIP is not set
# CONFIG_SMP is not setCONFIG_MACH_SPECIFIC=y
#
# General setup
#
# CONFIG_EXPERIMENTAL is not setCONFIG_MODULES=y
# CONFIG_MODVERSIONS is not setCONFIG_KMOD=y
# CONFIG_PCI is not set
# CONFIG_PCI_QUIRKS is not setCONFIG_NET=yCONFIG_SYSCTL=yCONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not setCONFIG_BINFMT_ELF=yCONFIG_KERNEL_ELF=y
# CONFIG_BINFMT_MISC is not set
# CONFIG_BINFMT_JAVA is not set
# CONFIG_PARPORT is not set
# CONFIG_VGA_CONSOLE is not set
# CONFIG_FB is not set
#
# Plug and Play support
#
# CONFIG_PNP is not set
#
# Block devices
#
# CONFIG_BLK_DEV_FD is not setCONFIG_BLK_DEV_IDE=y
#
# Please see Documentation/ide.txt for help/info on IDE drives #
# CONFIG_BLK_DEV_HD_IDE is not set CONFIG_BLK_DEV_IDEDISK=yCONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_BLK_DEV_IDESCSI is not set
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_IDE_CHIPSETS is not set
#
# Additional Block Devices
#
# CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_MD is not setCONFIG_BLK_DEV_RAM=yCONFIG_BLK_DEV_INITRD=y
# CONFIG_BLK_DEV_XD is not setCONFIG_PARIDE_PARPORT=y
# CONFIG_PARIDE is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_DEV_HD is not set
#
# Networking options
#CONFIG_PACKET=yCONFIG_NETLINK=y
# CONFIG_RTNETLINK is not set
# CONFIG_NETLINK_DEV is not set
# CONFIG_FIREWALL is not set
# CONFIG_FILTER is not setCONFIG_UNIX=yCONFIG_INET=yCONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
# CONFIG_IP_ROUTER is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not setCONFIG_IP_ALIAS=y
# CONFIG_SYN_COOKIES is not set
#
# (it is safe to leave these untouched)
#CONFIG_INET_RARP=yCONFIG_SKB_LARGE=y
#
#
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
#
# SCSI support
#
# CONFIG_SCSI is not set
# CONFIG_SCSI_G_NCR5380_PORT is not set
# CONFIG_SCSI_G_NCR5380_MEM is not set
#
# Network device support
#CONFIG_NETDEVICES=y
#
# ARCnet devices
#
# CONFIG_ARCNET is not set
# CONFIG_DUMMY is not set
# CONFIG_EQUALIZER is not set
# CONFIG_NET_SB1000 is not set
#
# Ethernet (10 or 100Mbit)
#CONFIG_NET_ETHERNET=y
# CONFIG_MACE is not set
# CONFIG_BMAC is not set
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
# CONFIG_NET_ISA is not set
# CONFIG_NET_EISA is not set
# CONFIG_NET_POCKET is not set
# CONFIG_FDDI is not setCONFIG_PPP=y
#
# CCP compressors for PPP are only built as modules. #CONFIG_SLIP=y
# CONFIG_SLIP_COMPRESSED is not set
# CONFIG_SLIP_SMART is not set
# CONFIG_SLIP_MODE_SLIP6 is not set
# CONFIG_NET_RADIO is not set
#
# Token ring devices
#
# CONFIG_TR is not set
# CONFIG_NET_FC is not set
#
# Wan interfaces
#
# CONFIG_HOSTESS_SV11 is not set
# CONFIG_COSA is not set
# CONFIG_SEALEVEL_4021 is not set
# CONFIG_DLCI is not set
# CONFIG_WAN_DRIVERS is not set
# CONFIG_SBNI is not set
#
# Amateur Radio support
#
# CONFIG_HAMRADIO is not set
#
# ISDN subsystem
#
# CONFIG_ISDN is not set
#
# Old CD-ROM drivers (not SCSI, not IDE)
#
# CONFIG_CD_NO_IDESCSI is not set
#
# Console drivers
#
#
# Character devices
#CONFIG_VT=yCONFIG_VT_CONSOLE=y
# CONFIG_SERIAL is not set
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not setCONFIG_UNIX98_PTYS=yCONFIG_UNIX98_PTY_COUNT=256
# CONFIG_MOUSE is not set
# CONFIG_QIC02_TAPE is not set
# CONFIG_WATCHDOG is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
#
# Video For Linux
#
# CONFIG_VIDEO_DEV is not set
#
# Joystick support
#
# CONFIG_JOYSTICK is not set
# CONFIG_DTLK is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
# CONFIG_FT_NORMAL_DEBUG is not set
# CONFIG_FT_FULL_DEBUG is not set
# CONFIG_FT_NO_TRACE is not set
# CONFIG_FT_NO_TRACE_AT_ALL is not set
# CONFIG_FT_STD_FDC is not set
# CONFIG_FT_MACH2 is not set
# CONFIG_FT_PROBE_FC10 is not set
# CONFIG_FT_ALT_FDC is not set
#
# USB drivers - not for the faint of heart
#
#
# Filesystems
#
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not setCONFIG_FAT_FS=yCONFIG_MSDOS_FS=y
# CONFIG_UMSDOS_FS is not setCONFIG_VFAT_FS=y
# CONFIG_ISO9660_FS is not set
# CONFIG_JOLIET is not set
# CONFIG_MINIX_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_HPFS_FS is not setCONFIG_PROC_FS=yCONFIG_DEVPTS_FS=y
# CONFIG_ROMFS_FS is not setCONFIG_EXT2_FS=y
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
#
# Network File Systems
#
# CONFIG_CODA_FS is not setCONFIG_NFS_FS=yCONFIG_SUNRPC=yCONFIG_LOCKD=y
# CONFIG_SMB_FS is not set
# CONFIG_NCP_FS is not set
#
# Partition Types
#
# CONFIG_BSD_DISKLABEL is not set
# CONFIG_MAC_PARTITION is not set
# CONFIG_SMD_DISKLABEL is not set
# CONFIG_SOLARIS_X86_PARTITION is not setCONFIG_NLS=y
#
# Native Language Support
#CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_1 is not set
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_14 is not setCONFIG_NLS_ISO8859_15=y
# CONFIG_NLS_KOI8_R is not set
#
# Sound
#
# CONFIG_SOUND is not set
#
# MPC8xx CPM Options
#
# CONFIG_SCC_ENET is not set
# CONFIG_FEC_ENET is not set
# CONFIG_CPM_IIC is not set
# CONFIG_UCODE_PATCH is not set
# CONFIG_RPXLCD is not set
#
# Kernel hacking
#
# CONFIG_MAGIC_SYSRQ is not set
# CONFIG_KGDB is not set
# CONFIG_XMON is not set
Hi Daniel,
Quoted 5 lines · Daniel Wu
I compiled the mpc8xx-2.2.13 sources using the attached configuration for a MPC860T based board with 32MB of RAM. The output vmlinux file was downloaded to the target using a BDM debugger. I changed the KERNELLOAD and KERNELBASE to 1000000 instead of
c0000000so that the code is located at the start of the 16MB region.
To quote Grant Erickson in
http://lists.linuxppc.org/listarcs/linuxppc-embedded/200001/msg00123.html:
"You don't ever want to change KERNELLOAD or KERNELBASE, otherwise the virtual memory and MMU code will all break."
This seems to be a common error, so I might add mention of it in the HOWTO.
Regards,
Graham
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Hi Graham,
Quoted 9 lines · Graham Stoney
To quote Grant Erickson in
http://lists.linuxppc.org/listarcs/linuxppc-embedded/200001/msg00123.html:"You don't ever want to change KERNELLOAD or KERNELBASE, otherwise the virtual memory and MMU code will all break."
This seems to be a common error, so I might add mention of it in the HOWTO.
Yes, I saw the article after sending the question. But this doesn't really help me :-( I've put back the KERNELLOAD and KERNELBASE address back to their orginal values and load the zImage (in the .../arch/ppc/mbxboot directory) rather than the vmlinux file using the BDM debugger but it still crashes very early in the piece.
To be precise, while clearing the BSS.
/* Clear all of BSS */
lis r3,edata@h
ori r3,r3,edata@l
lis r4,end@h
ori r4,r4,end@l
subi r3,r3,4
subi r4,r4,4
li r0,0
50: stwu r0,4(r3) <---- crashes here
cmp 0,r3,r4
bne 50bThe strange thing is that it seems to work if I step through the loop. In any case, it crashes soon after that in serial_init.
I think I'm missing something fundamental here ... any suggestions.
Regards,
Daniel
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 1 line · Daniel Wu
I think I'm missing something fundamental here ... any suggestions.
Have you checked that your BDM configuration file is disabling the watchdog when releasing the board from reset?
Regards,
Graham
--
Graham Stoney
Principal Hardware/Software Engineer
Canon Information Systems Research Australia
Ph: +61 2 9805 2909 Fax: +61 2 9805 2929
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 6 lines · Graham Stoney
Quoted 1 line · Daniel Wu
I think I'm missing something fundamental here ... any suggestions.
Have you checked that your BDM configuration file is disabling the watchdog when releasing the board from reset?
Also check that DER is zero'd when running with the debugger. That was my situation in some previous posts.
-Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Graham,
I fell vicitm to the same mistake when I was writing boot code for MPC850. I think adding that to the HOWTO is a great idea. It would have save me 2 or 3 weeks of effort :-).
Daris Nevil
SiSIC Inc/SNMC
Quoted 12 lines · Graham Stoney
Hi Daniel,
Quoted 5 lines · Daniel Wu
I compiled the mpc8xx-2.2.13 sources using the attached configuration for a MPC860T based board with 32MB of RAM. The output vmlinux file was downloaded to the target using a BDM debugger. I changed the KERNELLOAD and KERNELBASE to 1000000 instead of
c0000000so that the code is located at the start of the 16MB region.To quote Grant Erickson in
http://lists.linuxppc.org/listarcs/linuxppc-embedded/200001/msg00123.html:
Quoted 8 lines
"You don't ever want to change KERNELLOAD or KERNELBASE, otherwise the virtual memory and MMU code will all break."
This seems to be a common error, so I might add mention of it in the HOWTO.
Regards,
Graham
--
Daris A Nevil
SiSIC, Inc., f.k.a. Simple Network Magic Corporation 401 Kentucky Lane
McKinney, TX 75069
214-793-7757
[email protected]
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Daris,
I disagree. I beleive that the Kernel load simply must be above 0x80000000.
And I you want to put a lot of memory in one of these systems, it had better be movable down from 0xc0000000. On the IBM405gp and I assume, the 8xx systems, all of real memory is pinned
into a to TLB's. Well, if one can't move the memory base down the the real memory available is from 0xc0000000 to whereve the IO starts. In the IBM405gp, this is at 0xe80000000.
Chip
Quoted 33 lines · Daris A Nevil
Graham,
I fell vicitm to the same mistake when I was writing boot code for MPC850. I think adding that to the HOWTO is a great idea. It would have save me 2 or 3 weeks of effort :-).
Daris Nevil
SiSIC Inc/SNMCQuoted 12 lines · Graham Stoney
Hi Daniel,
Quoted 5 lines · Daniel Wu
I compiled the mpc8xx-2.2.13 sources using the attached configuration for a MPC860T based board with 32MB of RAM. The output vmlinux file was downloaded to the target using a BDM debugger. I changed the KERNELLOAD and KERNELBASE to 1000000 instead of
c0000000so that the code is located at the start of the 16MB region.To quote Grant Erickson in
http://lists.linuxppc.org/listarcs/linuxppc-embedded/200001/msg00123.html:Quoted 8 lines
"You don't ever want to change KERNELLOAD or KERNELBASE, otherwise the virtual memory and MMU code will all break."
This seems to be a common error, so I might add mention of it in the HOWTO.
Regards,
Graham
Quoted 9 lines
--
Daris A Nevil
SiSIC, Inc., f.k.a. Simple Network Magic Corporation 401 Kentucky Lane
McKinney, TX 75069
214-793-7757
[email protected]
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 2 lines · Ralph Blach
I disagree. I beleive that the Kernel load simply must be above
0x80000000.
OK, time for another memory map lesson........
Virtual addresses from 0 to 0x7fffffff are for user context. Above this are the kernel virtual addresses. The PowerPC processors have more than 32-bits of addressing, but I won't go into that since it is not important for this discussion.
During the early kernel initialization, the kernel virtual memory allocator is not operational. Prior to this KVM initialization, we choose to map virtual to physical addresses 1:1. That is, the kernel virtual address exactly matches the physical address on the bus. These mappings are typically done in arch/ppc/kernel/head.S, or arch/ppc/mm/init.c. Only absolutely necessary mappings should be done at this time, for example board control registers or a serial uart. Normal device driver initialization should map resources later when necessary.
Although platform dependent, and certainly the case for embedded 8xx, traditionally memory is mapped at physical address zero, and I/O devices above phsical address 0x80000000. The lowest and highest (above 0xf0000000) I/O addresses are traditionally used for devices or registers we need to map during kernel initialization and prior to KVM operation. For this reason, and since it followed prior PowerPC platform examples, I chose to map the embedded 8xx kernel to the 0xc0000000 virtual address. This way, we can enable the MMU to map the kernel for proper operation, and still map a few windows before the KVM is operational.
On some systems, you could possibly run the kernel at the 0x80000000 or any other virtual address. It just depends upon mapping that must be done prior to KVM operational. You can never map devices or kernel spaces that overlap with the user virtual space. This is why default IMMR mapping used by most BDM tools won't work. They put the IMMR at something like 0x10000000 or 0x02000000 for example. You simply can't map these addresses early in the kernel, and continue proper system operation.
The embedded 8xx/82xx kernel is mature enough that all you should need to do is map the IMMR someplace at or above 0xf0000000 and it should boot far enough to get serial console messages and KGDB connected on any platform. There are lots of other subtle memory management design features that you simply don't need to worry about. If you are changing functions related to MMU initialization, you are likely breaking things that are known to work and are heading down a path of disaster and frustration. Your changes should be to make the flexibility of the processor fit Linux, not force arbitrary and non-workable memory mappings into Linux.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Hi,
Thanks to all who responsed to my last qeustion. The problem was that the immr was not setup correctly. Also since it is a custom board (MPC860T based), I had to rewrite code to fill in the bd_t structure. The board is now sending characters to the console, which is good but I still have one of the original
problems: I can only step through the code using the BDM debugger, but when I run the code, it generates a software emulation exception and stops.
After some investigation, it seems that I can run the code up to the point where the instructure cache is enabled - actually only a few lines at the top of the startup code. My question is: are there any restrictions on when the cache can be enabled? Are there anything else I've missed.
Thanks,
Daniel
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Are you using a custom UPM table? This can happen when your UPM burst table is not proper. Since bursts are not used by the core until caching is disabled, problems usually come from the UPM table.
Quoted 10 lines · Daniel Wu
Hi,
Thanks to all who responsed to my last qeustion. The problem was that the immr was not setup correctly. Also since it is a custom board (MPC860T based), I had to rewrite code to fill in the
bd_tstructure. The board is now sending characters to the console, which is good but I still have one of the original
problems: I can only step through the code using the BDM debugger, but when I run the code, it generates a software emulation exception and stops.
Quoted 8 lines
After some investigation, it seems that I can run the code up to the point where the instructure cache is enabled - actually only a few lines at the top of the startup code. My question is: are there any restrictions on when the cache can be enabled? Are there anything else I've missed.
Thanks,
Daniel
--
MPC823 Applications Engineering Development
Get help from other MPC823 customers on the
comp.sys.powerpc.tech newsgroup!
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Err, I meant bursts are not used by the core until caching is ENABLED.
Quoted 21 lines · "Richard Hendricks (ra6353)" wrote:
Are you using a custom UPM table? This can happen when your UPM burst table is not proper. Since bursts are not used by the core until caching is disabled, problems usually come from the UPM table.
Quoted 15 lines · Daniel Wu
Hi,
Thanks to all who responsed to my last qeustion. The problem was that the immr was not setup correctly. Also since it is a custom board (MPC860T based), I had to rewrite code to fill in the
bd_tstructure. The board is now sending characters to the console, which is good but I still have one of the original
problems: I can only step through the code using the BDM debugger, but when I run the code, it generates a software emulation exception and stops.After some investigation, it seems that I can run the code up to the point where the instructure cache is enabled - actually only a few lines at the top of the startup code. My question is: are there any restrictions on when the cache can be enabled? Are there anything else I've missed.
Quoted 9 lines
Quoted 3 lines
Thanks,
Daniel--
MPC823 Applications Engineering Development
Get help from other MPC823 customers on the
comp.sys.powerpc.tech newsgroup!
--
MPC823 Applications Engineering Development
Get help from other MPC823 customers on the
comp.sys.powerpc.tech newsgroup!
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi,
I'm still having problems with booting the kernel - I've got to the point where the compressed image has been successfully decompressed and starts to execute code in kernel/head.S, which sets up the TLBs. However, as soon as the code turns on the mmu, the code crashes!
I'm running this under a BDM monitor, could this be the source of the problem? One thing I noticed is that the kernel uses virtual addresses starting at c0000000 and the BDM monitor fails to do the translation. Is there any way to get around this?
Thanks in advance.
Regards,
Daniel
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 6 lines · Daniel Wu
I'm still having problems with booting the kernel - I've got to the point where the compressed image has been successfully decompressed and starts to execute code in
kernel/head.S, which sets up the TLBs. However, as soon as the code turns on the mmu, the code crashes!I'm running this under a BDM monitor, could this be the source of the problem?
I know nothing about BDM, but I did just last week get the linux kernel up on our board (this one is a single-CPU PPC604 with 48 MB DRAM).
The linux kernel expects to be loaded at physical address 0 and for execution to start at address 0, in real mode (i.e. MMU disabled). Depending upon configuration, the kernel may expect registers r3-r7 to contain valid memory pointers, or it may expect there to be a Mackintosh boot ROM available, or it may actually expect to have been loaded at 0x00100000 and will relocate itself to physical address 0, etc. -- you probably need to go through head.S with a fine-toothed comb, and make sure you have configured the kernel correctly for your hardware. In my case I basically copied the CONFIG_PREP code, adding appropriate CONFIG_LSPS code in most places ("LSPS" is the name of our board). I also added "LSPS" to config.in so I could configure it. So far I have touched 10 kernel source files, and have added 2 files for my lsps_setup and lsps_driver.
Quoted 3 lines
One
thing I noticed is that the kernel uses virtual addresses starting atc0000000and the BDM monitor fails to do the translation. Is there any way to get around this?
I don't think so -- that looks pretty basic to me, throughout the PPC port. But your boot monitor should not need to do the translation -- load the kernel image at 0 and jump to addr 0, all in real mode of your boot monitor. But you do need to configure the Linux kernel with device drivers which can talk to your hardware....
And you may need to configure that option to load at 0x00100000 if your boot monitor uses the memory at addr 0....
Note if you load a compressed kernel you need to load it higher than 0x00100000 or so and jump to its first instruction -- it will decompress the kernel to addr 0 and jump to it there. I have not gotten a compressed image to work, and I am booting vmlinux directly (but for me it's not an issue -- it takes just 3.1 seconds from the <CR> of my boot command to a bash prompt from the board).
HEY -- IS THAT A RECORD??? has anyone ever booted Linux faster than 3.1 seconds? Of course this is a _VERY_ bare-bones system with just a console and a 4 MB initrd-ramdisk.
Tom Roberts [email protected]
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Daniel,
Although I am not an expert, I really think the lowest kernel base is 0x80000000.
This is because the Linux which we have assumes that we have memory from 0x0 - 0x7fffffff
avaliable for tasks. So I think the kernel will have to move above 0x80000000.
Chip
Quoted 380 lines · Daniel Wu
Hi,
I have a question about the embedded ppc port of Linux which I hope you can help me with.
I compiled the mpc8xx-2.2.13 sources using the attached configuration for a MPC860T based board with 32MB of RAM. The output vmlinux file was downloaded to
the target using a BDM debugger. I changed the KERNELLOAD and KERNELBASE to 1000000 instead of
c0000000so that the code is located at the start of the 16MB region.When I step through the code (
.../arch/ppc/kernel/head.S), I see that the code is crashing after the rfi. The PC is0x02000000(32MB), which is greater than the available RAM. But I checked the value of r0 and it looks reasonable, ie. where thestart_hereis defined.*** Line 1753 ***
lis r0,start_here@h ori r0,r0,start_here@l 1010: mtspr SRR0,r0SYNC
rfi /* enables MMU */#ifdef
CONFIG_SMP
.globl__secondary_start_psurge__secondary_start_psurge:
li r24,1 /* cpu # */
b__secondary_startetc.
Do you have any suggestions to how to track down this problem? Is this introduced by the fact that I changed the address of the KERNELBASE?
I hope you can help me here or point me in the right direction for documentation.
Thanks in advance for your comments.
Kind regards,
DanielPS. Please reply directly to me as I am not subscribed to the mailing list.
------------------------------------------------------------------------
#
# Automatically generated make config: don't edit
##
# Platform support
#CONFIG_PPC=y
#CONFIG_6xxis not set
#CONFIG_PPC64is not set
CONFIG_8xx=y
#CONFIG_MPC821is not set
#CONFIG_MPC823is not set
#CONFIG_MPC850is not set
#CONFIG_MPC860is not setCONFIG_MPC860T=yCONFIG_SERIAL_CONSOLE=y
#CONFIG_PMACis not set
#CONFIG_PREPis not set
#CONFIG_CHRPis not set
#CONFIG_ALL_PPCis not set
#CONFIG_APUSis not setCONFIG_MBX=y
#CONFIG_RPXLITEis not set
#CONFIG_RPXCLASSICis not set
#CONFIG_BSEIPis not set
#CONFIG_SMPis not setCONFIG_MACH_SPECIFIC=y#
# General setup
#
#CONFIG_EXPERIMENTALis not setCONFIG_MODULES=y
#CONFIG_MODVERSIONSis not setCONFIG_KMOD=y
#CONFIG_PCIis not set
#CONFIG_PCI_QUIRKSis not setCONFIG_NET=yCONFIG_SYSCTL=yCONFIG_SYSVIPC=y
#CONFIG_BSD_PROCESS_ACCTis not setCONFIG_BINFMT_ELF=yCONFIG_KERNEL_ELF=y
#CONFIG_BINFMT_MISCis not set
#CONFIG_BINFMT_JAVAis not set
#CONFIG_PARPORTis not set
#CONFIG_VGA_CONSOLEis not set
#CONFIG_FBis not set#
# Plug and Play support
#
#CONFIG_PNPis not set#
# Block devices
#
#CONFIG_BLK_DEV_FDis not setCONFIG_BLK_DEV_IDE=y#
# Please seeDocumentation/ide.txtfor help/info on IDE drives #
#CONFIG_BLK_DEV_HD_IDEis not setCONFIG_BLK_DEV_IDEDISK=yCONFIG_BLK_DEV_IDECD=y
#CONFIG_BLK_DEV_IDETAPEis not set
#CONFIG_BLK_DEV_IDEFLOPPYis not set
#CONFIG_BLK_DEV_IDESCSIis not set
#CONFIG_BLK_DEV_CMD640is not set
#CONFIG_IDE_CHIPSETSis not set#
# Additional Block Devices
#
#CONFIG_BLK_DEV_LOOPis not set
#CONFIG_BLK_DEV_NBDis not set
#CONFIG_BLK_DEV_MDis not setCONFIG_BLK_DEV_RAM=yCONFIG_BLK_DEV_INITRD=y
#CONFIG_BLK_DEV_XDis not setCONFIG_PARIDE_PARPORT=y
#CONFIG_PARIDEis not set
#CONFIG_BLK_CPQ_DAis not set
#CONFIG_BLK_DEV_HDis not set#
# Networking options
#CONFIG_PACKET=yCONFIG_NETLINK=y
#CONFIG_RTNETLINKis not set
#CONFIG_NETLINK_DEVis not set
#CONFIG_FIREWALLis not set
#CONFIG_FILTERis not setCONFIG_UNIX=yCONFIG_INET=yCONFIG_IP_MULTICAST=y
#CONFIG_IP_ADVANCED_ROUTERis not set
#CONFIG_IP_PNPis not set
#CONFIG_IP_ROUTERis not set
#CONFIG_NET_IPIPis not set
#CONFIG_NET_IPGREis not set
#CONFIG_IP_MROUTEis not setCONFIG_IP_ALIAS=y
#CONFIG_SYN_COOKIESis not set#
# (it is safe to leave these untouched)
#CONFIG_INET_RARP=yCONFIG_SKB_LARGE=y#
#
#
#CONFIG_IPXis not set
#CONFIG_ATALKis not set#
# SCSI support
#
#CONFIG_SCSIis not set
#CONFIG_SCSI_G_NCR5380_PORTis not set
#CONFIG_SCSI_G_NCR5380_MEMis not set#
# Network device support
#CONFIG_NETDEVICES=y#
# ARCnet devices
#
#CONFIG_ARCNETis not set
#CONFIG_DUMMYis not set
#CONFIG_EQUALIZERis not set
#CONFIG_NET_SB1000is not set#
# Ethernet (10 or 100Mbit)
#CONFIG_NET_ETHERNET=y
#CONFIG_MACEis not set
#CONFIG_BMACis not set
#CONFIG_NET_VENDOR_3COMis not set
#CONFIG_LANCEis not set
#CONFIG_NET_VENDOR_SMCis not set
#CONFIG_NET_VENDOR_RACALis not set
#CONFIG_NET_ISAis not set
#CONFIG_NET_EISAis not set
#CONFIG_NET_POCKETis not set
#CONFIG_FDDIis not setCONFIG_PPP=y#
# CCP compressors for PPP are only built as modules. #CONFIG_SLIP=y
#CONFIG_SLIP_COMPRESSEDis not set
#CONFIG_SLIP_SMARTis not set
#CONFIG_SLIP_MODE_SLIP6is not set
#CONFIG_NET_RADIOis not set#
# Token ring devices
#
#CONFIG_TRis not set
#CONFIG_NET_FCis not set#
# Wan interfaces
#
#CONFIG_HOSTESS_SV11is not set
#CONFIG_COSAis not set
#CONFIG_SEALEVEL_4021is not set
#CONFIG_DLCIis not set
#CONFIG_WAN_DRIVERSis not set
#CONFIG_SBNIis not set#
# Amateur Radio support
#
#CONFIG_HAMRADIOis not set#
# ISDN subsystem
#
#CONFIG_ISDNis not set#
# Old CD-ROM drivers (not SCSI, not IDE)
#
#CONFIG_CD_NO_IDESCSIis not set#
# Console drivers
##
# Character devices
#CONFIG_VT=yCONFIG_VT_CONSOLE=y
#CONFIG_SERIALis not set
#CONFIG_SERIAL_EXTENDEDis not set
#CONFIG_SERIAL_NONSTANDARDis not setCONFIG_UNIX98_PTYS=yCONFIG_UNIX98_PTY_COUNT=256
#CONFIG_MOUSEis not set
#CONFIG_QIC02_TAPEis not set
#CONFIG_WATCHDOGis not set
#CONFIG_NVRAMis not set
#CONFIG_RTCis not set#
# Video For Linux
#
#CONFIG_VIDEO_DEVis not set#
# Joystick support
#
#CONFIG_JOYSTICKis not set
#CONFIG_DTLKis not set#
# Ftape, the floppy tape device driver
#
#CONFIG_FTAPEis not set
#CONFIG_FT_NORMAL_DEBUGis not set
#CONFIG_FT_FULL_DEBUGis not set
#CONFIG_FT_NO_TRACEis not set
#CONFIG_FT_NO_TRACE_AT_ALLis not set
#CONFIG_FT_STD_FDCis not set
#CONFIG_FT_MACH2is not set
#CONFIG_FT_PROBE_FC10is not set
#CONFIG_FT_ALT_FDCis not set#
# USB drivers - not for the faint of heart
##
# Filesystems
#
#CONFIG_QUOTAis not set
#CONFIG_AUTOFS_FSis not set
#CONFIG_AFFS_FSis not set
#CONFIG_HFS_FSis not setCONFIG_FAT_FS=yCONFIG_MSDOS_FS=y
#CONFIG_UMSDOS_FSis not setCONFIG_VFAT_FS=y
#CONFIG_ISO9660_FSis not set
#CONFIG_JOLIETis not set
#CONFIG_MINIX_FSis not set
#CONFIG_NTFS_FSis not set
#CONFIG_HPFS_FSis not setCONFIG_PROC_FS=yCONFIG_DEVPTS_FS=y
#CONFIG_ROMFS_FSis not setCONFIG_EXT2_FS=y
#CONFIG_SYSV_FSis not set
#CONFIG_UFS_FSis not set#
# Network File Systems
#
#CONFIG_CODA_FSis not setCONFIG_NFS_FS=yCONFIG_SUNRPC=yCONFIG_LOCKD=y
#CONFIG_SMB_FSis not set
#CONFIG_NCP_FSis not set#
# Partition Types
#
#CONFIG_BSD_DISKLABELis not set
#CONFIG_MAC_PARTITIONis not set
#CONFIG_SMD_DISKLABELis not set
#CONFIG_SOLARIS_X86_PARTITIONis not setCONFIG_NLS=y#
# Native Language Support
#CONFIG_NLS_CODEPAGE_437=y
#CONFIG_NLS_CODEPAGE_737is not set
#CONFIG_NLS_CODEPAGE_775is not set
#CONFIG_NLS_CODEPAGE_850is not set
#CONFIG_NLS_CODEPAGE_852is not set
#CONFIG_NLS_CODEPAGE_855is not set
#CONFIG_NLS_CODEPAGE_857is not set
#CONFIG_NLS_CODEPAGE_860is not set
#CONFIG_NLS_CODEPAGE_861is not set
#CONFIG_NLS_CODEPAGE_862is not set
#CONFIG_NLS_CODEPAGE_863is not set
#CONFIG_NLS_CODEPAGE_864is not set
#CONFIG_NLS_CODEPAGE_865is not set
#CONFIG_NLS_CODEPAGE_866is not set
#CONFIG_NLS_CODEPAGE_869is not set
#CONFIG_NLS_CODEPAGE_874is not set
#CONFIG_NLS_ISO8859_1is not set
#CONFIG_NLS_ISO8859_2is not set
#CONFIG_NLS_ISO8859_3is not set
#CONFIG_NLS_ISO8859_4is not set
#CONFIG_NLS_ISO8859_5is not set
#CONFIG_NLS_ISO8859_6is not set
#CONFIG_NLS_ISO8859_7is not set
#CONFIG_NLS_ISO8859_8is not set
#CONFIG_NLS_ISO8859_9is not set
#CONFIG_NLS_ISO8859_14is not setCONFIG_NLS_ISO8859_15=y
#CONFIG_NLS_KOI8_Ris not set#
# Sound
#
#CONFIG_SOUNDis not set#
# MPC8xx CPM Options
#
#CONFIG_SCC_ENETis not set
#CONFIG_FEC_ENETis not set
#CONFIG_CPM_IICis not set
#CONFIG_UCODE_PATCHis not set
#CONFIG_RPXLCDis not set
Quoted 6 lines
#
# Kernel hacking
#
#CONFIG_MAGIC_SYSRQis not set
#CONFIG_KGDBis not set
#CONFIG_XMONis not set
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/