arm64 patch
Subsystems (6)
v3 cover arm64 patch
From: David Feng <[email protected]>
*** BLURB HERE ***
Changes for v3:
- rewrite cache.S and exception.S that partly originated from linux kernel,
so the license should be ok.
- according to scott wood's advice, make the fdt 64bit initrd start address support a seperate patch.
David Feng (5):
core support of arm64
board support of arm64
arch support 1 of arm64
arch support 2 of arm64
64bit initrd start address support
arch/arm64/config.mk | 32 +++ arch/arm64/cpu/armv8/Makefile | 51 ++++ arch/arm64/cpu/armv8/cache.S | 144 ++++++++++ arch/arm64/cpu/armv8/config.mk | 29 ++ arch/arm64/cpu/armv8/cpu.c | 108 ++++++++ arch/arm64/cpu/armv8/exceptions.S | 189 +++++++++++++ arch/arm64/cpu/armv8/start.S | 197 ++++++++++++++ arch/arm64/cpu/armv8/tlb.S | 38 +++ arch/arm64/cpu/u-boot.lds | 73 +++++ arch/arm64/dts/aemv8a.dtsi | 234 ++++++++++++++++ arch/arm64/include/asm/arch-armv8/mmu.h | 117 ++++++++ arch/arm64/include/asm/atomic.h | 115 ++++++++ arch/arm64/include/asm/bitops.h | 153 +++++++++++ arch/arm64/include/asm/byteorder.h | 31 +++ arch/arm64/include/asm/cache.h | 53 ++++ arch/arm64/include/asm/config.h | 41 +++ arch/arm64/include/asm/errno.h | 1 + arch/arm64/include/asm/global_data.h | 38 +++ arch/arm64/include/asm/gpio.h | 1 + arch/arm64/include/asm/io.h | 193 +++++++++++++ arch/arm64/include/asm/linkage.h | 49 ++++ arch/arm64/include/asm/posix_types.h | 61 +++++ arch/arm64/include/asm/processor.h | 59 ++++ arch/arm64/include/asm/ptrace.h | 64 +++++ arch/arm64/include/asm/sections.h | 27 ++ arch/arm64/include/asm/string.h | 49 ++++ arch/arm64/include/asm/system.h | 106 ++++++++ arch/arm64/include/asm/types.h | 67 +++++ arch/arm64/include/asm/u-boot.h | 38 +++ arch/arm64/include/asm/unaligned.h | 28 ++ arch/arm64/include/asm/utils.h | 56 ++++ arch/arm64/lib/Makefile | 64 +++++ arch/arm64/lib/board.c | 453 +++++++++++++++++++++++++++++++ arch/arm64/lib/bootm.c | 211 ++++++++++++++ arch/arm64/lib/cache.c | 282 +++++++++++++++++++ arch/arm64/lib/crt0.S | 129 +++++++++ arch/arm64/lib/interrupts.c | 109 ++++++++ arch/arm64/lib/relocate.S | 72 +++++ arch/arm64/lib/reset.c | 37 +++ arch/arm64/lib/timer.c | 95 +++++++ board/armltd/dts/vexpress64.dts | 215 +++++++++++++++ board/armltd/vexpress64/Makefile | 43 +++ board/armltd/vexpress64/vexpress64.c | 63 +++++ boards.cfg | 1 + common/cmd_bdinfo.c | 32 +++ common/fdt_support.c | 66 ++--- common/image.c | 5 +- doc/README.arm64 | 10 + examples/standalone/stubs.c | 13 + include/configs/vexpress_aemv8a.h | 200 ++++++++++++++ include/image.h | 1 + lib/asm-offsets.c | 4 - 52 files changed, 4509 insertions(+), 38 deletions(-) create mode 100644 arch/arm64/config.mk create mode 100644 arch/arm64/cpu/armv8/Makefile create mode 100644 arch/arm64/cpu/armv8/cache.S create mode 100644 arch/arm64/cpu/armv8/config.mk create mode 100644 arch/arm64/cpu/armv8/cpu.c create mode 100644 arch/arm64/cpu/armv8/exceptions.S create mode 100644 arch/arm64/cpu/armv8/start.S create mode 100644 arch/arm64/cpu/armv8/tlb.S create mode 100644 arch/arm64/cpu/u-boot.lds create mode 100644 arch/arm64/dts/aemv8a.dtsi create mode 100644 arch/arm64/include/asm/arch-armv8/mmu.h create mode 100644 arch/arm64/include/asm/atomic.h create mode 100644 arch/arm64/include/asm/bitops.h create mode 100644 arch/arm64/include/asm/byteorder.h create mode 100644 arch/arm64/include/asm/cache.h create mode 100644 arch/arm64/include/asm/config.h create mode 100644 arch/arm64/include/asm/errno.h create mode 100644 arch/arm64/include/asm/global_data.h create mode 100644 arch/arm64/include/asm/gpio.h create mode 100644 arch/arm64/include/asm/io.h create mode 100644 arch/arm64/include/asm/linkage.h create mode 100644 arch/arm64/include/asm/posix_types.h create mode 100644 arch/arm64/include/asm/processor.h create mode 100644 arch/arm64/include/asm/ptrace.h create mode 100644 arch/arm64/include/asm/sections.h create mode 100644 arch/arm64/include/asm/string.h create mode 100644 arch/arm64/include/asm/system.h create mode 100644 arch/arm64/include/asm/types.h create mode 100644 arch/arm64/include/asm/u-boot.h create mode 100644 arch/arm64/include/asm/unaligned.h create mode 100644 arch/arm64/include/asm/utils.h create mode 100644 arch/arm64/lib/Makefile create mode 100644 arch/arm64/lib/board.c create mode 100644 arch/arm64/lib/bootm.c create mode 100644 arch/arm64/lib/cache.c create mode 100644 arch/arm64/lib/crt0.S create mode 100644 arch/arm64/lib/interrupts.c create mode 100644 arch/arm64/lib/relocate.S create mode 100644 arch/arm64/lib/reset.c create mode 100644 arch/arm64/lib/timer.c create mode 100644 board/armltd/dts/vexpress64.dts create mode 100644 board/armltd/vexpress64/Makefile create mode 100644 board/armltd/vexpress64/vexpress64.c create mode 100644 doc/README.arm64 create mode 100644 include/configs/vexpress_aemv8a.h
Signature · 1 line
1.7.9.5
PATCH v3 1/5 core support of arm64
From: David Feng <[email protected]>
This patch provide u-boot with arm64 support. Currently, it works on Foundation Model for armv8 or Fast Model for armv8.
---
Changes for v3:
- rewrite cache.S and exception.S that partly originated from linux kernel, so the license should be ok.
common/cmd_bdinfo.c | 32 ++++++++++++++++++++++++++++++++ common/image.c | 5 +++-- doc/README.arm64 | 10 ++++++++++ examples/standalone/stubs.c | 13 +++++++++++++ include/image.h | 1 + lib/asm-offsets.c | 4 ---- 6 files changed, 59 insertions(+), 6 deletions(-) create mode 100644 doc/README.arm64
common/cmd_bdinfo.c +32 -0
@@ -517,6 +517,38 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])return 0 ; } +#elif defined(CONFIG_ARM64 ) + +int do_bdinfo (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) +{ +int i; + +for (i =0 ; i <CONFIG_NR_DRAM_BANKS ; ++i) { +print_num ("DRAM bank" , i); +print_num (" -> start" , gd->bd->bi_dram[i].start); +print_num (" -> size" , gd->bd->bi_dram[i].size); + } + +printf ("baudrate = %ld bps\n" , gd->bd->bi_baudrate); + +print_num ("relocaddr" , gd->relocaddr); +print_num ("reloc off" , gd->reloc_off); +print_num ("sp start " , gd->start_addr_sp); +#ifndef CONFIG_SYS_DCACHE_OFF +print_num ("TLB addr" , gd->arch.tlb_addr); +#endif + +printf ("CPU frequency = %ld MHz\n" , gd->cpu_clk); +printf ("DDR frequency = %ld MHz\n" , gd->mem_clk); + +#if defined(CONFIG_CMD_NET ) +print_eth (0 ); +printf ("ip_addr = %s\n" ,getenv ("ipaddr" )); +#endif + +return 0 ; +} +#else #error "a case for this architecture does not exist!"#endif
common/image.c +3 -2
@@ -81,6 +81,7 @@ static const table_entry_t uimage_arch[] = { { IH_ARCH_NDS32, "nds32", "NDS32", }, { IH_ARCH_OPENRISC, "or1k", "OpenRISC 1000",}, { IH_ARCH_SANDBOX, "sandbox", "Sandbox", }, + { IH_ARCH_ARM64, "arm64", "ARM64", }, { -1, "", "", }, };
@@ -422,7 +423,7 @@ ulong getenv_bootm_low(void)#if defined(CONFIG_SYS_SDRAM_BASE )return CONFIG_SYS_SDRAM_BASE ; -#elif defined(CONFIG_ARM ) +#elif defined(CONFIG_ARM ) || defined(CONFIG_ARM64 )return gd->bd->bi_dram[0 ].start;#else return 0 ;
@@ -444,7 +445,7 @@ phys_size_t getenv_bootm_size(void) tmp =0 ; -#if defined(CONFIG_ARM ) +#if defined(CONFIG_ARM ) || defined(CONFIG_ARM64 )return gd->bd->bi_dram[0 ].size - tmp;#else return gd->bd->bi_memsize - tmp;
doc/README.arm64 new file +10 -0
@@ -0,0 +1,10 @@ +Notes: + +1. Currenly, u-boot running at EL2. + +2. Currently, gcc-aarch64 produce error when compiling with pie and rel_dyn. + So, GOT is used to relocate u-boot and CONFIG_NEEDS_MANUAL_RELOC is needed. + +3. Currently, fdt should be in the first 512MB of RAM, so, fdt_high should be handled specially. + I define fdt_high as 0xa0000000 when CONFIG_SYS_SDRAM_BASE is 0x80000000. +
examples/standalone/stubs.c +13 -0
@@ -195,6 +195,19 @@ gd_t *global_data; " l.jr r13\n" \ " l.nop\n" \ : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "r13"); +#elif defined(CONFIG_ARM64 ) +/* +* x18 holds the pointer to the global_data, x9 is a call-clobbered +* register +*/ +#define EXPORT_FUNC (x) \ + asm volatile ( \ +" .globl " #x "\n" \ +#x ":\n" \ +" ldr x9, [x18, %0]\n" \ +" ldr x9, [x9, %1]\n" \ +" br x9\n" \ + : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "x19");#else /*" addi $sp, $sp, -24\n" \ " br $r16\n" \*/
include/image.h +1 -0
@@ -156,6 +156,7 @@ struct lmb;#define IH_ARCH_SANDBOX 19/* Sandbox architecture (test only) */ #define IH_ARCH_NDS32 20/* ANDES Technology - NDS32 */ #define IH_ARCH_OPENRISC 21/* OpenRISC 1000 */ +#define IH_ARCH_ARM64 22/* ARM64 */ /* * Image Types
lib/asm-offsets.c +0 -4
@@ -29,15 +29,11 @@ int main(void)DEFINE (GD_BD , offsetof(struct global_data , bd)); -#if defined(CONFIG_ARM ) -DEFINE (GD_RELOCADDR , offsetof(struct global_data , relocaddr));DEFINE (GD_RELOC_OFF , offsetof(struct global_data , reloc_off));DEFINE (GD_START_ADDR_SP , offsetof(struct global_data , start_addr_sp)); -#endif -return 0 ; }
Signature · 1 line
1.7.9.5
PATCH v3 2/5 board support of arm64
In reply to fenghua at phytium.com.cnFrom: David Feng <[email protected]>
This patch provide u-boot with arm64 support. Currently, it works on Foundation Model for armv8 or Fast Model for armv8.
---
Changes for v3:
- rewrite cache.S and exception.S that partly originated from linux kernel, so the license should be ok.
board/armltd/dts/vexpress64.dts | 215 ++++++++++++++++++++++++++++++++++ board/armltd/vexpress64/Makefile | 43 +++++++ board/armltd/vexpress64/vexpress64.c | 63 ++++++++++ boards.cfg | 1 + include/configs/vexpress_aemv8a.h | 200 +++++++++++++++++++++++++++++++ 5 files changed, 522 insertions(+) create mode 100644 board/armltd/dts/vexpress64.dts create mode 100644 board/armltd/vexpress64/Makefile create mode 100644 board/armltd/vexpress64/vexpress64.c create mode 100644 include/configs/vexpress_aemv8a.h
board/armltd/dts/vexpress64.dts new file +215 -0
@@ -0,0 +1,215 @@ +/* + * ARM Ltd. Fast Models + * + * Architecture Envelope Model (AEM) ARMv8-A + * ARMAEMv8AMPCT + * + * RTSM_VE_AEMv8A.lisa + */ + +/dts-v1/; + +/memreserve/ 0x80000000 0x00010000; + +/ { + /* boot configurations for u-boot */ + config { + /*bootdelay = <1>;*/ + kernel-offset = <0x100000>; + rootdisk-offset = <0x800000>; + bootcmd = "bootm 0x100000 0x800000:0x2000000"; + }; +}; + +/ { + model = "RTSM_VE_AEMv8A"; + compatible = "arm,rtsm_ve,aemv8a", "arm,vexpress"; + interrupt-parent = <&gic>; + #address-cells = <2>; + #size-cells = <2>; + + /* chosen */ + /* generated by u-boot */ + + + aliases { + serial0 = &v2m_serial0; + serial1 = &v2m_serial1; + serial2 = &v2m_serial2; + serial3 = &v2m_serial3; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu at 0 { + device_type = "cpu"; + compatible = "arm,armv8"; + reg = <0>; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x8000fff8>; + }; + cpu at 1 { + device_type = "cpu"; + compatible = "arm,armv8"; + reg = <1>; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x8000fff8>; + }; + cpu at 2 { + device_type = "cpu"; + compatible = "arm,armv8"; + reg = <2>; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x8000fff8>; + }; + cpu at 3 { + device_type = "cpu"; + compatible = "arm,armv8"; + reg = <3>; + enable-method = "spin-table"; + cpu-release-addr = <0x0 0x8000fff8>; + }; + }; + + memory at 80000000 { + device_type = "memory"; + reg = <0x00000000 0x80000000 0 0x80000000>, + <0x00000008 0x80000000 0 0x80000000>; + }; + + gic: interrupt-controller at 2c001000 { + compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic"; + #interrupt-cells = <3>; + #address-cells = <0>; + interrupt-controller; + reg = <0x0 0x2c001000 0 0x1000>, + <0x0 0x2c002000 0 0x1000>, + <0x0 0x2c004000 0 0x2000>, + <0x0 0x2c006000 0 0x2000>; + interrupts = <1 9 0xf04>; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = <1 13 0xff01>, + <1 14 0xff01>, + <1 11 0xff01>, + <1 10 0xff01>; + clock-frequency = <100000000>; + }; + + pmu { + compatible = "arm,armv8-pmuv3"; + interrupts = <0 60 4>, + <0 61 4>, + <0 62 4>, + <0 63 4>; + }; + + smb { + compatible = "simple-bus"; + + #address-cells = <2>; + #size-cells = <1>; + ranges = <0 0 0 0x08000000 0x04000000>, + <1 0 0 0x14000000 0x04000000>, + <2 0 0 0x18000000 0x04000000>, + <3 0 0 0x1c000000 0x04000000>, + <4 0 0 0x0c000000 0x04000000>, + <5 0 0 0x10000000 0x04000000>; + + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 63>; + interrupt-map = <0 0 0 &gic 0 0 4>, + <0 0 1 &gic 0 1 4>, + <0 0 2 &gic 0 2 4>, + <0 0 3 &gic 0 3 4>, + <0 0 4 &gic 0 4 4>, + <0 0 5 &gic 0 5 4>, + <0 0 6 &gic 0 6 4>, + <0 0 7 &gic 0 7 4>, + <0 0 8 &gic 0 8 4>, + <0 0 9 &gic 0 9 4>, + <0 0 10 &gic 0 10 4>, + <0 0 11 &gic 0 11 4>, + <0 0 12 &gic 0 12 4>, + <0 0 13 &gic 0 13 4>, + <0 0 14 &gic 0 14 4>, + <0 0 15 &gic 0 15 4>, + <0 0 16 &gic 0 16 4>, + <0 0 17 &gic 0 17 4>, + <0 0 18 &gic 0 18 4>, + <0 0 19 &gic 0 19 4>, + <0 0 20 &gic 0 20 4>, + <0 0 21 &gic 0 21 4>, + <0 0 22 &gic 0 22 4>, + <0 0 23 &gic 0 23 4>, + <0 0 24 &gic 0 24 4>, + <0 0 25 &gic 0 25 4>, + <0 0 26 &gic 0 26 4>, + <0 0 27 &gic 0 27 4>, + <0 0 28 &gic 0 28 4>, + <0 0 29 &gic 0 29 4>, + <0 0 30 &gic 0 30 4>, + <0 0 31 &gic 0 31 4>, + <0 0 32 &gic 0 32 4>, + <0 0 33 &gic 0 33 4>, + <0 0 34 &gic 0 34 4>, + <0 0 35 &gic 0 35 4>, + <0 0 36 &gic 0 36 4>, + <0 0 37 &gic 0 37 4>, + <0 0 38 &gic 0 38 4>, + <0 0 39 &gic 0 39 4>, + <0 0 40 &gic 0 40 4>, + <0 0 41 &gic 0 41 4>, + <0 0 42 &gic 0 42 4>; + + /include/ "aemv8a.dtsi" + }; + + panels { + panel at 0 { + compatible = "panel"; + mode = "VGA"; + refresh = <60>; + xres = <640>; + yres = <480>; + pixclock = <39721>; + left_margin = <40>; + right_margin = <24>; + upper_margin = <32>; + lower_margin = <11>; + hsync_len = <96>; + vsync_len = <2>; + sync = <0>; + vmode = "FB_VMODE_NONINTERLACED"; + tim2 = "TIM2_BCD", "TIM2_IPC"; + cntl = "CNTL_LCDTFT", "CNTL_BGR", "CNTL_LCDVCOMP(1)"; + caps = "CLCD_CAP_5551", "CLCD_CAP_565", "CLCD_CAP_888"; + bpp = <16>; + }; + + panel at 1 { + compatible = "panel"; + mode = "XVGA"; + refresh = <60>; + xres = <1024>; + yres = <768>; + pixclock = <15748>; + left_margin = <152>; + right_margin = <48>; + upper_margin = <23>; + lower_margin = <3>; + hsync_len = <104>; + vsync_len = <4>; + sync = <0>; + vmode = "FB_VMODE_NONINTERLACED"; + tim2 = "TIM2_BCD", "TIM2_IPC"; + cntl = "CNTL_LCDTFT", "CNTL_BGR", "CNTL_LCDVCOMP(1)"; + caps = "CLCD_CAP_5551", "CLCD_CAP_565", "CLCD_CAP_888"; + bpp = <16>; + }; + }; +};
board/armltd/vexpress64/Makefile new file +43 -0
43 lines not on this page · raw message
board/armltd/vexpress64/vexpress64.c new file +63 -0
63 lines not on this page · raw message
boards.cfg +1 -0
@@ -1182,5 +1182,6 @@ gr_ep2s60 sparc leon3 - gaisler grsim sparc leon3 - gaisler gr_xc3s_1500 sparc leon3 - gaisler coreboot-x86 x86 x86 coreboot chromebook-x86 coreboot coreboot:SYS_TEXT_BASE=0x01110000 +vexpress_aemv8a arm64 armv8 vexpress64 armltd # Target ARCH CPU Board name Vendor SoC Options ########################################################################################################################
include/configs/vexpress_aemv8a.h new file +200 -0
200 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v3 2/5 board support of arm64
Quoted 5 lines · On Thu, Aug 15, 2013 at 8:47 AM, <[email protected]> wrote:
From: David Feng <[email protected]>
This patch provide u-boot with arm64 support. Currently, it works on Foundation Model for armv8 or Fast Model for armv8.
Quoted 7 lines
Signed-off-by David Feng <[email protected]>---
Changes for v3:
- rewritecache.Sandexception.Sthat partly originated from linux kernel, so the license should be ok.board/armltd/dts/vexpress64.dts | 215 ++++++++++++++++++++++++++++++++++
Why is the device tree source in u-boot (instead of in the kernel)?
Is this temporary? It
looks like this device tree is just a copy from somewhere else.
Would suggest removing this from this patch series and keep the dts maintained in the Linux kernel.
Stuart
PATCH v3 2/5 board support of arm64
Quoted 12 lines · Stuart Yoder
Quoted 11 lines · On Thu, Aug 15, 2013 at 8:47 AM, <[email protected]> wrote:
From: David Feng <[email protected]>
This patch provide u-boot with arm64 support. Currently, it works on Foundation Model for armv8 or Fast Model for armv8.
Signed-off-by David Feng <[email protected]>---
Changes for v3:
- rewritecache.Sandexception.Sthat partly originated from linux kernel, so the license should be ok.
Quoted 8 lines
Quoted 1 line
board/armltd/dts/vexpress64.dts | 215 ++++++++++++++++++++++++++++++++++Why is the device tree source in u-boot (instead of in the kernel)?
Is this temporary? It
looks like this device tree is just a copy from somewhere else.Would suggest removing this from this patch series and keep the dts maintained in the Linux kernel.
U-Boot itself uses the device tree (not just to patch up for Linux) on some targets.
Even with the way PPC uses device trees, it doesn't really make sense to keep them in the kernel given that they're meant to be OS-neutral, and have ties to U-Boot in terms of what gets fixed up at runtime.
-Scott
PATCH v3 2/5 board support of arm64
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 22 lines · Scott Wood
Quoted 14 lines · Stuart Yoder
Quoted 11 lines · On Thu, Aug 15, 2013 at 8:47 AM, <[email protected]> wrote:
From: David Feng <[email protected]>
This patch provide u-boot with arm64 support. Currently, it works on Foundation Model for armv8 or Fast Model for armv8.
Signed-off-by David Feng <[email protected]> --- Changesfor v3: - rewrite
cache.Sandexception.Sthat partly originated from linux kernel, so the license should be ok.
board/armltd/dts/vexpress64.dts| 215
++++++++++++++++++++++++++++++++++Quoted 6 lines
Why is the device tree source in u-boot (instead of in the
kernel)? Is this temporary? It looks like this device tree is
just a copy from somewhere else.Would suggest removing this from this patch series and keep the dts maintained in the Linux kernel.
Quoted 7 lines
U-Boot itself uses the device tree (not just to patch up for Linux) on some targets.
Even with the way PPC uses device trees, it doesn't really make sense to keep them in the kernel given that they're meant to be OS-neutral, and have ties to U-Boot in terms of what gets fixed up at runtime.
Longer term, I want us to be able to make more use of device trees, where possible and bindings are complete and stable. And at that point we'll have to deal with "how do we get a DT from $where-ever to here to use.
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJSEoNhAAoJENk4IS6UOR1Wo4EQAIYz21GZOidLA3BzN1BjTmdK irumwyi0iRZto4jEpqyr7UjOBK+cmHDq3/hhzo1Y4MlX3YezD+yPWRY+7+bk2Dl6 B8huuHaLMTuNK7AHPgMAOmbdxwaQRs8ZP8NA26YH5nvjOqGfpjhPDr+gD7qcRTCA 3RkOVuD5pB6mtdZdGCZqvRVAW9w+6pIhNJpokFmlvRIXLh48R7RAyiu3Ac1JPL8k sIHmFDDEFhTcbsJdDB93uEIKqMM0K2enhpVB09ZxxpL+EVGwfVYoMGO3q0+2kL8y q0uawG1vwrkniB0tV5Snp7EBSQdlRo1QIfutfNYI1QRgUEipY41Supx/OkAvaHAP W2e8tmbq9EaU+TRV3SHn6AjBCTy4shYYv4r/mvEjdVhblxGK4MTdhUmhGKFABU/D 4odQlRXDFirImlELCKXr3qgT3oTWuPjIu9Udc6llwbkgZSteGrdTOyRtRo/xJ5H3 34EkHmFw65cW0kTAhJc91DzrIG7beRM5WVqJfviXE1X5uugJGg3LZidiFQxDPBGM q+alr+G5Wvo+xrqnmnWeBEev24Oift0GoG4nEtKcnlsQj7i5eEbJj7u6ox7OszCb 8Jp9tVXFZ7c3ZuLh3lcKGYxSnrH81NBxC5f17q+g4pprAxgFTB4DV7WPeqUUxlQB Hqsm3WzPEoAu5NCD3J7/
=9iEp
-----END PGP SIGNATURE-----
PATCH v3 2/5 board support of arm64
In reply to Scott WoodQuoted 22 lines · Scott Wood
Quoted 12 lines · Stuart Yoder
Quoted 11 lines · On Thu, Aug 15, 2013 at 8:47 AM, <[email protected]> wrote:
From: David Feng <[email protected]>
This patch provide u-boot with arm64 support. Currently, it works on Foundation Model for armv8 or Fast Model for armv8.
Signed-off-by David Feng <[email protected]>---
Changes for v3:
- rewritecache.Sandexception.Sthat partly originated from linux kernel, so the license should be ok.Quoted 8 lines
Quoted 1 line
board/armltd/dts/vexpress64.dts | 215 ++++++++++++++++++++++++++++++++++Why is the device tree source in u-boot (instead of in the kernel)?
Is this temporary? It
looks like this device tree is just a copy from somewhere else.Would suggest removing this from this patch series and keep the dts maintained in the Linux kernel.
Quoted 6 lines
U-Boot itself uses the device tree (not just to patch up for Linux) on some targets.
Even with the way PPC uses device trees, it doesn't really make sense to keep them in the kernel given that they're meant to be OS-neutral, and have ties to U-Boot in terms of what gets fixed up at runtime.
It may not make sense, but that is where they are kept currently. It doesn't make
sense to maintain 2 copies of a vexpress64.dts device tree in 2 different places...or to maintain 1 lone device tree in u-boot.
Maybe we need a git repo for device trees that could be included in Linux, u-boot, and other things a submodule.
Stuart
PATCH v3 2/5 board support of arm64
Quoted 23 lines · Stuart Yoder
Quoted 22 lines · Scott Wood
Quoted 20 lines · Stuart Yoder
Quoted 5 lines · On Thu, Aug 15, 2013 at 8:47 AM, <[email protected]> wrote:
From: David Feng <[email protected]>
This patch provide u-boot with arm64 support. Currently, it works on Foundation Model for armv8 or Fast Model for armv8.
Quoted 7 lines
Signed-off-by David Feng <[email protected]>---
Changes for v3:
- rewritecache.Sandexception.Sthat partly originated from linux kernel, so the license should be ok.board/armltd/dts/vexpress64.dts | 215 ++++++++++++++++++++++++++++++++++Why is the device tree source in u-boot (instead of in the kernel)?
Is this temporary? It
looks like this device tree is just a copy from somewhere else.Would suggest removing this from this patch series and keep the dts maintained in the Linux kernel.
Quoted 8 lines
Quoted 6 lines
U-Boot itself uses the device tree (not just to patch up for Linux) on some targets.
Even with the way PPC uses device trees, it doesn't really make sense to keep them in the kernel given that they're meant to be OS-neutral, and have ties to U-Boot in terms of what gets fixed up at runtime.
It may not make sense, but that is where they are kept currently.
For PPC.
Quoted 2 lines
It doesn't make sense to maintain 2 copies of a
vexpress64.dtsdevice tree in 2 different places...or to maintain 1 lone device tree in u-boot.
Why does it not make sense for there to be one lone device tree in U-Boot?
A device tree that is not used with U-Boot may not look the same, since U-Boot is (at least on some platforms) responsible for filling in parts of the tree, and (again on some platforms) for setting up the address map.
Quoted 2 lines
Maybe we need a git repo for device trees that could be included in Linux, u-boot, and other things a submodule.
Submodules can be a pain. If we don't use them for DTC, why would we use them for this? Since they require extra commands, you'd be modifying the workflow of everyone that builds U-Boot and/or Linux for affected platforms.
-Scott
PATCH v3 2/5 board support of arm64
Quoted 27 lines · Scott Wood
Quoted 26 lines · Stuart Yoder
Quoted 25 lines · Scott Wood
Quoted 12 lines · Stuart Yoder
Quoted 11 lines · On Thu, Aug 15, 2013 at 8:47 AM, <[email protected]> wrote:
From: David Feng <[email protected]>
This patch provide u-boot with arm64 support. Currently, it works on Foundation Model for armv8 or Fast Model for armv8.
Signed-off-by David Feng <[email protected]>---
Changes for v3:
- rewritecache.Sandexception.Sthat partly originated from linux kernel, so the license should be ok.Quoted 8 lines
Quoted 1 line
board/armltd/dts/vexpress64.dts | 215 ++++++++++++++++++++++++++++++++++Why is the device tree source in u-boot (instead of in the kernel)?
Is this temporary? It
looks like this device tree is just a copy from somewhere else.Would suggest removing this from this patch series and keep the dts maintained in the Linux kernel.
U-Boot itself uses the device tree (not just to patch up for Linux) on some targets.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Even with the way PPC uses device trees, it doesn't really make sense to keep them in the kernel given that they're meant to be OS-neutral, and have ties to U-Boot in terms of what gets fixed up at runtime.
It may not make sense, but that is where they are kept currently.
For PPC.
$ find arch/arm/boot/dts | wc -l 425 $ find arch/powerpc/boot/dts | wc -l 315
There are also a handful of device trees under arch/arm64/boot/dts, including what looks like a vexpress board.
Quoted 5 lines
Quoted 2 lines
It doesn't make sense to maintain 2 copies of a
vexpress64.dtsdevice tree in 2 different places...or to maintain 1 lone device tree in u-boot.Why does it not make sense for there to be one lone device tree in U-Boot?
It doesn't make sense to me to keep one device tree in u-boot and the rest in the kernel.
I don't know where that vexpress64.dts came from, but I'm guessing it's a copy from the Linux kernel.
Quoted 5 lines
A device tree that is not used with U-Boot may not look the same, since U-Boot is (at least on some platforms) responsible for filling in parts of the tree, and (again on some platforms) for setting up the address map.
Quoted 7 lines
Quoted 2 lines
Maybe we need a git repo for device trees that could be included in Linux, u-boot, and other things a submodule.
Submodules can be a pain. If we don't use them for DTC, why would we use them for this? Since they require extra commands, you'd be modifying the workflow of everyone that builds U-Boot and/or Linux for affected platforms.
You shouldn't need device trees for building u-boot or the kernel. I don't think a couple of extra commands is that burdensome.
I agree the DTS files really don't belong in the kernel, but there is
currently no better repository that has been proposed. I'm not
sure u-boot is a better place. Device trees should be independent
of any particular bootloader or OS.
Stuart
PATCH v3 2/5 board support of arm64
Quoted 18 lines · Stuart Yoder
Quoted 17 lines · Scott Wood
Quoted 16 lines · Stuart Yoder
Quoted 14 lines · Scott Wood
Quoted 6 lines · Stuart Yoder
Why is the device tree source in u-boot (instead of in the kernel)?
Is this temporary? It
looks like this device tree is just a copy from somewhere else.Would suggest removing this from this patch series and keep the dts maintained in the Linux kernel.
U-Boot itself uses the device tree (not just to patch up for Linux) on some targets.
Even with the way PPC uses device trees, it doesn't really make sense to keep them in the kernel given that they're meant to be OS-neutral, and have ties to U-Boot in terms of what gets fixed up at runtime.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
It may not make sense, but that is where they are kept currently.
For PPC.
$ find arch/arm/boot/dts | wc -l 425 $ find arch/powerpc/boot/dts | wc -l 315
My point is this isn't the first device tree to go into U-Boot for ARM.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
It doesn't make sense to maintain 2 copies of a
vexpress64.dtsdevice tree in 2 different places...or to maintain 1 lone device tree in u-boot.Why does it not make sense for there to be one lone device tree in U-Boot?
It doesn't make sense to me to keep one device tree in u-boot and the rest in the kernel.
That's not what's being proposed.
Quoted 6 lines
Quoted 4 lines
Submodules can be a pain. If we don't use them for DTC, why would we use them for this? Since they require extra commands, you'd be modifying the workflow of everyone that builds U-Boot and/or Linux for affected platforms.
You shouldn't need device trees for building u-boot or the kernel.
Then why mess around with submodules instead of just a separate repository?
Quoted 1 line
I don't think a couple of extra commands is that burdensome.
I disagree, and at the least don't want to be the one to advocate such a change. :-)
Quoted 4 lines
I agree the DTS files really don't belong in the kernel, but there is
currently no better repository that has been proposed. I'm not
sure u-boot is a better place. Device trees should be independent
of any particular bootloader or OS.
The final device tree that the OS sees should be independent of the OS. The dts is not the final device tree, and is tied to U-Boot. The device tree in general is also tied to the bootloader in other ways -- U-Boot expects certain aliases, configurable addresses must match, etc.
-Scott
PATCH v3 2/5 board support of arm64
Quoted 21 lines · Scott Wood
Quoted 20 lines · Stuart Yoder
Quoted 19 lines · Scott Wood
Quoted 17 lines · Stuart Yoder
Quoted 8 lines · Scott Wood
Quoted 6 lines · Stuart Yoder
Why is the device tree source in u-boot (instead of in the kernel)?
Is this temporary? It
looks like this device tree is just a copy from somewhere else.Would suggest removing this from this patch series and keep the dts maintained in the Linux kernel.
Quoted 6 lines
U-Boot itself uses the device tree (not just to patch up for Linux) on some targets.
Even with the way PPC uses device trees, it doesn't really make sense to keep them in the kernel given that they're meant to be OS-neutral, and have ties to U-Boot in terms of what gets fixed up at runtime.
It may not make sense, but that is where they are kept currently.
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
For PPC.
$ find arch/arm/boot/dts | wc -l 425 $ find arch/powerpc/boot/dts | wc -l 315My point is this isn't the first device tree to go into U-Boot for ARM.
Right, but a problem we have today is that the existing ones are incompatible with the real device trees for the devices in question.
Quoted 31 lines
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
It doesn't make sense to maintain 2 copies of a
vexpress64.dtsdevice tree in 2 different places...or to maintain 1 lone device tree in u-boot.Why does it not make sense for there to be one lone device tree in U-Boot?
It doesn't make sense to me to keep one device tree in u-boot and the rest in the kernel.
That's not what's being proposed.
Quoted 6 lines
Quoted 4 lines
Submodules can be a pain. If we don't use them for DTC, why would we use them for this? Since they require extra commands, you'd be modifying the workflow of everyone that builds U-Boot and/or Linux for affected platforms.
You shouldn't need device trees for building u-boot or the kernel.
Then why mess around with submodules instead of just a separate repository?
Quoted 1 line
I don't think a couple of extra commands is that burdensome.
I disagree, and at the least don't want to be the one to advocate such a change. :-)
Quoted 4 lines
I agree the DTS files really don't belong in the kernel, but there is
currently no better repository that has been proposed. I'm not
sure u-boot is a better place. Device trees should be independent
of any particular bootloader or OS.
Quoted 4 lines
The final device tree that the OS sees should be independent of the OS. The dts is not the final device tree, and is tied to U-Boot. The device tree in general is also tied to the bootloader in other ways -- U-Boot expects certain aliases, configurable addresses must match, etc.
I really hope that when the data gets pulled out of the kernel we'll have a useable central repository somewhere that can be used and various problems like this are taken into consideration.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130823/09fdafea/attachment.pgp>
PATCH v3 3/5 arch support 1 of arm64
In reply to fenghua at phytium.com.cnFrom: David Feng <[email protected]>
This patch provide u-boot with arm64 support. Currently, it works on Foundation Model for armv8 or Fast Model for armv8.
---
Changes for v3:
- rewrite cache.S and exception.S that partly originated from linux kernel, so the license should be ok.
arch/arm64/lib/Makefile | 64 ++++++ arch/arm64/lib/board.c | 453 +++++++++++++++++++++++++++++++++++++++++++ arch/arm64/lib/bootm.c | 211 ++++++++++++++++++++ arch/arm64/lib/cache.c | 282 +++++++++++++++++++++++++++ arch/arm64/lib/crt0.S | 129 ++++++++++++ arch/arm64/lib/interrupts.c | 109 +++++++++++ arch/arm64/lib/relocate.S | 72 +++++++ arch/arm64/lib/reset.c | 37 ++++ arch/arm64/lib/timer.c | 95 +++++++++ 9 files changed, 1452 insertions(+) create mode 100644 arch/arm64/lib/Makefile create mode 100644 arch/arm64/lib/board.c create mode 100644 arch/arm64/lib/bootm.c create mode 100644 arch/arm64/lib/cache.c create mode 100644 arch/arm64/lib/crt0.S create mode 100644 arch/arm64/lib/interrupts.c create mode 100644 arch/arm64/lib/relocate.S create mode 100644 arch/arm64/lib/reset.c create mode 100644 arch/arm64/lib/timer.c
arch/arm64/lib/Makefile new file +64 -0
@@ -0,0 +1,64 @@ +# +# (C) Copyright 2002-2006 +# Wolfgang Denk, DENX Software Engineering, wd at denx.de. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(ARCH).o +LIBGCC = $(obj)libgcc.o + +COBJS-y += board.o +COBJS-y += interrupts.o +COBJS-y += reset.o +COBJS-y += cache.o +COBJS-y += timer.o + +COBJS-$(CONFIG_CMD_BOOTM) += bootm.o + +SOBJS-y += crt0.o +SOBJS-y += relocate.o + +SRCS := $(GLSOBJS:.o=.S) $(GLCOBJS:.o=.c) \ + $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) +LGOBJS := $(addprefix $(obj),$(GLSOBJS)) \ + $(addprefix $(obj),$(GLCOBJS)) + +# Always build libarm64.o +TARGETS := $(LIB) + +all: $(TARGETS) + +$(LIB): $(obj).depend $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +$(LIBGCC): $(obj).depend $(LGOBJS) + $(call cmd_link_o_target, $(LGOBJS)) + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################
arch/arm64/lib/board.c new file +453 -0
453 lines not on this page · raw message
arch/arm64/lib/bootm.c new file +211 -0
211 lines not on this page · raw message
arch/arm64/lib/cache.c new file +282 -0
282 lines not on this page · raw message
arch/arm64/lib/crt0.S new file +129 -0
129 lines not on this page · raw message
arch/arm64/lib/interrupts.c new file +109 -0
109 lines not on this page · raw message
arch/arm64/lib/relocate.S new file +72 -0
72 lines not on this page · raw message
arch/arm64/lib/reset.c new file +37 -0
@@ -0,0 +1,37 @@ +/* +* Copyright (c) 2013 David Feng <[email protected]> +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#include <common.h> + +int do_reset (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) +{ +puts ("Resetting system ...\n" ); + +udelay (50000 );/* wait 50 ms */ + +disable_interrupts (); + +reset_cpu (0 ); + +/*NOTREACHED*/ +return 0 ; +}
arch/arm64/lib/timer.c new file +95 -0
95 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v3 4/5 arch support 2 of arm64
In reply to fenghua at phytium.com.cnFrom: David Feng <[email protected]>
This patch provide u-boot with arm64 support. Currently, it works on Foundation Model for armv8 or Fast Model for armv8.
---
Changes for v3:
- rewrite cache.S and exception.S that partly originated from linux kernel, so the license should be ok.
arch/arm64/config.mk | 32 +++++ arch/arm64/cpu/armv8/Makefile | 51 +++++++ arch/arm64/cpu/armv8/cache.S | 144 +++++++++++++++++++ arch/arm64/cpu/armv8/config.mk | 29 ++++ arch/arm64/cpu/armv8/cpu.c | 108 ++++++++++++++ arch/arm64/cpu/armv8/exceptions.S | 189 +++++++++++++++++++++++++ arch/arm64/cpu/armv8/start.S | 197 ++++++++++++++++++++++++++ arch/arm64/cpu/armv8/tlb.S | 38 +++++ arch/arm64/cpu/u-boot.lds | 73 ++++++++++ arch/arm64/dts/aemv8a.dtsi | 234 +++++++++++++++++++++++++++++++ arch/arm64/include/asm/arch-armv8/mmu.h | 117 ++++++++++++++++ arch/arm64/include/asm/atomic.h | 115 +++++++++++++++ arch/arm64/include/asm/bitops.h | 153 ++++++++++++++++++++ arch/arm64/include/asm/byteorder.h | 31 ++++ arch/arm64/include/asm/cache.h | 53 +++++++ arch/arm64/include/asm/config.h | 41 ++++++ arch/arm64/include/asm/errno.h | 1 + arch/arm64/include/asm/global_data.h | 38 +++++ arch/arm64/include/asm/gpio.h | 1 + arch/arm64/include/asm/io.h | 193 +++++++++++++++++++++++++ arch/arm64/include/asm/linkage.h | 49 +++++++ arch/arm64/include/asm/posix_types.h | 61 ++++++++ arch/arm64/include/asm/processor.h | 59 ++++++++ arch/arm64/include/asm/ptrace.h | 64 +++++++++ arch/arm64/include/asm/sections.h | 27 ++++ arch/arm64/include/asm/string.h | 49 +++++++ arch/arm64/include/asm/system.h | 106 ++++++++++++++ arch/arm64/include/asm/types.h | 67 +++++++++ arch/arm64/include/asm/u-boot.h | 38 +++++ arch/arm64/include/asm/unaligned.h | 28 ++++ arch/arm64/include/asm/utils.h | 56 ++++++++ 31 files changed, 2442 insertions(+) create mode 100644 arch/arm64/config.mk create mode 100644 arch/arm64/cpu/armv8/Makefile create mode 100644 arch/arm64/cpu/armv8/cache.S create mode 100644 arch/arm64/cpu/armv8/config.mk create mode 100644 arch/arm64/cpu/armv8/cpu.c create mode 100644 arch/arm64/cpu/armv8/exceptions.S create mode 100644 arch/arm64/cpu/armv8/start.S create mode 100644 arch/arm64/cpu/armv8/tlb.S create mode 100644 arch/arm64/cpu/u-boot.lds create mode 100644 arch/arm64/dts/aemv8a.dtsi create mode 100644 arch/arm64/include/asm/arch-armv8/mmu.h create mode 100644 arch/arm64/include/asm/atomic.h create mode 100644 arch/arm64/include/asm/bitops.h create mode 100644 arch/arm64/include/asm/byteorder.h create mode 100644 arch/arm64/include/asm/cache.h create mode 100644 arch/arm64/include/asm/config.h create mode 100644 arch/arm64/include/asm/errno.h create mode 100644 arch/arm64/include/asm/global_data.h create mode 100644 arch/arm64/include/asm/gpio.h create mode 100644 arch/arm64/include/asm/io.h create mode 100644 arch/arm64/include/asm/linkage.h create mode 100644 arch/arm64/include/asm/posix_types.h create mode 100644 arch/arm64/include/asm/processor.h create mode 100644 arch/arm64/include/asm/ptrace.h create mode 100644 arch/arm64/include/asm/sections.h create mode 100644 arch/arm64/include/asm/string.h create mode 100644 arch/arm64/include/asm/system.h create mode 100644 arch/arm64/include/asm/types.h create mode 100644 arch/arm64/include/asm/u-boot.h create mode 100644 arch/arm64/include/asm/unaligned.h create mode 100644 arch/arm64/include/asm/utils.h
arch/arm64/config.mk new file +32 -0
@@ -0,0 +1,32 @@ +# +# Copyright (c) 2013 FengHua <[email protected]> +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +CROSS_COMPILE ?= aarch64-linux-gnu- + +ifndef CONFIG_STANDALONE_LOAD_ADDR +CONFIG_STANDALONE_LOAD_ADDR = 0x81000000 +endif + +PLATFORM_CPPFLAGS += -DCONFIG_ARM64 -fpic -mstrict-align + +# needed for relocation +LDFLAGS_u-boot +=
arch/arm64/cpu/armv8/Makefile new file +51 -0
51 lines not on this page · raw message
arch/arm64/cpu/armv8/cache.S new file +144 -0
144 lines not on this page · raw message
arch/arm64/cpu/armv8/config.mk new file +29 -0
@@ -0,0 +1,29 @@ +# +# Copyright (c) 2013 FengHua <[email protected]> +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +PLATFORM_RELFLAGS += -fno-common -ffixed-x18 + +PF_CPPFLAGS_ARMV8 := $(call cc-option, -march=armv8-a) +PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_ARMV8) + +# SEE README.arm-unaligned-accesses +PF_NO_UNALIGNED := $(call cc-option, -mstrict-align) +PLATFORM_NO_UNALIGNED := $(PF_NO_UNALIGNED)
arch/arm64/cpu/armv8/cpu.c new file +108 -0
108 lines not on this page · raw message
arch/arm64/cpu/armv8/exceptions.S new file +189 -0
189 lines not on this page · raw message
arch/arm64/cpu/armv8/start.S new file +197 -0
197 lines not on this page · raw message
arch/arm64/cpu/armv8/tlb.S new file +38 -0
@@ -0,0 +1,38 @@ +/* + * Copyright (c) 2013 David Feng <[email protected]> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include <asm-offsets.h> +#include <config.h> +#include <version.h> +#include <linux/linkage.h> + +/* + * void __invalidate_tlb_all(void) + * + * invalidate all tlb entries. + */ +ENTRY(__invalidate_tlb_all) + tlbi alle2 + dsb sy + isb + ret +ENDPROC(__invalidate_tlb_all)
arch/arm64/cpu/u-boot.lds new file +73 -0
73 lines not on this page · raw message
arch/arm64/dts/aemv8a.dtsi new file +234 -0
234 lines not on this page · raw message
arch/arm64/include/asm/arch-armv8/mmu.h new file +117 -0
117 lines not on this page · raw message
arch/arm64/include/asm/atomic.h new file +115 -0
115 lines not on this page · raw message
arch/arm64/include/asm/bitops.h new file +153 -0
153 lines not on this page · raw message
arch/arm64/include/asm/byteorder.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* linux/include/asm-arm/byteorder.h +* +* ARM Endian-ness. In little endian mode, the data bus is connected such +* that byte accesses appear as: +* 0 = d0...d7, 1 = d8...d15, 2 = d16...d23, 3 = d24...d31 +* and word accesses (data or instruction) appear as: +* d0...d31 +* +* When in big endian mode, byte accesses appear as: +* 0 = d24...d31, 1 = d16...d23, 2 = d8...d15, 3 = d0...d7 +* and word accesses (data or instruction) appear as: +* d0...d31 +*/ +#ifndef __ASM_ARM64_BYTEORDER_H +#define __ASM_ARM64_BYTEORDER_H + +#include <asm/types.h> + +#if !defined(__STRICT_ANSI__) || defined(__KERNEL__) +# define __BYTEORDER_HAS_U64__ +# define __SWAB_64_THRU_32__ +#endif + +#ifdef __BIG_ENDIAN__ +#include <linux/byteorder/big_endian.h> +#else +#include <linux/byteorder/little_endian.h> +#endif + +#endif /* __ASM_ARM64_BYTEORDER_H */
arch/arm64/include/asm/cache.h new file +53 -0
53 lines not on this page · raw message
arch/arm64/include/asm/config.h new file +41 -0
41 lines not on this page · raw message
arch/arm64/include/asm/errno.h new file +1 -0
@@ -0,0 +1 @@ +#include <asm-generic/errno.h>
arch/arm64/include/asm/global_data.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* Copyright (c) 2013 David Feng <[email protected]> +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#ifndef __ASM_ARM64_GBL_DATA_H +#define __ASM_ARM64_GBL_DATA_H + +/* Architecture-specific global data */ +struct arch_global_data { +#ifndef CONFIG_SYS_DCACHE_OFF +unsigned long tlb_addr; +unsigned long tlb_size; +#endif +}; + +#include <asm-generic/global_data.h> + +#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("x18") + +#endif /* __ASM_ARM64_GBL_DATA_H */
arch/arm64/include/asm/gpio.h new file +1 -0
@@ -0,0 +1 @@ +#include <asm-generic/gpio.h>
arch/arm64/include/asm/io.h new file +193 -0
193 lines not on this page · raw message
arch/arm64/include/asm/linkage.h new file +49 -0
49 lines not on this page · raw message
arch/arm64/include/asm/posix_types.h new file +61 -0
61 lines not on this page · raw message
arch/arm64/include/asm/processor.h new file +59 -0
59 lines not on this page · raw message
arch/arm64/include/asm/ptrace.h new file +64 -0
64 lines not on this page · raw message
arch/arm64/include/asm/sections.h new file +27 -0
@@ -0,0 +1,27 @@ +/* +* Copyright (c) 2012 The Chromium OS Authors. +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#ifndef __ASM_ARM_SECTIONS_H +#define __ASM_ARM_SECTIONS_H + +#include <asm-generic/sections.h> + +#endif
arch/arm64/include/asm/string.h new file +49 -0
49 lines not on this page · raw message
arch/arm64/include/asm/system.h new file +106 -0
106 lines not on this page · raw message
arch/arm64/include/asm/types.h new file +67 -0
67 lines not on this page · raw message
arch/arm64/include/asm/u-boot.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* Copyright (c) 2013 David Feng <[email protected]> +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#ifndef _U_BOOT_ARM64_H_ +#define _U_BOOT_ARM64_H_ + +typedef struct bd_info { +unsigned long bi_baudrate;/* serial console baudrate */ +struct /* RAM configuration */ + { +unsigned long start; +unsigned long size; + } bi_dram[CONFIG_NR_DRAM_BANKS ]; +}bd_t ; + +/* For image.h:image_check_target_arch() */ +#define IH_ARCH_DEFAULT IH_ARCH_ARM64 + +#endif /* _U_BOOT_ARM64_H_ */
arch/arm64/include/asm/unaligned.h new file +28 -0
@@ -0,0 +1,28 @@ +/* +* Copyright (c) 2013 David Feng <[email protected]> +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#ifndef _ASM_ARM64_UNALIGNED_H +#define _ASM_ARM64_UNALIGNED_H + +#include <asm-generic/unaligned.h> + +#endif /* _ASM_ARM64_UNALIGNED_H */
arch/arm64/include/asm/utils.h new file +56 -0
56 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v3 5/5 64bit initrd start address support
In reply to fenghua at phytium.com.cnFrom: David Feng <[email protected]>
This patch fix the fdt_initrd function.
It will get #address_cells property first, then write "linux,initrd-start" and "linux,initrd-end" property value to fdt according to address cell size. So, the 64bit initrd start address could be supported.
--- common/fdt_support.c | 66 ++++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 32 deletions(-)
common/fdt_support.c +34 -32
@@ -21,6 +21,34 @@*/ DECLARE_GLOBAL_DATA_PTR ; +/* +* Get cells len in bytes +* if #NNNN-cells property is 2 then len is 8 +* otherwise len is 4 +*/ +static int get_cells_len (void *blob,char *nr_cells_name) +{ +const fdt32_t *cell; + + cell =fdt_getprop (blob,0 , nr_cells_name,NULL ); +if (cell &&fdt32_to_cpu (*cell) ==2 ) +return 8 ; + +return 4 ; +} + +/* +* Write a 4 or 8 byte big endian cell +*/ +static void write_cell (u8 *addr,u64 val,int size) +{ +int shift = (size -1 ) *8 ; +while (size-- >0 ) { + *addr++ = (val >> shift) &0xff ; + shift -=8 ; + } +} +/** * fdt_getprop_u32_default - Find a node and return it's property or a default *
@@ -131,9 +159,9 @@ static int fdt_fixup_stdout(void *fdt, int chosenoff)int fdt_initrd (void *fdt,ulong initrd_start,ulong initrd_end,int force) { -int nodeoffset; +int nodeoffset, addr_cell_len;int err, j, total; -fdt32_t tmp; +fdt64_t tmp;const char *path;uint64_t addr, size;
@@ -170,9 +198,11 @@ int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end, int force)return err; } + addr_cell_len =get_cells_len (fdt,"#address-cells" ); + path =fdt_getprop (fdt, nodeoffset,"linux,initrd-start" ,NULL );if ((path ==NULL ) || force) { - tmp =cpu_to_fdt32 (initrd_start); +write_cell ((u8 *)&tmp, initrd_start, addr_cell_len); err =fdt_setprop (fdt, nodeoffset,"linux,initrd-start" , &tmp,sizeof (tmp));if (err <0 ) {
@@ -181,7 +211,7 @@ int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end, int force) fdt_strerror(err));return err; } - tmp =cpu_to_fdt32 (initrd_end); +write_cell ((u8 *)&tmp, initrd_end, addr_cell_len); err =fdt_setprop (fdt, nodeoffset,"linux,initrd-end" , &tmp,sizeof (tmp));if (err <0 ) {
@@ -343,34 +373,6 @@ void do_fixup_by_compat_u32(void *fdt, const char *compat,do_fixup_by_compat (fdt, compat, prop, &tmp,4 , create); } -/* -* Get cells len in bytes -* if #NNNN-cells property is 2 then len is 8 -* otherwise len is 4 -*/ -static int get_cells_len (void *blob,char *nr_cells_name) -{ -const fdt32_t *cell; - - cell =fdt_getprop (blob,0 , nr_cells_name,NULL ); -if (cell &&fdt32_to_cpu (*cell) ==2 ) -return 8 ; - -return 4 ; -} - -/* -* Write a 4 or 8 byte big endian cell -*/ -static void write_cell (u8 *addr,u64 val,int size) -{ -int shift = (size -1 ) *8 ; -while (size-- >0 ) { - *addr++ = (val >> shift) &0xff ; - shift -=8 ; - } -} -#ifdef CONFIG_NR_DRAM_BANKS #define MEMORY_BANKS_MAX CONFIG_NR_DRAM_BANKS#else
Signature · 1 line
1.7.9.5
v3 cover arm64 patch
In reply to fenghua at phytium.com.cnHi David,
Quoted 40 lines · On Thu, Aug 15, 2013 at 7:47 AM, <[email protected]> wrote:
From: David Feng <[email protected]>
*** BLURB HERE ***
Changes for v3:
- rewritecache.Sandexception.Sthat partly originated from linux kernel,
so the license should be ok.
- according to scott wood's advice, make the fdt 64bit initrd start address support a seperate patch.David Feng (5):
core support of arm64
board support of arm64
arch support 1 of arm64
arch support 2 of arm64
64bit initrd start address supportarch/arm64/config.mk | 32 +++ arch/arm64/cpu/armv8/Makefile | 51 ++++ arch/arm64/cpu/armv8/cache.S | 144 ++++++++++ arch/arm64/cpu/armv8/config.mk | 29 ++ arch/arm64/cpu/armv8/cpu.c | 108 ++++++++ arch/arm64/cpu/armv8/exceptions.S | 189 +++++++++++++ arch/arm64/cpu/armv8/start.S | 197 ++++++++++++++ arch/arm64/cpu/armv8/tlb.S | 38 +++ arch/arm64/cpu/u-boot.lds | 73 +++++ arch/arm64/dts/aemv8a.dtsi | 234 ++++++++++++++++ arch/arm64/include/asm/arch-armv8/mmu.h | 117 ++++++++ arch/arm64/include/asm/atomic.h | 115 ++++++++ arch/arm64/include/asm/bitops.h | 153 +++++++++++ arch/arm64/include/asm/byteorder.h | 31 +++ arch/arm64/include/asm/cache.h | 53 ++++ arch/arm64/include/asm/config.h | 41 +++ arch/arm64/include/asm/errno.h | 1 + arch/arm64/include/asm/global_data.h | 38 +++ arch/arm64/include/asm/gpio.h | 1 + arch/arm64/include/asm/io.h | 193 +++++++++++++ arch/arm64/include/asm/linkage.h | 49 ++++ arch/arm64/include/asm/posix_types.h | 61 +++++ arch/arm64/include/asm/processor.h | 59 ++++ arch/arm64/include/asm/ptrace.h | 64 +++++ arch/arm64/include/asm/sections.h | 27 ++
Quoted 8 lines
arch/arm64/include/asm/string.h | 49 ++++ arch/arm64/include/asm/system.h | 106 ++++++++ arch/arm64/include/asm/types.h | 67 +++++ arch/arm64/include/asm/u-boot.h | 38 +++ arch/arm64/include/asm/unaligned.h | 28 ++ arch/arm64/include/asm/utils.h | 56 ++++ arch/arm64/lib/Makefile | 64 +++++ arch/arm64/lib/board.c | 453 +++++++++++++++++++++++++++++++
Instead of this file, it would be good if you could make it use generic board - see CONFIG_SYS_GENERIC_BOARD in the README.
Quoted 57 lines
arch/arm64/lib/bootm.c | 211 ++++++++++++++ arch/arm64/lib/cache.c | 282 +++++++++++++++++++ arch/arm64/lib/crt0.S | 129 +++++++++ arch/arm64/lib/interrupts.c | 109 ++++++++ arch/arm64/lib/relocate.S | 72 +++++ arch/arm64/lib/reset.c | 37 +++ arch/arm64/lib/timer.c | 95 +++++++ board/armltd/dts/vexpress64.dts | 215 +++++++++++++++ board/armltd/vexpress64/Makefile | 43 +++ board/armltd/vexpress64/vexpress64.c | 63 +++++ boards.cfg | 1 + common/cmd_bdinfo.c | 32 +++ common/fdt_support.c | 66 ++--- common/image.c | 5 +- doc/README.arm64 | 10 + examples/standalone/stubs.c | 13 + include/configs/vexpress_aemv8a.h | 200 ++++++++++++++ include/image.h | 1 + lib/asm-offsets.c | 4 - 52 files changed, 4509 insertions(+), 38 deletions(-) create mode 100644 arch/arm64/config.mk create mode 100644 arch/arm64/cpu/armv8/Makefile create mode 100644 arch/arm64/cpu/armv8/cache.S create mode 100644 arch/arm64/cpu/armv8/config.mk create mode 100644 arch/arm64/cpu/armv8/cpu.c create mode 100644 arch/arm64/cpu/armv8/exceptions.S create mode 100644 arch/arm64/cpu/armv8/start.S create mode 100644 arch/arm64/cpu/armv8/tlb.S create mode 100644 arch/arm64/cpu/u-boot.lds create mode 100644 arch/arm64/dts/aemv8a.dtsi create mode 100644 arch/arm64/include/asm/arch-armv8/mmu.h create mode 100644 arch/arm64/include/asm/atomic.h create mode 100644 arch/arm64/include/asm/bitops.h create mode 100644 arch/arm64/include/asm/byteorder.h create mode 100644 arch/arm64/include/asm/cache.h create mode 100644 arch/arm64/include/asm/config.h create mode 100644 arch/arm64/include/asm/errno.h create mode 100644 arch/arm64/include/asm/global_data.h create mode 100644 arch/arm64/include/asm/gpio.h create mode 100644 arch/arm64/include/asm/io.h create mode 100644 arch/arm64/include/asm/linkage.h create mode 100644 arch/arm64/include/asm/posix_types.h create mode 100644 arch/arm64/include/asm/processor.h create mode 100644 arch/arm64/include/asm/ptrace.h create mode 100644 arch/arm64/include/asm/sections.h create mode 100644 arch/arm64/include/asm/string.h create mode 100644 arch/arm64/include/asm/system.h create mode 100644 arch/arm64/include/asm/types.h create mode 100644 arch/arm64/include/asm/u-boot.h create mode 100644 arch/arm64/include/asm/unaligned.h create mode 100644 arch/arm64/include/asm/utils.h create mode 100644 arch/arm64/lib/Makefile create mode 100644 arch/arm64/lib/board.c create mode 100644 arch/arm64/lib/bootm.c create mode 100644 arch/arm64/lib/cache.c create mode 100644 arch/arm64/lib/crt0.S create mode 100644 arch/arm64/lib/interrupts.c
Quoted 9 lines
create mode 100644 arch/arm64/lib/relocate.S create mode 100644 arch/arm64/lib/reset.c create mode 100644 arch/arm64/lib/timer.c create mode 100644 board/armltd/dts/vexpress64.dts create mode 100644 board/armltd/vexpress64/Makefile create mode 100644 board/armltd/vexpress64/vexpress64.c create mode 100644 doc/README.arm64 create mode 100644 include/configs/vexpress_aemv8a.h
Regards,
Simon
[U-Boot] about CONFIG_SYS_GENERIC_BOARD
hi Simon,
I have worked on generic board for a few days, but something confuse me.
? ? ? ? Why it is needed?
? ? ? ? Each processor architecture has different features, this will affect processor specific and board specific code. Putting board_init_* code of each platform into one file with many macro switch make things messy, the board_f.c and board_r.c become very complicated and less readable. Is it really needed? ? ? ? ?We should make it clear that what parts are common between architecture and what parts are specific.
? ? ? ?Actually, I have different opinion with this. Architecture specific board.c file have more advantages. how ahout your opinion?
?
Best Regards.
David
Quoted 131 lines
-----????-----
???: "Simon Glass" <[email protected]>
????: 2013?8?16? ???
???: fenghua at phytium.com.cn
??: "U-Boot Mailing List" <[email protected]>, "trini at ti.com" <[email protected]> ??: Re: [U-Boot] [PATCH v3 0/5] arm64 patchHi David,
Quoted 40 lines · On Thu, Aug 15, 2013 at 7:47 AM, <[email protected]> wrote:
From: David Feng <[email protected]>
*** BLURB HERE ***
Changes for v3:
- rewritecache.Sandexception.Sthat partly originated from linux kernel,
so the license should be ok.
- according to scott wood's advice, make the fdt 64bit initrd start address support a seperate patch.David Feng (5):
core support of arm64
board support of arm64
arch support 1 of arm64
arch support 2 of arm64
64bit initrd start address supportarch/arm64/config.mk | 32 +++ arch/arm64/cpu/armv8/Makefile | 51 ++++ arch/arm64/cpu/armv8/cache.S | 144 ++++++++++ arch/arm64/cpu/armv8/config.mk | 29 ++ arch/arm64/cpu/armv8/cpu.c | 108 ++++++++ arch/arm64/cpu/armv8/exceptions.S | 189 +++++++++++++ arch/arm64/cpu/armv8/start.S | 197 ++++++++++++++ arch/arm64/cpu/armv8/tlb.S | 38 +++ arch/arm64/cpu/u-boot.lds | 73 +++++ arch/arm64/dts/aemv8a.dtsi | 234 ++++++++++++++++ arch/arm64/include/asm/arch-armv8/mmu.h | 117 ++++++++ arch/arm64/include/asm/atomic.h | 115 ++++++++ arch/arm64/include/asm/bitops.h | 153 +++++++++++ arch/arm64/include/asm/byteorder.h | 31 +++ arch/arm64/include/asm/cache.h | 53 ++++ arch/arm64/include/asm/config.h | 41 +++ arch/arm64/include/asm/errno.h | 1 + arch/arm64/include/asm/global_data.h | 38 +++ arch/arm64/include/asm/gpio.h | 1 + arch/arm64/include/asm/io.h | 193 +++++++++++++ arch/arm64/include/asm/linkage.h | 49 ++++ arch/arm64/include/asm/posix_types.h | 61 +++++ arch/arm64/include/asm/processor.h | 59 ++++ arch/arm64/include/asm/ptrace.h | 64 +++++ arch/arm64/include/asm/sections.h | 27 ++Quoted 8 lines
arch/arm64/include/asm/string.h | 49 ++++ arch/arm64/include/asm/system.h | 106 ++++++++ arch/arm64/include/asm/types.h | 67 +++++ arch/arm64/include/asm/u-boot.h | 38 +++ arch/arm64/include/asm/unaligned.h | 28 ++ arch/arm64/include/asm/utils.h | 56 ++++ arch/arm64/lib/Makefile | 64 +++++ arch/arm64/lib/board.c | 453 +++++++++++++++++++++++++++++++Instead of this file, it would be good if you could make it use generic board - see
CONFIG_SYS_GENERIC_BOARDin the README.Quoted 57 lines
arch/arm64/lib/bootm.c | 211 ++++++++++++++ arch/arm64/lib/cache.c | 282 +++++++++++++++++++ arch/arm64/lib/crt0.S | 129 +++++++++ arch/arm64/lib/interrupts.c | 109 ++++++++ arch/arm64/lib/relocate.S | 72 +++++ arch/arm64/lib/reset.c | 37 +++ arch/arm64/lib/timer.c | 95 +++++++ board/armltd/dts/vexpress64.dts | 215 +++++++++++++++ board/armltd/vexpress64/Makefile | 43 +++ board/armltd/vexpress64/vexpress64.c | 63 +++++ boards.cfg | 1 + common/cmd_bdinfo.c | 32 +++ common/fdt_support.c | 66 ++--- common/image.c | 5 +- doc/README.arm64 | 10 + examples/standalone/stubs.c | 13 + include/configs/vexpress_aemv8a.h | 200 ++++++++++++++ include/image.h | 1 + lib/asm-offsets.c | 4 - 52 files changed, 4509 insertions(+), 38 deletions(-) create mode 100644 arch/arm64/config.mk create mode 100644 arch/arm64/cpu/armv8/Makefile create mode 100644 arch/arm64/cpu/armv8/cache.S create mode 100644 arch/arm64/cpu/armv8/config.mk create mode 100644 arch/arm64/cpu/armv8/cpu.c create mode 100644 arch/arm64/cpu/armv8/exceptions.S create mode 100644 arch/arm64/cpu/armv8/start.S create mode 100644 arch/arm64/cpu/armv8/tlb.S create mode 100644 arch/arm64/cpu/u-boot.lds create mode 100644 arch/arm64/dts/aemv8a.dtsi create mode 100644 arch/arm64/include/asm/arch-armv8/mmu.h create mode 100644 arch/arm64/include/asm/atomic.h create mode 100644 arch/arm64/include/asm/bitops.h create mode 100644 arch/arm64/include/asm/byteorder.h create mode 100644 arch/arm64/include/asm/cache.h create mode 100644 arch/arm64/include/asm/config.h create mode 100644 arch/arm64/include/asm/errno.h create mode 100644 arch/arm64/include/asm/global_data.h create mode 100644 arch/arm64/include/asm/gpio.h create mode 100644 arch/arm64/include/asm/io.h create mode 100644 arch/arm64/include/asm/linkage.h create mode 100644 arch/arm64/include/asm/posix_types.h create mode 100644 arch/arm64/include/asm/processor.h create mode 100644 arch/arm64/include/asm/ptrace.h create mode 100644 arch/arm64/include/asm/sections.h create mode 100644 arch/arm64/include/asm/string.h create mode 100644 arch/arm64/include/asm/system.h create mode 100644 arch/arm64/include/asm/types.h create mode 100644 arch/arm64/include/asm/u-boot.h create mode 100644 arch/arm64/include/asm/unaligned.h create mode 100644 arch/arm64/include/asm/utils.h create mode 100644 arch/arm64/lib/Makefile create mode 100644 arch/arm64/lib/board.c create mode 100644 arch/arm64/lib/bootm.c create mode 100644 arch/arm64/lib/cache.c create mode 100644 arch/arm64/lib/crt0.S create mode 100644 arch/arm64/lib/interrupts.cQuoted 9 lines
create mode 100644 arch/arm64/lib/relocate.S create mode 100644 arch/arm64/lib/reset.c create mode 100644 arch/arm64/lib/timer.c create mode 100644 board/armltd/dts/vexpress64.dts create mode 100644 board/armltd/vexpress64/Makefile create mode 100644 board/armltd/vexpress64/vexpress64.c create mode 100644 doc/README.arm64 create mode 100644 include/configs/vexpress_aemv8a.hRegards,
Simon
[U-Boot] about CONFIG_SYS_GENERIC_BOARD
Quoted 8 lines · FengHua
hi Simon,
I have worked on generic board for a few days, but something confuse me. Why it is needed?
Each processor architecture has different features, this will
affect processor specific and board specific code. Putting board_init_* code of each platform into one file with many macro switch make things messy, theboard_f.candboard_r.cbecome very complicated and less readable. Is it really needed?
Most of the stuff in arch/arm/lib/board.c is not processor specific (and certainly not board specific). It's poorly named and should have been called something like "init.c".
-Scott
[U-Boot] about CONFIG_SYS_GENERIC_BOARD
In reply to FengHuaHi David,
Quoted 6 lines · FengHua
hi Simon,
I have worked on generic board for a few days, but something confuse me.
Why it is needed?
Each processor architecture has different features, this will affect processor specific and board specific code. Putting board_init_* code of each platform into one file with many macro switch make things messy, theboard_f.candboard_r.cbecome very complicated and less readable. Is it really needed?
We should make it clear that what parts are common between architecture and what parts are specific.
Actually, I have different opinion with this. Architecture specificboard.cfile have more advantages. how ahout your opinion?
Scott's reply jogged my memory to reply to this.
I suspect having a board.c for each arch was a good idea at the start, and it was hard to reconcile the different ordering and init needs of each arch as it was added. It was much each when porting to a new arch to just copy one of the existing archs and modify the code until it works.
Unfortunately, this means we have about 10 different versions of what turns out to be mostly the same code. The generic board effort was an attempt to unify these into one. While I agree there are lots of #idefs I think that is a separate problem, and at least the code is now all in one file. As a first step it would be nice to sort through and weed out the arch-specific #idefs in common/board_{f,r}.c.
Related to this is global_data and the board data in bd_t. These structures have been unified and again found to contain a lot of common elements across archs.
As a specific example of where having generic board init helps, it is now possible to add a new feature to all archs without changing 10 different files. For example the trace feature was added that way. Decide tree support (CONFIG_OF_CONTROL) can in principle be turned on for any arch by porting it to generic board.
So far ARM and PowerPC support generic board, and x86 and sandbox use it exclusively (i.e. their old board.c code is removed).
As it turns out, this board.c file is not really very arch-specific, as Scott says. It should not be a huge job to make aarch64 use it instead of its own board.c although I am sure there will be a few curly problems.
We have not talked about this on the list, and it is far to early yet, but at some point it would be nice to deprecate the old board.c files.
Regards,
Simon
Quoted 141 lines
Best Regards.
DavidQuoted 131 lines
-----????-----
???: "Simon Glass" <[email protected]>
????: 2013?8?16? ???
???: fenghua at phytium.com.cn
??: "U-Boot Mailing List" <[email protected]>, "trini at ti.com" <[email protected]> ??: Re: [U-Boot] [PATCH v3 0/5] arm64 patchHi David,
Quoted 40 lines · On Thu, Aug 15, 2013 at 7:47 AM, <[email protected]> wrote:
From: David Feng <[email protected]>
*** BLURB HERE ***
Changes for v3:
- rewritecache.Sandexception.Sthat partly originated from linux kernel,
so the license should be ok.
- according to scott wood's advice, make the fdt 64bit initrd start address support a seperate patch.David Feng (5):
core support of arm64
board support of arm64
arch support 1 of arm64
arch support 2 of arm64
64bit initrd start address supportarch/arm64/config.mk | 32 +++ arch/arm64/cpu/armv8/Makefile | 51 ++++ arch/arm64/cpu/armv8/cache.S | 144 ++++++++++ arch/arm64/cpu/armv8/config.mk | 29 ++ arch/arm64/cpu/armv8/cpu.c | 108 ++++++++ arch/arm64/cpu/armv8/exceptions.S | 189 +++++++++++++ arch/arm64/cpu/armv8/start.S | 197 ++++++++++++++ arch/arm64/cpu/armv8/tlb.S | 38 +++ arch/arm64/cpu/u-boot.lds | 73 +++++ arch/arm64/dts/aemv8a.dtsi | 234 ++++++++++++++++ arch/arm64/include/asm/arch-armv8/mmu.h | 117 ++++++++ arch/arm64/include/asm/atomic.h | 115 ++++++++ arch/arm64/include/asm/bitops.h | 153 +++++++++++ arch/arm64/include/asm/byteorder.h | 31 +++ arch/arm64/include/asm/cache.h | 53 ++++ arch/arm64/include/asm/config.h | 41 +++ arch/arm64/include/asm/errno.h | 1 + arch/arm64/include/asm/global_data.h | 38 +++ arch/arm64/include/asm/gpio.h | 1 + arch/arm64/include/asm/io.h | 193 +++++++++++++ arch/arm64/include/asm/linkage.h | 49 ++++ arch/arm64/include/asm/posix_types.h | 61 +++++ arch/arm64/include/asm/processor.h | 59 ++++ arch/arm64/include/asm/ptrace.h | 64 +++++ arch/arm64/include/asm/sections.h | 27 ++Quoted 8 lines
arch/arm64/include/asm/string.h | 49 ++++ arch/arm64/include/asm/system.h | 106 ++++++++ arch/arm64/include/asm/types.h | 67 +++++ arch/arm64/include/asm/u-boot.h | 38 +++ arch/arm64/include/asm/unaligned.h | 28 ++ arch/arm64/include/asm/utils.h | 56 ++++ arch/arm64/lib/Makefile | 64 +++++ arch/arm64/lib/board.c | 453 +++++++++++++++++++++++++++++++Instead of this file, it would be good if you could make it use generic board - see
CONFIG_SYS_GENERIC_BOARDin the README.Quoted 57 lines
arch/arm64/lib/bootm.c | 211 ++++++++++++++ arch/arm64/lib/cache.c | 282 +++++++++++++++++++ arch/arm64/lib/crt0.S | 129 +++++++++ arch/arm64/lib/interrupts.c | 109 ++++++++ arch/arm64/lib/relocate.S | 72 +++++ arch/arm64/lib/reset.c | 37 +++ arch/arm64/lib/timer.c | 95 +++++++ board/armltd/dts/vexpress64.dts | 215 +++++++++++++++ board/armltd/vexpress64/Makefile | 43 +++ board/armltd/vexpress64/vexpress64.c | 63 +++++ boards.cfg | 1 + common/cmd_bdinfo.c | 32 +++ common/fdt_support.c | 66 ++--- common/image.c | 5 +- doc/README.arm64 | 10 + examples/standalone/stubs.c | 13 + include/configs/vexpress_aemv8a.h | 200 ++++++++++++++ include/image.h | 1 + lib/asm-offsets.c | 4 - 52 files changed, 4509 insertions(+), 38 deletions(-) create mode 100644 arch/arm64/config.mk create mode 100644 arch/arm64/cpu/armv8/Makefile create mode 100644 arch/arm64/cpu/armv8/cache.S create mode 100644 arch/arm64/cpu/armv8/config.mk create mode 100644 arch/arm64/cpu/armv8/cpu.c create mode 100644 arch/arm64/cpu/armv8/exceptions.S create mode 100644 arch/arm64/cpu/armv8/start.S create mode 100644 arch/arm64/cpu/armv8/tlb.S create mode 100644 arch/arm64/cpu/u-boot.lds create mode 100644 arch/arm64/dts/aemv8a.dtsi create mode 100644 arch/arm64/include/asm/arch-armv8/mmu.h create mode 100644 arch/arm64/include/asm/atomic.h create mode 100644 arch/arm64/include/asm/bitops.h create mode 100644 arch/arm64/include/asm/byteorder.h create mode 100644 arch/arm64/include/asm/cache.h create mode 100644 arch/arm64/include/asm/config.h create mode 100644 arch/arm64/include/asm/errno.h create mode 100644 arch/arm64/include/asm/global_data.h create mode 100644 arch/arm64/include/asm/gpio.h create mode 100644 arch/arm64/include/asm/io.h create mode 100644 arch/arm64/include/asm/linkage.h create mode 100644 arch/arm64/include/asm/posix_types.h create mode 100644 arch/arm64/include/asm/processor.h create mode 100644 arch/arm64/include/asm/ptrace.h create mode 100644 arch/arm64/include/asm/sections.h create mode 100644 arch/arm64/include/asm/string.h create mode 100644 arch/arm64/include/asm/system.h create mode 100644 arch/arm64/include/asm/types.h create mode 100644 arch/arm64/include/asm/u-boot.h create mode 100644 arch/arm64/include/asm/unaligned.h create mode 100644 arch/arm64/include/asm/utils.h create mode 100644 arch/arm64/lib/Makefile create mode 100644 arch/arm64/lib/board.c create mode 100644 arch/arm64/lib/bootm.c create mode 100644 arch/arm64/lib/cache.c create mode 100644 arch/arm64/lib/crt0.S create mode 100644 arch/arm64/lib/interrupts.cQuoted 9 lines
create mode 100644 arch/arm64/lib/relocate.S create mode 100644 arch/arm64/lib/reset.c create mode 100644 arch/arm64/lib/timer.c create mode 100644 board/armltd/dts/vexpress64.dts create mode 100644 board/armltd/vexpress64/Makefile create mode 100644 board/armltd/vexpress64/vexpress64.c create mode 100644 doc/README.arm64 create mode 100644 include/configs/vexpress_aemv8a.hRegards,
Simon
[U-Boot] about CONFIG_SYS_GENERIC_BOARD
Quoted 38 lines · Simon Glass
Hi David,
Quoted 6 lines · FengHua
hi Simon,
I have worked on generic board for a few days, but something confuse me.
Why it is needed?
Each processor architecture has different features, this will affect processor specific and board specific code. Putting board_init_* code of each platform into one file with many macro switch make things messy, theboard_f.candboard_r.cbecome very complicated and less readable. Is it really needed?
We should make it clear that what parts are common between architecture and what parts are specific.
Actually, I have different opinion with this. Architecture specificboard.cfile have more advantages. how ahout your opinion?Scott's reply jogged my memory to reply to this.
I suspect having a
board.cfor each arch was a good idea at the start, and it was hard to reconcile the different ordering and init needs of each arch as it was added. It was much each when porting to a new arch to just copy one of the existing archs and modify the code until it works.Unfortunately, this means we have about 10 different versions of what turns out to be mostly the same code. The generic board effort was an attempt to unify these into one. While I agree there are lots of #idefs I think that is a separate problem, and at least the code is now all in one file. As a first step it would be nice to sort through and weed out the arch-specific #idefs in
common/board_{f,r}.c.Related to this is
global_dataand the board data inbd_t. These structures have been unified and again found to contain a lot of common elements across archs.As a specific example of where having generic board init helps, it is now possible to add a new feature to all archs without changing 10 different files. For example the trace feature was added that way. Decide tree support (
CONFIG_OF_CONTROL) can in principle be turned on for any arch by porting it to generic board.So far ARM and PowerPC support generic board, and x86 and sandbox use it exclusively (i.e. their old
board.ccode is removed).
Quoted 7 lines
As it turns out, this
board.cfile is not really very arch-specific, as Scott says. It should not be a huge job to make aarch64 use it instead of its ownboard.calthough I am sure there will be a few curly problems.We have not talked about this on the list, and it is far to early yet, but at some point it would be nice to deprecate the old
board.cfiles.
And this would be another reason to place this in arch/arm to start with, rather than split-arch, leveraging this otherwise generic stuff should just be a matter of setting the define, and one less thing for you to worry about having to cover. It's on my plate to confirm that for example, the trivial convert and boot test I did on am335x was enough.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130816/d1b9da3a/attachment.pgp>
v3 cover arm64 patch
In reply to fenghua at phytium.com.cnQuoted 9 lines · On Thu, 15 Aug 2013 21:47:09 +0800 fenghua at phytium.com.cn wrote:
From: David Feng <[email protected]>
*** BLURB HERE ***
Changes for v3:
- rewritecache.Sandexception.Sthat partly originated from
linux kernel, so the license should be ok.
- according to scott wood's advice, make the fdt 64bit initrd
start address support a seperate patch.
Quoted 6 lines
David Feng (5):
core support of arm64
board support of arm64
arch support 1 of arm64
arch support 2 of arm64
64bit initrd start address support
nitpick but the arch is aarch64 not arm64
Dennis
v3 cover arm64 patch
Quoted 12 lines · Dennis Gilmore
Quoted 9 lines · On Thu, 15 Aug 2013 21:47:09 +0800 fenghua at phytium.com.cn wrote:
From: David Feng <[email protected]>
*** BLURB HERE ***
Changes for v3:
- rewritecache.Sandexception.Sthat partly originated from
linux kernel, so the license should be ok.
- according to scott wood's advice, make the fdt 64bit initrd
start address support a seperate patch.
Quoted 8 lines
Quoted 6 lines
David Feng (5):
core support of arm64
board support of arm64
arch support 1 of arm64
arch support 2 of arm64
64bit initrd start address supportnitpick but the arch is aarch64 not arm64
powerpc is Power Architecture these days but we still call it powerpc. arm64 is a sensible name that doesn't reduce the meaningful part of the name (excluding the word size suffix) down to a single character.
-Scott
v3 cover arm64 patch
Quoted 28 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Scott Wood
Sent: Saturday, August 17, 2013 1:23 AM
To: Dennis Gilmore
Cc: trini at ti.com; u-boot at lists.denx.de; fenghua at phytium.com.cn
Subject: Re: [U-Boot] [PATCH v3 0/5] arm64 patchQuoted 19 lines · Dennis Gilmore
Quoted 15 lines · On Thu, 15 Aug 2013 21:47:09 +0800 fenghua at phytium.com.cn wrote:
From: David Feng <[email protected]>
*** BLURB HERE ***
Changes for v3:
- rewritecache.Sandexception.Sthat partly originated from
linux kernel, so the license should be ok.
- according to scott wood's advice, make the fdt 64bit initrd
start address support a seperate patch.David Feng (5):
core support of arm64
board support of arm64
arch support 1 of arm64
arch support 2 of arm64
64bit initrd start address support
Quoted 6 lines
Quoted 1 line
nitpick but the arch is aarch64 not arm64
powerpc is Power Architecture these days but we still call it powerpc. arm64 is a sensible name that doesn't reduce the meaningful part of the name (excluding the word size suffix) down to a single character.
Arm64 seems more simple and sensible and in-line with the naming convention used
across linux (arch/arm64). I remember reading Linus's comments in favor of keeping a arm64 naming convention in the past (instead of Armv8 or AArch64). Here is that mail thread for reference:
https://lkml.org/lkml/2012/7/15/133
Regards,
Bhupesh