Re:[PATCH 1/2] powerpc: add kexec support on FSL-Book-E

2009-08-25 Thread wilbur.chan
2009/8/5, Sebastian Andrzej Siewior bige...@linutronix.de: There is no SMP support. The other CPUs are not halted/resumed. At the time of writing it I did not have a SMP machine so I did not implement it. Sebastian Hi Sebastian, Recently I've implemented non-SMP kexec on MPC8572 and

Can't write value into memory ?(E500 V2)

2009-08-26 Thread wilbur.chan
In an assemblely code , I invalided all the TLB entries except for the entry we are executed in. After that , I setuped a 1:1 TLB entry mapping of 1GB . At last , I wrote value 30 into the physical address 0x0400, (also the virtual address because of my 1:1 mapping). However, it seemed

Does kexec support SMP on powerpc? E500 V2

2009-08-27 Thread wilbur.chan
There was a patch of kexec on SMP mips 64 , and I attempt to implement kexec on SMP powerpc . I found that , it was a little different with mips when booting a kernel. We know that, every CPU jumped directly into kernel on mips, but on powerpc , E500 SMP, the 'master' CPU was in charge of

Re: Can't write value into memory ?(E500 V2)

2009-08-27 Thread wilbur.chan
2009/8/27 Scott Wood scottw...@freescale.com: Is this under Linux (it is a Linux mailing list...)?  If so, there are better ways of communicating that don't involve clobbering random memory and overlapping userspace TLB mappings. Yes, I'm doing this under linux in kernel mode. I've used

Re: Can't write value into memory ?(E500 V2)

2009-08-27 Thread wilbur.chan
2009/8/27 Scott Wood scottw...@freescale.com //check if we successfully store value at 0x400, lis r22, 0x400 ori r22,r22,0x0 lwz r23,0(r22) cmpw r23, 30 The values should not be equal, since you wrote a byte and read back a word. Furthermore, you are storing the constant 30,

Problem when loading initrd

2009-09-24 Thread wilbur.chan
I got some problems when starting a kernel withCONFIG_BLK_DEV_RAM and using initrd-image (not cpio)(mpc85xx) RAMDISK: ext2 filesystem found at block 0 RAMDISK: Loading 4096KiB [1 disk] into ram disk... RAMDISK: Loading 4096KiB [1 d isk] into ram disk... done. No filesystem could mount root,

Problem when disabled interrupt in system call (ppc8270)

2009-10-15 Thread wilbur.chan
ppc 8270, kernel 2.6.21.7 I took the following steps: In a system call function , say , sys_reboot, interrupt was disabled by local_irq_disable. Then , value at the address of 0xc50 was set to a value , say , 0x1234. Code was like this : sys_reboot() { local_irq_disable(); *(volatile

Re: Problem when disabled interrupt in system call (ppc8270)

2009-10-15 Thread wilbur.chan
2009/10/16, Benjamin Herrenschmidt b...@kernel.crashing.org: On Fri, 2009-10-16 at 09:12 +0800, wilbur.chan wrote: static inline unsigned long local_irq_disable(void) { unsigned long flags, zero; __asm__ __volatile__(li %1,0; lbz %0,%2(13); stb %1,%2(13) : =r (flags), =r

ppc rfi in head.s result in a reset?

2009-10-16 Thread wilbur.chan
ppc 6xx In platform_init function of sandpoint.c , I delete the code of getting command line from uboot, and set command_line to a fixed value , which are like this: sandpoint.c-- platform_init #if 0 if (r3 r6) { /* copy board info

How to mount rootfs though harddisk when booting?

2009-10-22 Thread wilbur.chan
mpc85xx with sata harddisk,which has a rootfs on sda3. I ' ve tried to use freescale's kernel image , which is togehther with the mpc85xx board, to successfully mount the sda3 filesystem when booting, But when I used my own kernle, it failed: I am using kernel 2.6.21.7 to mount the

Re: How to mount rootfs though harddisk when booting?

2009-10-24 Thread wilbur.chan
2009/10/22 Kumar Gala ga...@kernel.crashing.org: ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev Post the full kernel boot log. - k This is my booting log using ramdisk, I want to

Re: How to mount rootfs though harddisk when booting?

2009-10-24 Thread wilbur.chan
2009/10/22 Kumar Gala ga...@kernel.crashing.org: Post the full kernel boot log. - k And this is the booting log of freescale linux kernel, which successfully mount the sata disk (sda3) as the rootfs: Using P2020 DS machine description Memory CAM mapping: CAM0=256Mb, CAM1=256Mb, CAM2=256Mb

Re: How to mount rootfs though harddisk when booting?

2009-10-24 Thread wilbur.chan
Sorry, the config I just post is somewhat confusing, here I post my config again.Thx # # Automatically generated make config: don't edit # Linux kernel version: 2.6.21.7-EMBSYS-CGEL-3.06.10.P2.F0.B4 # Sun Oct 25 11:24:25 2009 # # CONFIG_PPC64 is not set CONFIG_PPC32=y CONFIG_PPC_MERGE=y

Re: kexec for powerpc

2009-11-12 Thread wilbur.chan
2009/11/13 James Black jblack...@gmail.com powerpc32 for processors like the freescale 82xx, 83xx machines. Thanks, JB maybe 83xx kexec needs to add some dtb support ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org

Re: Kexec support for FSL-BookE, take two

2010-01-16 Thread wilbur.chan
2010/1/16 Sebastian Andrzej Siewior linuxppc-...@ml.breakpoint.cc: This is take two :) SMP support did not work in the first one and due to the lack of a working SMP machine it is still absent. I took the e500v1 problem into account and the result is that I now use multiple 256MiB mappings.

got problem with timer interrupt

2010-01-18 Thread wilbur.chan
A timer has been added into my system, and it is used to generate continuous interrupt every 1 ms. This hw is register by request_irq(19, handler_1ms) Howeve I found that , it is longer than 1 ms between two interrupts, for I used get_cycles everytime we entered do_irq : if(irq==19) {

Does ppc cpio have limit in size?

2010-03-18 Thread wilbur.chan
Recently I 'm using cpio filesystem (kernel and filesystem compressed as a whole) on ppc8270 . However I found that the bigger the size of uImage is , the easier kernel failed when booting. Everytime it failed when calling populate_rootfs when booting, so I guess maybe the size of uImage effect

Re: [PATCH 3/3] powerpc/kexec: Add support for FSL-BookE

2010-05-07 Thread wilbur.chan
Most booke powerpc are based on SMP, I am looking forward someone to implement this. hiahia ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

How to find macro defination in source code ?

2010-06-18 Thread wilbur.chan
For example, a macro in serial driver 8250.c , SERIAL_PORT_DFNS ,I can't find where it is implement. Is there any solutions to find a macro defination in code ? Thx ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org

where do 8250 serial port initialize its mapbase and membase when booting?

2010-06-20 Thread wilbur.chan
linux 2.6.21.7 where do serial 8250 port fill its membase and mapbase fileds in system initializing ? I found that , when calling do_initcalls--- serial8250_init platform_driver_register---bus_for_each_dev, system found an device of serial 8250, which has already fill the membase and

cpio initrd booting failed on powerpc p4080

2010-06-25 Thread wilbur.chan
Hi All! We are planning to port linux 2.6.21.7 to powerpc p4080 using ramdisk file system, but to find it failed at : run_init_process(ramdisk_execute_command) The exact failing place is at run_init_process--- do_execve---search_binary_handler --- load_elf_binary --- if

kernel init exception

2010-06-29 Thread wilbur.chan
We are porting linux 2.6.21.7 to a powerpc e500mc board , p4080. But something is wrong when loading init file: log: free init memory... init has generated signal 4 but has no handler for it I found it print in _exception --- if (is_init(current)) {

Re: kernel init exception

2010-06-30 Thread wilbur.chan
Hi, David, Segher, Maybe it was caused by floating exception.I found that,system received a program check exception,the reason for it was REASON_ILLEGAL. I also use show_regs to print the NIP in exception,it seemed that ,this exception was caused by 'vmhaddshs' instruction in user mode of init

Re: kernel init exception

2010-06-30 Thread wilbur.chan
2010/7/1 Segher Boessenkool seg...@kernel.crashing.org: Maybe it was caused by floating exception.I found that,system received a program check exception,the reason for it was REASON_ILLEGAL. I also use show_regs to print the NIP in exception,it seemed that ,this exception was caused by

How to implement kexec on e500 ?

2009-06-29 Thread wilbur.chan
kernel 2.6.21.7 As we know , kexec stores data for new kernel image , in the form of a page list. And kexec uses the physical address of the another page for a next-page pointer. However, PowerPC e500 does not allow users to turn off the MMU, so we can not used physical address directly

Re: How to implement kexec on e500 ?

2009-06-29 Thread wilbur.chan
Excuse me , btw,how to search these patches on this maillist? through Linuxppc-dev Archives one by one? Cheers, wilbur 2009/6/29, Kumar Gala ga...@kernel.crashing.org: On Jun 29, 2009, at 8:47 AM, wilbur.chan wrote: kernel 2.6.21.7 As we know , kexec stores data for new kernel image

Question about head_fsl_booke.S

2009-07-26 Thread wilbur.chan
e500 , in head_fsl_booke.S We know,the first two steps are: 1) invalidate all entries except the entry we are in 2) setup a temp mapping and jump to it respectively: tlbwe bl 1f 1: mflr r9 rlwimi r7,r9,0,20,31 addi r7, r7,24 mtspr

Is it a BUG of kexec in E500?

2009-07-27 Thread wilbur.chan
I found a patch for kexec on Booke in the archives: http://lists.ozlabs.org/pipermail/linuxppc-dev/2008-November/064798.html In this pacth , we use an entry to setup a 1:1 mapping , whose size is 1GB. However, in e500, the max mapping size for a single entry is 256M. So I have to setup 4

Re:[PATCH 1/2] powerpc: add kexec support on FSL-Book-E

2009-08-01 Thread wilbur.chan
Hi, Sebastian, From: Sebastian Andrzej Siewior bigeasy at linutronix.de The relocate_new_kernel() code usually disables the MMU and the small code operates on physicall pages while moving the kernel to its final position. Book-E doesn't support this so a 1:1 mapping must be created. This patch

How to setup a 1:1 mapping on E500 v2 ?

2009-08-02 Thread wilbur.chan
As we know, we can't turn off MMU on E500. I want to setup a 1:1 mapping on SMP E500 v2, and I used 4 Entries of 256M to form a 1G mapping. Here are my codes, but when I used rfi , it didn't jump to the required instruction. 0---256M: lis r6,FSL_BOOKE_MAS0(1, 14, 0)@h