Re: [U-Boot] [Patch 1/2] MIPS: fix a latent bug on initialize $gp

2012-11-28 Thread Zhi-zhou Zhang
On Wed, Nov 28, 2012 at 02:33:10PM +0100, Daniel Schwierzeck wrote: 2012/11/26 Zhi-zhou Zhang zhizhou...@gmail.com: On Sun, Nov 25, 2012 at 09:30:54PM +0100, Daniel Schwierzeck wrote: 2012/11/24 Zhi-zhou Zhang zhizhou...@gmail.com: If bal is 8 bytes aligned, the _gp will not be 8 bytes

Re: [U-Boot] [Patch 1/2] MIPS: fix a latent bug on initialize $gp

2012-11-26 Thread Zhi-zhou Zhang
On Sun, Nov 25, 2012 at 09:30:54PM +0100, Daniel Schwierzeck wrote: 2012/11/24 Zhi-zhou Zhang zhizhou...@gmail.com: If bal is 8 bytes aligned, the _gp will not be 8 bytes aligned. then the following ld insntrustion generates a Adel exception. So here make _gp be always aligned in 8 bytes

[U-Boot] [Patch 1/2] MIPS: fix a latent bug on initialize $gp

2012-11-24 Thread Zhi-zhou Zhang
If bal is 8 bytes aligned, the _gp will not be 8 bytes aligned. then the following ld insntrustion generates a Adel exception. So here make _gp be always aligned in 8 bytes. Signed-off-by: Zhi-zhou Zhang zhizhou...@gmail.com --- arch/mips/cpu/mips64/start.S |5 - 1 file changed, 4

[U-Boot] [Patch 2/2] MIPS: do not modify variable before relocate_code

2012-11-24 Thread Zhi-zhou Zhang
Because timestamp is declared as `static', we needn't initialize it by writing it a zero. If we do it before relocate_code, we will write into a flash address(0xbfc0). Signed-off-by: Zhi-zhou Zhang zhizhou...@gmail.com --- arch/mips/cpu/mips32/time.c |1 - arch/mips/cpu/mips64

Re: [U-Boot] include: fix mips64 build warning

2012-10-02 Thread Zhi-zhou Zhang
On Mon, Oct 1, 2012 at 7:06 PM, Daniel Schwierzeck daniel.schwierz...@gmail.com wrote: Hi Zhi-zhou, 2012/9/29 Zhi-zhou Zhang etou...@gmail.com: fix warnings when building mips64, we define CONFIG_MIPS64 in config file. And this macro decides size_t. hashtable.c: In function 'hexport_r

[U-Boot] include: fix mips64 build warning

2012-09-29 Thread Zhi-zhou Zhang
'%zu' expects argument of type 'size_t', but argument 2 has type 'unsigned int' [-Wformat] Signed-off-by: Zhi-zhou Zhang etou...@gmail.com --- include/linux/types.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/types.h b/include/linux/types.h index 1b0b4a4..33ee095 100644

[U-Boot] include: fix mips64 build warning

2012-09-29 Thread Zhi-zhou Zhang
'%zu' expects argument of type 'size_t', but argument 2 has type 'unsigned int' [-Wformat] Signed-off-by: Zhi-zhou Zhang etou...@gmail.com --- include/linux/types.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/types.h b/include/linux/types.h index 1b0b4a4..33ee095 100644

Re: [U-Boot] [Patch V5 2/4] MIPS: change address related header files

2012-09-05 Thread Zhi-zhou Zhang
On Wed, Sep 5, 2012 at 6:25 AM, Daniel Schwierzeck daniel.schwierz...@gmail.com wrote: 2012/9/4 Zhizhou Zhang etou...@gmail.com: Prepare for upcoming mips64 support. This patch add mips64 address space support. Signed-off-by: Zhizhou Zhang etou...@gmail.com ---

Re: [U-Boot] [Patch V5 4/4] MIPS: add board qemu-mips64 support

2012-09-05 Thread Zhi-zhou Zhang
On Wed, Sep 5, 2012 at 7:12 AM, Daniel Schwierzeck daniel.schwierz...@gmail.com wrote: 2012/9/4 Zhizhou Zhang etou...@gmail.com: Both big-endian and little-endian are tested with below commands: Rom version: (Default, Now we config it as rom version) qemu-system-mips64el -M mips -bios

Re: [U-Boot] [Patch V4 4/4] MIPS: add mips64 standalone support

2012-09-02 Thread Zhi-zhou Zhang
Dear Wolfgang Denk, On Sat, Sep 1, 2012 at 8:48 PM, Wolfgang Denk w...@denx.de wrote: Dear Zhizhou Zhang, In message 1346071750-6634-10-git-send-email-etou...@gmail.com you wrote: Move CONFIG_SYS_TEXT_BASE to the board specified header file. So change qemu-mips.h also.

Re: [U-Boot] [Patch V4 1/4] MIPS: Add support for MIPS64 cpus

2012-09-02 Thread Zhi-zhou Zhang
Dear Wolfgang Denk, On Sat, Sep 1, 2012 at 8:42 PM, Wolfgang Denk w...@denx.de wrote: Dear Zhizhou Zhang, In message 1346071750-6634-7-git-send-email-etou...@gmail.com you wrote: These files are derived from arch/mips/cpu/mips32/*. The main changes are: 1, changes ABI o32 to n64, 2, add

Re: [U-Boot] [Patch V3 1/4] [MIPS] Add support for MIPS64 cpus

2012-08-26 Thread Zhi-zhou Zhang
with current master branch in git://git.denx.de/u-boot-mips.git you can drop the endianess flags which are now handled in arch/mips/config.mk Ok, I have done what you ask for. But I didn't find where does CONFIG_SYS_LITTLE_ENDIAN or CONFIG_SYS_BIG_ENDIAN define. Could you tell where should

Re: [U-Boot] [Patch V3 4/4] [MIPS] Disable standalone while building MIPS64

2012-08-26 Thread Zhi-zhou Zhang
On Fri, Aug 24, 2012 at 8:23 AM, Daniel Schwierzeck daniel.schwierz...@gmail.com wrote: 2012/8/20 Zhizhou Zhang etou...@gmail.com: I think copy mips.lds to mips64.lds with only one line changed is not good. So I disable it in top Makefile. Signed-off-by: Zhizhou Zhang etou...@gmail.com

Re: [U-Boot] [Patch V3 1/4] [MIPS] Add support for MIPS64 cpus

2012-08-25 Thread Zhi-zhou Zhang
/cpu.c @@ -0,0 +1,124 @@ +/* + * (C) Copyright 2003 + * Wolfgang Denk, DENX Software Engineering, w...@denx.de + * Zhi-zhou Zhang etou...@gmail.com + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can

Re: [U-Boot] [Patch V3 1/4] [MIPS] Add support for MIPS64 cpus

2012-08-23 Thread Zhi-zhou Zhang
On Thu, Aug 23, 2012 at 11:07 AM, Mike Frysinger vap...@gentoo.org wrote: On Monday 20 August 2012 10:22:23 Zhizhou Zhang wrote: +void __weak _machine_restart(void) +{ +} this should be: void __noreturn __weak _machine_restart(void) { while (1); } there should also be a

Re: [U-Boot] [Patch V3 0/4] add mips64 cpu support

2012-08-23 Thread Zhi-zhou Zhang
On Thu, Aug 23, 2012 at 11:04 AM, Mike Frysinger vap...@gentoo.org wrote: On Monday 20 August 2012 10:22:22 Zhizhou Zhang wrote: This patch add mips64 cpu support. Changes in V3: - merge related files into one patch, no longer one file one patch. - add detailed commit message. -

Re: [U-Boot] [[Patch V2] mips: 01/16] add mips64 standalone support

2012-08-19 Thread Zhi-zhou Zhang
On 8/18/12, Mike Frysinger vap...@gentoo.org wrote: On Saturday 18 August 2012 08:22:51 Zhi-zhou Zhang wrote: On Sat, Aug 18, 2012 at 3:31 AM, Mike Frysinger wrote: On Friday 17 August 2012 11:30:44 Zhizhou Zhang wrote: --- a/arch/mips/config.mk +++ b/arch/mips/config.mk +ifeq

Re: [U-Boot] [[Patch V2] mips: 01/16] add mips64 standalone support

2012-08-18 Thread Zhi-zhou Zhang
On Sat, Aug 18, 2012 at 3:31 AM, Mike Frysinger vap...@gentoo.org wrote: On Friday 17 August 2012 11:30:44 Zhizhou Zhang wrote: --- a/arch/mips/config.mk +++ b/arch/mips/config.mk +ifeq $(CPU) mips64 +CONFIG_STANDALONE_LOAD_ADDR ?= 0xFfffFfff8020 -T mips64.lds +else

Re: [U-Boot] [[Patch V2] mips: 01/16] add mips64 standalone support

2012-08-18 Thread Zhi-zhou Zhang
On 8/18/12, Mike Frysinger vap...@gentoo.org wrote: On Saturday 18 August 2012 08:22:51 Zhi-zhou Zhang wrote: On Sat, Aug 18, 2012 at 3:31 AM, Mike Frysinger wrote: On Friday 17 August 2012 11:30:44 Zhizhou Zhang wrote: --- a/arch/mips/config.mk +++ b/arch/mips/config.mk +ifeq

Re: [U-Boot] [[Patch V2] mips: 14/16] add mips64 standalone link script

2012-08-17 Thread Zhi-zhou Zhang
On Sat, Aug 18, 2012 at 1:08 AM, Andrew Dyer amd...@gmail.com wrote: I think the OUTPUT_FORMAT line if wrong. This will produce little endian output even if explicitly told by command line switch -EB to make big endian. Yes, But if I want make it configureable, I should modify a lot in

Re: [U-Boot] [[Patch V2] mips: 04/16] add cpu/mips64/cpu.c

2012-08-17 Thread Zhi-zhou Zhang
On Sat, Aug 18, 2012 at 3:34 AM, Mike Frysinger vap...@gentoo.org wrote: On Friday 17 August 2012 11:30:47 Zhizhou Zhang wrote: --- /dev/null +++ b/arch/mips/cpu/mips64/cpu.c +void __attribute__((weak)) _machine_restart(void) +{ +} change to __weak (include linux/compiler.h if you

Re: [U-Boot] [Patch 0/17] New 'qemu-mips64' test architecture for U-Boot

2012-08-16 Thread Zhi-zhou Zhang
On Thu, Aug 16, 2012 at 5:31 AM, Daniel Schwierzeck daniel.schwierz...@gmail.com wrote: Hi, 2012/8/15 Zhi-zhou Zhang etou...@gmail.com: On Tue, Aug 14, 2012 at 11:51 PM, Mike Frysinger vap...@gentoo.org wrote: On Tuesday 14 August 2012 11:49:49 Mike Frysinger wrote: On Tuesday 14

Re: [U-Boot] [Patch 0/17] New 'qemu-mips64' test architecture for U-Boot

2012-08-15 Thread Zhi-zhou Zhang
On Tue, Aug 14, 2012 at 11:51 PM, Mike Frysinger vap...@gentoo.org wrote: On Tuesday 14 August 2012 11:49:49 Mike Frysinger wrote: On Tuesday 14 August 2012 11:06:51 Zhi-zhou Zhang wrote: As so far, U-Boot has already supports mips32. But there are some differences between mips64

[U-Boot] [Patch 0/17] New 'qemu-mips64' test architecture for U-Boot

2012-08-14 Thread Zhi-zhou Zhang
As so far, U-Boot has already supports mips32. But there are some differences between mips64 and mips32. Such as different ABI, different output format. so this patch adds mips64 support. I use cross compiler from clfs and build U-Boot like this: export

[U-Boot] [Patch 1/17] add mips64 build configuration in mips/config.mk

2012-08-14 Thread Zhi-zhou Zhang
diff --git a/arch/mips/config.mk b/arch/mips/config.mk index 6ab8acd..12df150 100644 --- a/arch/mips/config.mk +++ b/arch/mips/config.mk @@ -23,9 +23,13 @@ CROSS_COMPILE ?= mips_4KC- +ifeq $(CPU) mips64 +CONFIG_STANDALONE_LOAD_ADDR ?= 0xFfffFfff8020 -T mips64.lds +PLATFORM_CPPFLAGS +=

[U-Boot] [Patch 2/17] add mips64/Makefile

2012-08-14 Thread Zhi-zhou Zhang
diff --git a/arch/mips/cpu/mips64/Makefile b/arch/mips/cpu/mips64/Makefile new file mode 100644 index 000..eb8e005 --- /dev/null +++ b/arch/mips/cpu/mips64/Makefile @@ -0,0 +1,48 @@ +# +# (C) Copyright 2003-2006 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# See file CREDITS

[U-Boot] [Patch 3/16] add mips64/cache.S

2012-08-14 Thread Zhi-zhou Zhang
diff --git a/arch/mips/cpu/mips64/cache.S b/arch/mips/cpu/mips64/cache.S new file mode 100644 index 000..ba7c1b8 --- /dev/null +++ b/arch/mips/cpu/mips64/cache.S @@ -0,0 +1,229 @@ +/* + * Cache-handling routined for MIPS CPUs + * + * Copyright (c) 2003 Wolfgang Denk w...@denx.de + * + * See

[U-Boot] [Patch 4/16] add mips64/config.mk

2012-08-14 Thread Zhi-zhou Zhang
diff --git a/arch/mips/cpu/mips64/config.mk b/arch/mips/cpu/mips64/config.mk new file mode 100644 index 000..cec250a --- /dev/null +++ b/arch/mips/cpu/mips64/config.mk @@ -0,0 +1,36 @@ +# +# (C) Copyright 2003 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de +# +# See file CREDITS for

[U-Boot] [Patch 5/16] add mips64/cpu.h

2012-08-14 Thread Zhi-zhou Zhang
diff --git a/arch/mips/cpu/mips64/cpu.c b/arch/mips/cpu/mips64/cpu.c new file mode 100644 index 000..1ead349 --- /dev/null +++ b/arch/mips/cpu/mips64/cpu.c @@ -0,0 +1,116 @@ +/* + * (C) Copyright 2003 + * Wolfgang Denk, DENX Software Engineering, w...@denx.de + * + * See file CREDITS for list

[U-Boot] [Patch 6/16] add mips64/interrupts.c

2012-08-14 Thread Zhi-zhou Zhang
diff --git a/arch/mips/cpu/mips64/interrupts.c b/arch/mips/cpu/mips64/interrupts.c new file mode 100644 index 000..27aa179 --- /dev/null +++ b/arch/mips/cpu/mips64/interrupts.c @@ -0,0 +1,38 @@ +/* + * (C) Copyright 2003 + * Wolfgang Denk, DENX Software Engineering, w...@denx.de + * + * See

[U-Boot] [Patch 7/16] add mips64/start.S

2012-08-14 Thread Zhi-zhou Zhang
diff --git a/arch/mips/cpu/mips64/start.S b/arch/mips/cpu/mips64/start.S new file mode 100644 index 000..2208b6b --- /dev/null +++ b/arch/mips/cpu/mips64/start.S @@ -0,0 +1,374 @@ +/* + * Startup Code for MIPS64 CPU-core + * + * Copyright (c) 2003 Wolfgang Denk w...@denx.de + * + * See file

[U-Boot] [Patch 8/16] add mips64/time.c

2012-08-14 Thread Zhi-zhou Zhang
diff --git a/arch/mips/cpu/mips64/time.c b/arch/mips/cpu/mips64/time.c new file mode 100644 index 000..350896a --- /dev/null +++ b/arch/mips/cpu/mips64/time.c @@ -0,0 +1,86 @@ +/* + * (C) Copyright 2003 + * Wolfgang Denk, DENX Software Engineering, w...@denx.de. + * + * See file CREDITS for

[U-Boot] [Patch 9/16] make UNCACHED_SDRAM available for mips64

2012-08-14 Thread Zhi-zhou Zhang
diff --git a/arch/mips/include/asm/addrspace.h b/arch/mips/include/asm/addrspace.h index 3a1e6d6..b768bb5 100644 --- a/arch/mips/include/asm/addrspace.h +++ b/arch/mips/include/asm/addrspace.h @@ -136,7 +136,7 @@ cannot access physical memory directly from core */ #define UNCACHED_SDRAM(a)

[U-Boot] [Patch 10/16] add supports to mips64 in io operation

2012-08-14 Thread Zhi-zhou Zhang
diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h index 025012a..80eab75 100644 --- a/arch/mips/include/asm/io.h +++ b/arch/mips/include/asm/io.h @@ -120,12 +120,20 @@ static inline void set_io_port_base(unsigned long base) */ extern inline phys_addr_t virt_to_phys(volatile

[U-Boot] [Patch 13/16] add link script of qemu-mips64

2012-08-14 Thread Zhi-zhou Zhang
diff --git a/board/qemu-mips/u-boot.lds b/board/qemu-mips/u-boot.lds index 9460b20..06db68d 100644 --- a/board/qemu-mips/u-boot.lds +++ b/board/qemu-mips/u-boot.lds @@ -24,7 +24,11 @@ /* OUTPUT_FORMAT(elf32-bigmips, elf32-bigmips, elf32-bigmips) */ +#if defined(CONFIG_64BIT)

[U-Boot] [Patch 12/16] add config about mips64

2012-08-14 Thread Zhi-zhou Zhang
diff --git a/board/qemu-mips/config.mk b/board/qemu-mips/config.mk index 27cd34a..6a3d7a7 100644 --- a/board/qemu-mips/config.mk +++ b/board/qemu-mips/config.mk @@ -2,9 +2,16 @@ # Qemu -M mips system emulator # See http://fabrice.bellard.free.fr/qemu # +ifeq $(CPU) mips64 +# ROM version

[U-Boot] [Patch 11/16] make size_t equal to unsigned int

2012-08-14 Thread Zhi-zhou Zhang
err.. maybe a bug of gcc? In my memory, size_t is equaled to unsigned int. diff --git a/arch/mips/include/asm/posix_types.h b/arch/mips/include/asm/posix_types.h index 879aae2..86a866a 100644 --- a/arch/mips/include/asm/posix_types.h +++ b/arch/mips/include/asm/posix_types.h @@ -24,7 +24,11 @@

[U-Boot] [Patch 14/16] add board qemu-mips64

2012-08-14 Thread Zhi-zhou Zhang
diff --git a/boards.cfg b/boards.cfg index 1af87c0..f368543 100644 --- a/boards.cfg +++ b/boards.cfg @@ -374,6 +374,7 @@ M5485GFE m68kmcf547x_8x m548xevb freescale - M5485HFE m68kmcf547x_8x m548xevbfreescale -

[U-Boot] [Patch 15/16] add standalone link script

2012-08-14 Thread Zhi-zhou Zhang
diff --git a/examples/standalone/mips64.lds b/examples/standalone/mips64.lds new file mode 100644 index 000..00b96da --- /dev/null +++ b/examples/standalone/mips64.lds @@ -0,0 +1,59 @@ +/* + * (C) Copyright 2003 + * Wolfgang Denk Engineering, w...@denx.de + * + * See file CREDITS for list of

[U-Boot] [Patch 16/16] add configs/qemu-mips64.h

2012-08-14 Thread Zhi-zhou Zhang
diff --git a/include/configs/qemu-mips64.h b/include/configs/qemu-mips64.h new file mode 100644 index 000..767d4c3 --- /dev/null +++ b/include/configs/qemu-mips64.h @@ -0,0 +1,168 @@ +/* + * (C) Copyright 2003 + * Wolfgang Denk, DENX Software Engineering, w...@denx.de. + * + * See file CREDITS