[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] petalinux-v0.30-rc1 linux 2.6 kernel booting error. (setup.c :: machine_early_init)



U-Boot> loadb 0x46000000
## Ready for binary (kermit) download to 0x46000000 at 115200 bps...
                              
                                                           
(Back at XILINX)
----------------------------------------------------
(/root/) C-Kermit>send /bin /tftpboot/image.ub
(/root/) C-Kermit>connect
Connecting to /dev/ttyS0, speed 115200
 Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------
## Total Size      = 0x0028f0e3 = 2683107 Bytes
## Start Addr      = 0x46000000
U-Boot>run install_kernel
U-Boot> boot
## Booting image at 430c000 ...
   Image Name:   PetaLinux Kernel 2.6
   Image Type:   Microblaze Linux Kernel Image (uncompressed)
   Data Size:    2683043 Bytes =  3.6 MB
   Load Address: 44000000
   Entry Point:  44000000
   Verifying Checksum ... OK
OK
Found romfs @ 0x441bb000 (0x001d4000)
#### klimit 0x441cf000 ####
Moving 0x001d4000 bytes from 0x441bb000 to 0x441ce6dc
New klimit: 0x443a3000

a. kernel panic position
   file : linux-2.6.x/arch/microblaze/kernel/setup.c
   funtion : machine_early_init(const char *cmdline)

   position of function
void machine_early_init(const char *cmdline)
{
        unsigned long *src, *dst = (unsigned long *)0x0;
                                                             
                   
#ifdef CONFIG_MTD_UCLINUX_EBSS
        {
                int size;
                extern char *klimit;
                extern char *_ebss;
                                                                               
                /* if CONFIG_MTD_UCLINUX_EBSS is defined, assume ROMFS is at the                 * end of kernel, which is ROMFS_LOCATION defined above. */
                //size = romfs_get_size((struct romfs_super_block *)__init_end);                size = PAGE_ALIGN(get_romfs_len(get_romfs_base()));
                early_printk("Found romfs @ 0x%08x (0x%08x)\n",
                                get_romfs_base(), size);
                early_printk("#### klimit %p ####\n", klimit);
                BUG_ON(size < 0); /* What else can we do? */
                                                                               
                /* Use memmove to handle likely case of memory overlap */
                early_printk("Moving 0x%08x bytes from 0x%08x to 0x%08x\n",
                        size, get_romfs_base(), &_ebss);
                memmove(&_ebss, get_romfs_base(), size);
                                                                               
                /* update klimit */
                klimit += PAGE_ALIGN(size);
                early_printk("New klimit: 0x%08x\n",klimit);
        }
#endif
                                                                               
                                                                               
        memset(__bss_start, 0, __bss_stop-__bss_start);    <--  panic
        memset(_ssbss, 0, _esbss-_ssbss);                      
                                                                               
        /* Copy command line passed from bootloader, or use default
           if none provided, or forced */
#ifndef CONFIG_CMDLINE_FORCE
        if (cmdline && cmdline[0]!='\0')
                strlcpy(command_line, cmdline, COMMAND_LINE_SIZE);
        else
#endif
                strlcpy(command_line, default_command_line, COMMAND_LINE_SIZE);
                                 

                                             
__bss_start value ==> 0x441bb000
__bss_stop value ==> 0x441ce6dc
__bss_stop - __bss_start ==> 0x136dc

(__bss_stop - __bss_start) < romfs_get_size