Create generic board init for ARM, x86, PPC
Subsystems (13)
v5 cover Create generic board init for ARM, x86, PPC
This series creates a generic board init implementation which contains the essential functions of the major arch/xxx/lib/board.c files. It is split into two parts: board_f.c for pre-relocation and board_r.c for post-relocation.
What is the motivation for this change?
1. There is a lot of repeated code in the board.c files. Any change to things like setting up the baud rate requires a change in 10 separate places.
2. Since there are 14 separate files, adding a new feature which requires initialisation is painful since it must be independently added in 14 places.
3. As time goes by the architectures naturely diverge since there is limited pressure to compare features or even CONFIG options against simiilar things in other board.c files.
4. New architectures must implement all the features all over again, and sometimes in subtley different ways. This places an unfair burden on getting a new architecture fully functional and running with U-Boot.
5. While it is a bit of a tricky change, I believe it is worthwhile and achievable. There is no requirement that all code be common, only that the code that is common should be located in common/board.c rather than arch/xxx/lib/board.c.
All the functions of board_init_f() and board_init_r() are broken into separate function calls so that they can easily be included or excluded for a particular architecture. It also makes it easier to adopt Graeme's initcall proposal assuming this comes about.
http://lists.denx.de/pipermail/u-boot/2012-January/114499.html
This series is not dependent on generic relocation. So relocation happens as one big chunk and is still completely arch-specific. See the relocation series for a proposed solution to this for ARM:
http://lists.denx.de/pipermail/u-boot/2011-December/112928.html
or x86's implementation which is in mainline. Unifying relocation is probably the next step after this series.
Instead of moving over a whole architecture, this series takes the approach of simply enabling generic board support for an architecture. It is then up to each board to opt in by defining CONFIG_SYS_GENERIC_BOARD in the board config file. If this is not done, then the code will be generated as before. This allows both sets of code to co-exist until we are comfortable with the generic approach, and enough boards run.
ARM is a relatively large board.c file and one which I can test, therefore I think it is a good target for this series. On the other hand, x86 is relatively small and simple, but different enough that it introduces a few issues to be solved. So I have chosen both ARM and x86 for this series. After a suggestion from Wolfgang I have added PPC also. This is the largest and most feature-full board, so hopefully we have all bases covered in this series. Other archs are mostly a subset of these.
A generic global_data structure is now in mainline, and this is required for this series.
Similarly we need a generic bd_info structure, since generic code will be accessing it. I have done this with a simple generic file for now.
There was dicussion on the list about passing gd_t around as a parameter to pre-relocation init functions. I think this makes sense, but it can be done as a separate change, and this series does not require it.
While this series needs to stand on its own, the goal is the unification of the board init code. So I hope we can address issues with this in mind, rather than focusing too narrowly on particular ARM, x86 or PPC issues. I have added TODO markers in places where I think there are opportunities to relationalise the board init now it is all in one place, but these don't need to be addressed for the feature to work, and are best done as smaller patches than can be reviewed by individual arch maintainers, I think.
I have run-tested ARM on Tegra Seaboard and x86/coreboot only. To try it out, define CONFIG_SYS_GENERIC_BOARD in your board file and rebuild. Most likely on PPC at least it will hang, but if you are lucky it will print something first :-) I hope to test an SPL board (snow / exynos5250) when I can get that booting from mainline.
I have run this though buildman with CONFIG_SYS_GENERIC_BOARD on for all ARM, PPC and x86 boards. The only failure is highbank (an ARM board), which seems to use SCSI but scsi_init() is not available.
Code size increases by about 1KB on ARM and about 1.3KB on PPC with generic board enabled. This is mostly due to the move to using separate functions for each part of the init, which will make it easier to move to a pure initcall approach later if we want to.
Since this series was first sent there have been additions to the board code for ARM and PPC. I have added in these additions. This is a manual process, and I expect that people will find problems (and send patches) as they try out their boards.
Changes in v5:
- Use unsigned int for baud_rate
- Remove bi_ip_addr field from struct bd_info
- Add new patch to replace __bss_end__ with __bss_end
- Remove the __bss_end #define now that this is consistent across U-Boot
- Remove avr32 changes from what should be an arm patch
- Adjust u-boot-nds32.h link symbols to keep U-Boot building
- Add debug() code to initcalls
- Update copyright on initcalls
- Avoid using static declaration for init_func_watchdog_reset()
- Add fdtdec header file to board_f.c
- Remove setup_global_data_ptr()
- Tidy up stack init
- Put global data on stack in board_init_f()
- Add fdt relocation
- Remove fdt relocation field from x86 arch_global_data
- Deal with change of board_init_f() semantics on ARM
- Save boot_flags in global_data in board_init_f()
- Add print_cpuinfo() prototype to include/common.h
- Add code from arch/arm/lib/board.c to control loading of environment
- Put watchdog init function definitions in watchdog.h
- Adjust ppc to work with watchdog.h additions
- Add new patch to fix config in keymile boards
- Add offsets support for access to fdt that uses CONFIG_OF_SEPARATE
- Use watchdog.h for watchdog functions
- Add define to work around __bss_end / __bss_end__ confusion
- Add prototype for update_flash_size() to include/common.h
- Updates in board_r.c to make ppc build correctly
- Add prototype for board_start_ide() to include/ide.h
- Bring in new ppc features since this patch was first created
- Add new patch to adjust board_f.c for x86
- Add new patch to adjust board_r.c for x86
- Include asm/sections.h in x86 sdram code
- Define _end instead of __end for x86
- Avoid setting up gd on x86 as it is already done
Changes in v4:
- Add three more fields required for ARM
- Add asm/sections.h for each architecture
- Use asm/sections.h instead of asm-generic/sections.h
- Use asm/sections.h instead of asm-generic/sections.h
- Adjust u-boot-x86.h link symbols to keep U-Boot building
- Use asm/sections.h instead of asm-generic/sections.h
- Use asm/sections.h instead of asm-generic/sections.h
- Updates to sit on top of earlier patches
- Updates to sit on top of earlier patches
- Use asm/sections.h instead of asm-generic/sections.h
- Rebase to master
- Drop sc520_timer.c patch (warning already fixed by previous patch)
Changes in v3:
- Cast away the volatile on gd for memcpy()
- Add header to new x86 relocate.c and init_helpers.c
- Rebase to master
- Rebase on top of x86/master (which has not yet been pulled to master)
Changes in v2:
- Change generic board to an opt-in system on a per-board basic
- Add CONFIG_SYS_GENERIC_BOARD to allow board to select generic board
- Add PowerPC support
- Rebase to master
Simon Glass (23):
ppc: Add initial memory barrier macros
Introduce generic u-boot.h file
Replace __bss_end__ with __bss_end
Introduce generic link section.h symbol files
arm: Use sections header to obtain link symbols
x86: nds32: Change stub example to use asm-generic/sections.h Introduce a basic initcall implementation
Define CONFIG_SYS_LEGACY_BOARD everywhere
Declare watchdog functions in watchdog.h
Introduce generic pre-relocation board_f.c Introduce generic post-relocation board_r.c
Add spl load feature
arm: Remove use of board_early_init_r/last_stage_init()
arm: Enable generic board support
Add CONFIG_SYS_SYM_OFFSETS to support offset symbols Adjust board_f.c for ppc
Adjust board_r.c for ppc
ppc: Enable generic board support
x86: Adjust board_f.c for x86
x86: Adjust board_r.c for x86
x86: Use sections header to obtain link symbols
x86: Enable generic board support
tegra: Enable generic board for Seaboard.
README | 17 + arch/arm/cpu/arm1136/start.S | 2 +- arch/arm/cpu/arm1136/u-boot-spl.lds | 2 +- arch/arm/cpu/arm1176/start.S | 2 +- arch/arm/cpu/arm720t/start.S | 2 +- arch/arm/cpu/arm920t/ep93xx/u-boot.lds | 2 +- arch/arm/cpu/arm920t/start.S | 2 +- arch/arm/cpu/arm925t/start.S | 2 +- arch/arm/cpu/arm926ejs/davinci/spl.c | 2 +- arch/arm/cpu/arm926ejs/mxs/start.S | 2 +- arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds | 2 +- arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds | 2 +- arch/arm/cpu/arm926ejs/start.S | 4 +- arch/arm/cpu/arm946es/start.S | 2 +- arch/arm/cpu/arm_intcm/start.S | 2 +- arch/arm/cpu/armv7/omap-common/u-boot-spl.lds | 2 +- arch/arm/cpu/armv7/socfpga/u-boot-spl.lds | 2 +- arch/arm/cpu/armv7/start.S | 2 +- arch/arm/cpu/ixp/start.S | 2 +- arch/arm/cpu/ixp/u-boot.lds | 2 +- arch/arm/cpu/pxa/start.S | 2 +- arch/arm/cpu/s3c44b0/start.S | 2 +- arch/arm/cpu/sa1100/start.S | 2 +- arch/arm/cpu/u-boot.lds | 4 +- arch/arm/include/asm/sections.h | 27 + arch/arm/include/asm/spl.h | 2 +- arch/arm/include/asm/u-boot-arm.h | 4 - arch/arm/include/asm/u-boot.h | 9 + arch/arm/lib/Makefile | 3 + arch/arm/lib/board.c | 1 + arch/arm/lib/crt0.S | 4 +- arch/arm/lib/spl.c | 2 +- arch/avr32/config.mk | 3 + arch/avr32/cpu/start.S | 2 +- arch/avr32/cpu/u-boot.lds | 2 +- arch/avr32/include/asm/sections.h | 6 +- arch/avr32/lib/board.c | 4 +- arch/blackfin/config.mk | 3 + arch/blackfin/include/asm/sections.h | 27 + arch/m68k/config.mk | 3 + arch/m68k/include/asm/sections.h | 27 + arch/m68k/lib/board.c | 4 +- arch/microblaze/config.mk | 3 + arch/microblaze/include/asm/sections.h | 27 + arch/mips/config.mk | 3 + arch/mips/include/asm/sections.h | 27 + arch/nds32/config.mk | 3 + arch/nds32/cpu/n1213/start.S | 2 +- arch/nds32/cpu/n1213/u-boot.lds | 2 +- arch/nds32/include/asm/sections.h | 27 + arch/nds32/include/asm/u-boot-nds32.h | 8 +- arch/nds32/lib/board.c | 2 +- arch/nios2/config.mk | 3 + arch/nios2/cpu/start.S | 6 +- arch/nios2/cpu/u-boot.lds | 2 +- arch/nios2/include/asm/sections.h | 27 + arch/openrisc/include/asm/sections.h | 27 + arch/powerpc/cpu/74xx_7xx/start.S | 4 +- arch/powerpc/cpu/74xx_7xx/u-boot.lds | 2 +- arch/powerpc/cpu/mpc512x/start.S | 4 +- arch/powerpc/cpu/mpc512x/u-boot.lds | 2 +- arch/powerpc/cpu/mpc5xx/start.S | 4 +- arch/powerpc/cpu/mpc5xx/u-boot.lds | 2 +- arch/powerpc/cpu/mpc5xxx/spl_boot.c | 2 +- arch/powerpc/cpu/mpc5xxx/start.S | 4 +- arch/powerpc/cpu/mpc5xxx/u-boot-customlayout.lds | 2 +- arch/powerpc/cpu/mpc5xxx/u-boot-spl.lds | 2 +- arch/powerpc/cpu/mpc5xxx/u-boot.lds | 2 +- arch/powerpc/cpu/mpc8220/start.S | 4 +- arch/powerpc/cpu/mpc8220/u-boot.lds | 2 +- arch/powerpc/cpu/mpc824x/start.S | 4 +- arch/powerpc/cpu/mpc824x/u-boot.lds | 2 +- arch/powerpc/cpu/mpc8260/start.S | 4 +- arch/powerpc/cpu/mpc8260/u-boot.lds | 2 +- arch/powerpc/cpu/mpc83xx/start.S | 4 +- arch/powerpc/cpu/mpc83xx/u-boot-spl.lds | 4 +- arch/powerpc/cpu/mpc83xx/u-boot.lds | 2 +- arch/powerpc/cpu/mpc85xx/start.S | 4 +- arch/powerpc/cpu/mpc85xx/u-boot-nand.lds | 2 +- arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds | 2 +- arch/powerpc/cpu/mpc85xx/u-boot-spl.lds | 2 +- arch/powerpc/cpu/mpc85xx/u-boot.lds | 2 +- arch/powerpc/cpu/mpc86xx/start.S | 4 +- arch/powerpc/cpu/mpc86xx/u-boot.lds | 2 +- arch/powerpc/cpu/mpc8xx/start.S | 4 +- arch/powerpc/cpu/ppc4xx/start.S | 4 +- arch/powerpc/cpu/ppc4xx/u-boot.lds | 2 +- arch/powerpc/include/asm/io.h | 8 + arch/powerpc/include/asm/sections.h | 27 + arch/powerpc/include/asm/spl.h | 2 +- arch/powerpc/include/asm/u-boot.h | 7 + arch/powerpc/lib/Makefile | 2 + arch/powerpc/lib/board.c | 18 +- arch/sandbox/config.mk | 3 + arch/sandbox/include/asm/sections.h | 2 + arch/sh/config.mk | 3 + arch/sh/cpu/sh2/u-boot.lds | 2 +- arch/sh/cpu/sh3/u-boot.lds | 2 +- arch/sh/cpu/sh4/u-boot.lds | 2 +- arch/sh/include/asm/sections.h | 27 + arch/sparc/config.mk | 3 + arch/sparc/include/asm/sections.h | 27 + arch/x86/cpu/coreboot/sdram.c | 1 + arch/x86/cpu/u-boot.lds | 4 +- arch/x86/include/asm/global_data.h | 1 - arch/x86/include/asm/sections.h | 27 + arch/x86/include/asm/u-boot-x86.h | 9 - arch/x86/include/asm/u-boot.h | 11 + arch/x86/lib/Makefile | 3 + arch/x86/lib/board.c | 3 +- arch/x86/lib/init_helpers.c | 3 +- arch/x86/lib/relocate.c | 9 +- board/BuS/eb_cpu5282/u-boot.lds | 2 +- board/LEOX/elpt860/u-boot.lds | 2 +- board/RPXClassic/u-boot.lds | 2 +- board/RPXlite/u-boot.lds | 2 +- board/RPXlite_dw/u-boot.lds | 2 +- board/RRvision/u-boot.lds | 2 +- board/actux1/u-boot.lds | 2 +- board/actux2/u-boot.lds | 2 +- board/actux3/u-boot.lds | 2 +- board/adder/u-boot.lds | 2 +- board/ait/cam_enc_4xx/u-boot-spl.lds | 2 +- board/altera/nios2-generic/u-boot.lds | 2 +- board/amcc/acadia/u-boot-nand.lds | 2 +- board/amcc/bamboo/u-boot-nand.lds | 2 +- board/amcc/canyonlands/u-boot-nand.lds | 2 +- board/amcc/kilauea/u-boot-nand.lds | 2 +- board/amcc/sequoia/u-boot-nand.lds | 2 +- board/amcc/sequoia/u-boot-ram.lds | 2 +- board/astro/mcf5373l/u-boot.lds | 2 +- board/cm4008/flash.c | 1 + board/cm41xx/flash.c | 1 + board/cobra5272/u-boot.lds | 2 +- board/cogent/u-boot.lds | 2 +- board/dave/PPChameleonEVB/u-boot.lds | 2 +- board/davinci/da8xxevm/u-boot-spl-da850evm.lds | 2 +- board/davinci/da8xxevm/u-boot-spl-hawk.lds | 2 +- board/dvlhost/u-boot.lds | 2 +- board/eltec/mhpc/u-boot.lds | 2 +- board/emk/top860/u-boot.lds | 2 +- board/ep88x/u-boot.lds | 2 +- board/esd/dasa_sim/u-boot.lds | 2 +- board/esd/pmc440/u-boot-nand.lds | 2 +- board/esd/tasreg/u-boot.lds | 2 +- board/esteem192e/u-boot.lds | 2 +- board/evb64260/u-boot.lds | 2 +- board/fads/u-boot.lds | 2 +- board/flagadm/u-boot.lds | 2 +- board/freescale/m5208evbe/u-boot.lds | 2 +- board/freescale/m52277evb/u-boot.lds | 2 +- board/freescale/m5235evb/u-boot.lds | 2 +- board/freescale/m5249evb/u-boot.lds | 2 +- board/freescale/m5253demo/u-boot.lds | 2 +- board/freescale/m5253evbe/u-boot.lds | 2 +- board/freescale/m5271evb/u-boot.lds | 2 +- board/freescale/m5272c3/u-boot.lds | 2 +- board/freescale/m5275evb/u-boot.lds | 2 +- board/freescale/m5282evb/u-boot.lds | 2 +- board/freescale/m53017evb/u-boot.lds | 2 +- board/freescale/m5329evb/u-boot.lds | 2 +- board/freescale/m5373evb/u-boot.lds | 2 +- board/freescale/m54418twr/u-boot.lds | 2 +- board/freescale/m54451evb/u-boot.lds | 2 +- board/freescale/m54455evb/u-boot.lds | 2 +- board/freescale/m547xevb/u-boot.lds | 2 +- board/freescale/m548xevb/u-boot.lds | 2 +- board/freescale/mx31ads/u-boot.lds | 2 +- board/gaisler/gr_cpci_ax2000/u-boot.lds | 2 +- board/gaisler/gr_ep2s60/u-boot.lds | 2 +- board/gaisler/gr_xc3s_1500/u-boot.lds | 2 +- board/gaisler/grsim/u-boot.lds | 2 +- board/gaisler/grsim_leon2/u-boot.lds | 2 +- board/gen860t/u-boot-flashenv.lds | 2 +- board/gen860t/u-boot.lds | 2 +- board/genietv/u-boot.lds | 2 +- board/hermes/u-boot.lds | 2 +- board/hymod/u-boot.lds | 2 +- board/icu862/u-boot.lds | 2 +- board/idmr/u-boot.lds | 2 +- board/ip860/u-boot.lds | 2 +- board/ivm/u-boot.lds | 2 +- board/korat/u-boot-F7FC.lds | 2 +- board/kup/kup4k/u-boot.lds | 2 +- board/kup/kup4x/u-boot.lds | 2 +- board/lwmon/u-boot.lds | 2 +- board/manroland/uc100/u-boot.lds | 2 +- board/matrix_vision/mvsmr/u-boot.lds | 2 +- board/mbx8xx/u-boot.lds | 2 +- board/mousse/u-boot.lds | 2 +- board/mvblue/u-boot.lds | 2 +- board/netphone/u-boot.lds | 2 +- board/netta/u-boot.lds | 2 +- board/netta2/u-boot.lds | 2 +- board/netvia/u-boot.lds | 2 +- board/nx823/u-boot.lds | 2 +- board/quantum/u-boot.lds | 2 +- board/r360mpi/u-boot.lds | 2 +- board/rbc823/u-boot.lds | 2 +- board/renesas/sh7752evb/u-boot.lds | 2 +- board/renesas/sh7757lcr/u-boot.lds | 2 +- board/rsdproto/u-boot.lds | 2 +- board/samsung/smdk5250/smdk5250-uboot-spl.lds | 2 +- board/samsung/smdk6400/u-boot-nand.lds | 2 +- board/sandpoint/u-boot.lds | 2 +- board/sixnet/u-boot.lds | 2 +- board/snmc/qs850/u-boot.lds | 2 +- board/snmc/qs860t/u-boot.lds | 2 +- board/spc1920/u-boot.lds | 2 +- board/spd8xx/u-boot.lds | 2 +- board/stx/stxxtc/u-boot.lds | 2 +- board/svm_sc8xx/u-boot.lds | 2 +- board/tqc/tqm8xx/u-boot.lds | 2 +- board/v37/u-boot.lds | 2 +- board/vpac270/u-boot-spl.lds | 2 +- board/woodburn/woodburn.c | 2 +- common/Makefile | 4 + common/board_f.c | 1021 ++++++++++++++++++++++ common/board_r.c | 916 +++++++++++++++++++ config.mk | 8 + examples/standalone/stubs.c | 7 +- include/asm-generic/global_data.h | 2 + include/asm-generic/sections.h | 119 +++ include/asm-generic/u-boot.h | 159 ++++ include/common.h | 2 + include/configs/km/keymile-common.h | 4 - include/configs/km/km-powerpc.h | 4 + include/configs/seaboard.h | 2 + include/ide.h | 7 + include/initcall.h | 25 + include/watchdog.h | 18 + lib/Makefile | 1 + lib/initcall.c | 39 + nand_spl/board/amcc/acadia/u-boot.lds | 2 +- nand_spl/board/amcc/bamboo/u-boot.lds | 2 +- nand_spl/board/amcc/canyonlands/u-boot.lds | 2 +- nand_spl/board/amcc/kilauea/u-boot.lds | 2 +- nand_spl/board/amcc/sequoia/u-boot.lds | 2 +- nand_spl/board/freescale/mpc8315erdb/u-boot.lds | 4 +- nand_spl/board/freescale/mx31pdk/u-boot.lds | 2 +- nand_spl/board/karo/tx25/u-boot.lds | 2 +- nand_spl/board/samsung/smdk6400/u-boot.lds | 2 +- nand_spl/board/sheldon/simpc8313/u-boot.lds | 4 +- 243 files changed, 2976 insertions(+), 253 deletions(-) create mode 100644 arch/arm/include/asm/sections.h create mode 100644 arch/blackfin/include/asm/sections.h create mode 100644 arch/m68k/include/asm/sections.h create mode 100644 arch/microblaze/include/asm/sections.h create mode 100644 arch/mips/include/asm/sections.h create mode 100644 arch/nds32/include/asm/sections.h create mode 100644 arch/nios2/include/asm/sections.h create mode 100644 arch/openrisc/include/asm/sections.h create mode 100644 arch/powerpc/include/asm/sections.h create mode 100644 arch/sh/include/asm/sections.h create mode 100644 arch/sparc/include/asm/sections.h create mode 100644 arch/x86/include/asm/sections.h create mode 100644 common/board_f.c create mode 100644 common/board_r.c create mode 100644 include/asm-generic/sections.h create mode 100644 include/asm-generic/u-boot.h create mode 100644 include/initcall.h create mode 100644 lib/initcall.c
Signature · 1 line
1.8.1
PATCH v5 1/23 ppc: Add initial memory barrier macros
These are available on other architectures, so add them on ppc.
---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None
arch/powerpc/include/asm/io.h | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/powerpc/include/asm/io.h +8 -0
@@ -317,4 +317,12 @@ static inline phys_addr_t virt_to_phys(void * vaddr) #endif } +/* +* TODO: The kernel offers some more advanced versions of barriers, it might +* have some advantages to use them instead of the simple one here. +*/ +#define dmb () __asm__ __volatile__ ("" : : : "memory") +#define __iormb () dmb() +#define __iowmb () dmb() +#endif
Signature · 1 line
1.8.1
PATCH v5 1/23 ppc: Add initial memory barrier macros
Quoted 27 lines · Simon Glass
These are available on other architectures, so add them on ppc.
Signed-off-by Simon Glass <[email protected]>---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: Nonearch/powerpc/include/asm/io.h | 8 ++++++++ 1 file changed, 8 insertions(+)arch/powerpc/include/asm/io.h +2
-0@@ -317,4 +317,12 @@ static inline phys_addr_t virt_to_phys(void * vaddr)#endif } +/* +* TODO: The kernel offers some more advanced versions of barriers, it might
+ * have some advantages to use them instead of the simple one here.
+ */
arch/powerpc/include/asm/io.h static inline phys_addr_t virt_to_phys(void * vaddr) · line 326
Quoted 3 lines
arch/powerpc/include/asm/io.h +3
-0+#define dmb () __asm__ __volatile__ ("" : : : "memory") +#define __iormb () dmb() +#define __iowmb () dmb()
What is the definition of these? Given that we already have an architecture-independent barrier(), I assume this is meant to be an actual hardware barrier rather than a compiler barrier, so this is not a correct implementation.
-Scott
PATCH v5 1/23 ppc: Add initial memory barrier macros
Hi Scott,
Quoted 22 lines · Scott Wood
Quoted 21 lines · Simon Glass
These are available on other architectures, so add them on ppc.
Signed-off-by Simon Glass <[email protected]>---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: Nonearch/powerpc/include/asm/io.h | 8 ++++++++ 1 file changed, 8 insertions(+)arch/powerpc/include/asm/io.h +0
-0@@ -317,4 +317,12 @@ static inline phys_addr_t virt_to_phys(void * vaddr)#endif }
Quoted 14 lines
arch/powerpc/include/asm/io.h static inline phys_addr_t virt_to_phys(void * vaddr) · line 326
Quoted 8 lines
arch/powerpc/include/asm/io.h +2
-0+/* +* TODO: The kernel offers some more advanced versions of barriers, it might
+ * have some advantages to use them instead of the simple one here.
+ */arch/powerpc/include/asm/io.h +3
-0+#define dmb () __asm__ __volatile__ ("" : : : "memory") +#define __iormb () dmb() +#define __iowmb () dmb()What is the definition of these? Given that we already have an architecture-independent
barrier(), I assume this is meant to be an actual hardware barrier rather than a compiler barrier, so this is not a correct implementation.
They were introduced in ARM in commit 3c0659b5, so I am really just following along with that. Yes the naming doesn't make a lot of sense, but on the other hand I don't think we necessarily want an actual hardware barrier in our writel()s. This at least makes sure that the compiler writes in the right order - perhaps the intent is that that rest is best left to the hardware?
Regards,
Simon
Quoted 2 lines
-Scott
PATCH v5 1/23 ppc: Add initial memory barrier macros
Quoted 43 lines · Simon Glass
Hi Scott,
Quoted 11 lines · Scott Wood
Quoted 10 lines · Simon Glass
These are available on other architectures, so add them on ppc.
Signed-off-by Simon Glass <[email protected]>---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: NoneQuoted 4 lines
Review
Quoted 4 lines
arch/powerpc/include/asm/io.h | 8 ++++++++ 1 file changed, 8 insertions(+)(quoted diff) +0
-0
b/arch/powerpc/include/asm/io.hQuoted 4 lines
arch/powerpc/include/asm/io.h static inline phys_addr_t virt_to_phys(void *
Quoted 4 lines
index 1f12c29..1bf12f5 100644
arch/powerpc/include/asm/io.h +0
-0@@ -317,4 +317,12 @@ static inline phys_addr_t virt_to_phys(void *vaddr)
Quoted 5 lines
arch/powerpc/include/asm/io.h static inline phys_addr_t virt_to_phys(void * vaddr)
Quoted 5 lines
arch/powerpc/include/asm/io.h +2
-0#endif } +/* +* TODO: The kernel offers some more advanced versions of barriers, it
Quoted 2 lines
Quoted 2 lines
might
+ * have some advantages to use them instead of the simple onehere.
Quoted 8 lines
arch/powerpc/include/asm/io.h static inline phys_addr_t virt_to_phys(void * vaddr) · line 326
Quoted 4 lines
+ */
arch/powerpc/include/asm/io.h +3
-0+#define dmb () __asm__ __volatile__ ("" : : : "memory") +#define __iormb () dmb() +#define __iowmb () dmb()What is the definition of these? Given that we already have an architecture-independent
barrier(), I assume this is meant to be anactual
Quoted 8 lines
Quoted 1 line
hardware barrier rather than a compiler barrier, so this is not a
correct
Quoted 1 line
implementation.
They were introduced in ARM in commit
3c0659b5, so I am really just following along with that. Yes the naming doesn't make a lot of sense, but on the other hand I don't think we necessarily want an actual hardware barrier in our writel()s.
We do have a hardware barrier in writel() on PPC (ignoring the broken never-used little-endian implementation, which should just be removed), and it should stay that way.
I do not think we should be introducing anything that looks like a hardware barrier but isn't, unless the semantics of a particular barrier are guaranteed by a particular platform without needing a barrier instruction. And in that case there had better be a document somewhere that explains what the semantics are.
Quoted 3 lines
This at least makes sure that the
compiler writes in the right order - perhaps the intent is that that rest is best left to the hardware?
Regardless of what one might think is "best", it isn't left to hardware on many platforms, including PPC.
-Scott
PATCH v5 1/23 ppc: Add initial memory barrier macros
Hi Scott,
Quoted 57 lines · Scott Wood
Quoted 46 lines · Simon Glass
Hi Scott,
Quoted 24 lines · Scott Wood
Quoted 23 lines · Simon Glass
These are available on other architectures, so add them on ppc.
Signed-off-by Simon Glass <[email protected]>---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: Nonearch/powerpc/include/asm/io.h | 8 ++++++++ 1 file changed, 8 insertions(+)arch/powerpc/include/asm/io.h +0
-0@@ -317,4 +317,12 @@ static inline phys_addr_t virt_to_phys(void * vaddr)#endif }Quoted 16 lines
arch/powerpc/include/asm/io.h static inline phys_addr_t virt_to_phys(void * vaddr) · line 326
Quoted 8 lines
arch/powerpc/include/asm/io.h +2
-0+/* +* TODO: The kernel offers some more advanced versions of barriers, it might
+ * have some advantages to use them instead of the simple one here.
+ */arch/powerpc/include/asm/io.h +3
-0+#define dmb () __asm__ __volatile__ ("" : : : "memory") +#define __iormb () dmb() +#define __iowmb () dmb()What is the definition of these? Given that we already have an architecture-independent
barrier(), I assume this is meant to be an actual
hardware barrier rather than a compiler barrier, so this is not a correct
implementation.Quoted 4 lines
They were introduced in ARM in commit
3c0659b5, so I am really just following along with that. Yes the naming doesn't make a lot of sense, but on the other hand I don't think we necessarily want an actual hardware barrier in our writel()s.We do have a hardware barrier in
writel()on PPC (ignoring the broken never-used little-endian implementation, which should just be removed), and it should stay that way.
Quoted 5 lines
I do not think we should be introducing anything that looks like a hardware barrier but isn't, unless the semantics of a particular barrier are guaranteed by a particular platform without needing a barrier instruction. And in that case there had better be a document somewhere that explains what the semantics are.
Yes, agreed.
Quoted 9 lines
Quoted 5 lines
This at least makes sure that the
compiler writes in the right order - perhaps the intent is that that rest is best left to the hardware?Regardless of what one might think is "best", it isn't left to hardware on many platforms, including PPC.
I really mean that my reading is that this is all that is needed in writel() and friends. In order words, we don't need to tell the hardware to strongly order, or whatever.
I think I can just drop this patch and things will still build.
Can you please take a look at this code too, from the patch which brings in post-relocation board init (board_r.c):
#ifdef CONFIG_PPC
/* TODO: Can we not use dmb() macros for this? */
asm("sync ; isync");#endif
Regards,
Simon
Quoted 2 lines
-Scott
PATCH v5 1/23 ppc: Add initial memory barrier macros
Quoted 7 lines · Simon Glass
Can you please take a look at this code too, from the patch which brings in post-relocation board init (
board_r.c):#ifdef CONFIG_PPC /* TODO: Can we not use dmb() macros for this? */ asm("sync ; isync");#endif
I'm not sure why we need that at all. It's been there since "Initial revision", so git history isn't helpful in explaining it.
-Scott
PATCH v5 1/23 ppc: Add initial memory barrier macros
Hi Scott,
Quoted 5 lines · Scott Wood
Quoted 4 lines · Simon Glass
Can you please take a look at this code too, from the patch which brings in post-relocation board init (
board_r.c):
Quoted 8 lines
Quoted 4 lines
#ifdef CONFIG_PPC /* TODO: Can we not use dmb() macros for this? */ asm("sync ; isync");#endif
I'm not sure why we need that at all. It's been there since "Initial revision", so git history isn't helpful in explaining it.
OK great, I will punt it for generic board.
Quoted 2 lines
-Scott
Regards,
Simon
PATCH v5 2/23 Introduce generic u-boot.h file
In reply to Simon GlassThis file holds the board info structure. We need this to be generic for the unified board series, so create a structure which contains the basic fields required by the main architectures.
---
Changes in v5:
- Use unsigned int for baud_rate
- Remove bi_ip_addr field from struct bd_info
Changes in v4:
- Add three more fields required for ARM
Changes in v3: None
Changes in v2: None
include/asm-generic/u-boot.h | 159 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 include/asm-generic/u-boot.h
include/asm-generic/u-boot.h new file +159 -0
@@ -0,0 +1,159 @@ +/* +* (C) Copyright 2000 - 2002 +* Wolfgang Denk, DENX Software Engineering, wd at denx.de. +* +* 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 +* +******************************************************************** +* NOTE: This header file defines an interface to U-Boot. Including +* this (unmodified) header file in another file is considered normal +* use of U-Boot, and does *not* fall under the heading of "derived +* work". +******************************************************************** +*/ + +#ifndef __ASM_GENERIC_U_BOOT_H__ +#define __ASM_GENERIC_U_BOOT_H__ + +/* +* Board information passed to Linux kernel from U-Boot +* +* include/asm-ppc/u-boot.h +*/ + +#ifndef __ASSEMBLY__ + +typedef struct bd_info { +unsigned long bi_memstart;/* start of DRAM memory */ +phys_size_t bi_memsize;/* size of DRAM memory in bytes */ +unsigned long bi_flashstart;/* start of FLASH memory */ +unsigned long bi_flashsize;/* size of FLASH memory */ +unsigned long bi_flashoffset;/* reserved area for startup monitor */ +unsigned long bi_sramstart;/* start of SRAM memory */ +unsigned long bi_sramsize;/* size of SRAM memory */ +#ifdef CONFIG_ARM +unsigned long bi_arm_freq;/* arm frequency */ +unsigned long bi_dsp_freq;/* dsp core frequency */ +unsigned long bi_ddr_freq;/* ddr frequency */ +#endif +#if defined(CONFIG_5xx) || defined(CONFIG_8xx) || defined(CONFIG_8260 ) \ + || defined(CONFIG_E500 ) || defined(CONFIG_MPC86xx) +unsigned long bi_immr_base;/* base of IMMR register */ +#endif +#if defined(CONFIG_MPC5xxx) +unsigned long bi_mbar_base;/* base of internal registers */ +#endif +#if defined(CONFIG_MPC83xx) +unsigned long bi_immrbar; +#endif +#if defined(CONFIG_MPC8220 ) +unsigned long bi_mbar_base;/* base of internal registers */ +unsigned long bi_inpfreq;/* Input Freq, In MHz */ +unsigned long bi_pcifreq;/* PCI Freq, in MHz */ +unsigned long bi_pevfreq;/* PEV Freq, in MHz */ +unsigned long bi_flbfreq;/* Flexbus Freq, in MHz */ +unsigned long bi_vcofreq;/* VCO Freq, in MHz */ +#endif +unsigned long bi_bootflags;/* boot / reboot flag (Unused) */ +unsigned char bi_enetaddr[6 ];/* OLD: see README.enetaddr */ +unsigned short bi_ethspeed;/* Ethernet speed in Mbps */ +unsigned long bi_intfreq;/* Internal Freq, in MHz */ +unsigned long bi_busfreq;/* Bus Freq, in MHz */ +#if defined(CONFIG_CPM2 ) +unsigned long bi_cpmfreq;/* CPM_CLK Freq, in MHz */ +unsigned long bi_brgfreq;/* BRG_CLK Freq, in MHz */ +unsigned long bi_sccfreq;/* SCC_CLK Freq, in MHz */ +unsigned long bi_vco;/* VCO Out from PLL, in MHz */ +#endif +#if defined(CONFIG_MPC512X ) +unsigned long bi_ipsfreq;/* IPS Bus Freq, in MHz */ +#endif /* CONFIG_MPC512X */ +#if defined(CONFIG_MPC5xxx) +unsigned long bi_ipbfreq;/* IPB Bus Freq, in MHz */ +unsigned long bi_pcifreq;/* PCI Bus Freq, in MHz */ +#endif +unsigned int bi_baudrate;/* Console Baudrate */ +#if defined(CONFIG_405 ) || \ + defined(CONFIG_405GP ) || \ + defined(CONFIG_405CR ) || \ + defined(CONFIG_405EP ) || \ + defined(CONFIG_405EZ ) || \ + defined(CONFIG_405EX ) || \ + defined(CONFIG_440 ) +unsigned char bi_s_version[4 ];/* Version of this structure */ +unsigned char bi_r_version[32 ];/* Version of the ROM (AMCC) */ +unsigned int bi_procfreq;/* CPU (Internal) Freq, in Hz */ +unsigned int bi_plb_busfreq;/* PLB Bus speed, in Hz */ +unsigned int bi_pci_busfreq;/* PCI Bus speed, in Hz */ +unsigned char bi_pci_enetaddr[6 ];/* PCI Ethernet MAC address */ +#endif +#if defined(CONFIG_HYMOD ) +hymod_conf_t bi_hymod_conf;/* hymod configuration information */ +#endif + +#ifdef CONFIG_HAS_ETH1 +unsigned char bi_enet1addr[6 ];/* OLD: see README.enetaddr */ +#endif +#ifdef CONFIG_HAS_ETH2 +unsigned char bi_enet2addr[6 ];/* OLD: see README.enetaddr */ +#endif +#ifdef CONFIG_HAS_ETH3 +unsigned char bi_enet3addr[6 ];/* OLD: see README.enetaddr */ +#endif +#ifdef CONFIG_HAS_ETH4 +unsigned char bi_enet4addr[6 ];/* OLD: see README.enetaddr */ +#endif +#ifdef CONFIG_HAS_ETH5 +unsigned char bi_enet5addr[6 ];/* OLD: see README.enetaddr */ +#endif + +#if defined(CONFIG_405GP ) || defined(CONFIG_405EP ) || \ + defined(CONFIG_405EZ ) || defined(CONFIG_440GX ) || \ + defined(CONFIG_440EP ) || defined(CONFIG_440GR ) || \ + defined(CONFIG_440EPX ) || defined(CONFIG_440GRX ) || \ + defined(CONFIG_460EX ) || defined(CONFIG_460GT ) +unsigned int bi_opbfreq;/* OPB clock in Hz */ +int bi_iic_fast[2 ];/* Use fast i2c mode */ +#endif +#if defined(CONFIG_NX823 ) +unsigned char bi_sernum[8 ]; +#endif +#if defined(CONFIG_4xx) +#if defined(CONFIG_440GX ) || \ + defined(CONFIG_460EX ) || defined(CONFIG_460GT ) +int bi_phynum[4 ];/* Determines phy mapping */ +int bi_phymode[4 ];/* Determines phy mode */ +#elif defined(CONFIG_405EP ) || defined(CONFIG_405EX ) || defined(CONFIG_440 ) +int bi_phynum[2 ];/* Determines phy mapping */ +int bi_phymode[2 ];/* Determines phy mode */ +#else +int bi_phynum[1 ];/* Determines phy mapping */ +int bi_phymode[1 ];/* Determines phy mode */ +#endif +#endif /* defined(CONFIG_4xx) */ +ulong bi_arch_number;/* unique id for this board */ +ulong bi_boot_params;/* where this board expects params */ +#ifdef CONFIG_NR_DRAM_BANKS +struct {/* RAM configuration */ +ulong start; +ulong size; + } bi_dram[CONFIG_NR_DRAM_BANKS ]; +#endif /* CONFIG_NR_DRAM_BANKS */ +}bd_t ; + +#endif /* __ASSEMBLY__ */ + +#endif /* __ASM_GENERIC_U_BOOT_H__ */
Signature · 1 line
1.8.1
PATCH v5 3/23 Replace __bss_end__ with __bss_end
In reply to Simon GlassNote this is a tree-wide change affecting multiple architectures.
At present we use __bss_start, but mostly __bss_end__. This seems inconsistent and in a number of places __bss_end is used instead.
Change to use __bss_end for the BSS end symbol throughout U-Boot. This makes it possible to use the asm-generic/sections.h file on all archs.
---
Changes in v5:
- Add new patch to replace __bss_end__ with __bss_end
Changes in v4: None
Changes in v3: None
Changes in v2: None
arch/arm/cpu/arm1136/start.S | 2 +- arch/arm/cpu/arm1136/u-boot-spl.lds | 2 +- arch/arm/cpu/arm1176/start.S | 2 +- arch/arm/cpu/arm720t/start.S | 2 +- arch/arm/cpu/arm920t/ep93xx/u-boot.lds | 2 +- arch/arm/cpu/arm920t/start.S | 2 +- arch/arm/cpu/arm925t/start.S | 2 +- arch/arm/cpu/arm926ejs/davinci/spl.c | 2 +- arch/arm/cpu/arm926ejs/mxs/start.S | 2 +- arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds | 2 +- arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds | 2 +- arch/arm/cpu/arm926ejs/start.S | 4 ++-- arch/arm/cpu/arm946es/start.S | 2 +- arch/arm/cpu/arm_intcm/start.S | 2 +- arch/arm/cpu/armv7/omap-common/u-boot-spl.lds | 2 +- arch/arm/cpu/armv7/socfpga/u-boot-spl.lds | 2 +- arch/arm/cpu/armv7/start.S | 2 +- arch/arm/cpu/ixp/start.S | 2 +- arch/arm/cpu/ixp/u-boot.lds | 2 +- arch/arm/cpu/pxa/start.S | 2 +- arch/arm/cpu/s3c44b0/start.S | 2 +- arch/arm/cpu/sa1100/start.S | 2 +- arch/arm/cpu/u-boot.lds | 4 ++-- arch/arm/include/asm/spl.h | 2 +- arch/arm/lib/crt0.S | 4 ++-- arch/arm/lib/spl.c | 2 +- arch/avr32/cpu/start.S | 2 +- arch/avr32/cpu/u-boot.lds | 2 +- arch/avr32/include/asm/sections.h | 2 +- arch/avr32/lib/board.c | 4 ++-- arch/m68k/lib/board.c | 4 ++-- arch/nds32/cpu/n1213/start.S | 2 +- arch/nds32/cpu/n1213/u-boot.lds | 2 +- arch/nds32/include/asm/u-boot-nds32.h | 2 +- arch/nds32/lib/board.c | 2 +- arch/nios2/cpu/start.S | 6 +++--- arch/nios2/cpu/u-boot.lds | 2 +- arch/powerpc/cpu/74xx_7xx/start.S | 4 ++-- arch/powerpc/cpu/74xx_7xx/u-boot.lds | 2 +- arch/powerpc/cpu/mpc512x/start.S | 4 ++-- arch/powerpc/cpu/mpc512x/u-boot.lds | 2 +- arch/powerpc/cpu/mpc5xx/start.S | 4 ++-- arch/powerpc/cpu/mpc5xx/u-boot.lds | 2 +- arch/powerpc/cpu/mpc5xxx/spl_boot.c | 2 +- arch/powerpc/cpu/mpc5xxx/start.S | 4 ++-- arch/powerpc/cpu/mpc5xxx/u-boot-customlayout.lds | 2 +- arch/powerpc/cpu/mpc5xxx/u-boot-spl.lds | 2 +- arch/powerpc/cpu/mpc5xxx/u-boot.lds | 2 +- arch/powerpc/cpu/mpc8220/start.S | 4 ++-- arch/powerpc/cpu/mpc8220/u-boot.lds | 2 +- arch/powerpc/cpu/mpc824x/start.S | 4 ++-- arch/powerpc/cpu/mpc824x/u-boot.lds | 2 +- arch/powerpc/cpu/mpc8260/start.S | 4 ++-- arch/powerpc/cpu/mpc8260/u-boot.lds | 2 +- arch/powerpc/cpu/mpc83xx/start.S | 4 ++-- arch/powerpc/cpu/mpc83xx/u-boot-spl.lds | 4 ++-- arch/powerpc/cpu/mpc83xx/u-boot.lds | 2 +- arch/powerpc/cpu/mpc85xx/start.S | 4 ++-- arch/powerpc/cpu/mpc85xx/u-boot-nand.lds | 2 +- arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds | 2 +- arch/powerpc/cpu/mpc85xx/u-boot-spl.lds | 2 +- arch/powerpc/cpu/mpc85xx/u-boot.lds | 2 +- arch/powerpc/cpu/mpc86xx/start.S | 4 ++-- arch/powerpc/cpu/mpc86xx/u-boot.lds | 2 +- arch/powerpc/cpu/mpc8xx/start.S | 4 ++-- arch/powerpc/cpu/ppc4xx/start.S | 4 ++-- arch/powerpc/cpu/ppc4xx/u-boot.lds | 2 +- arch/powerpc/include/asm/spl.h | 2 +- arch/powerpc/lib/board.c | 4 ++-- arch/sh/cpu/sh2/u-boot.lds | 2 +- arch/sh/cpu/sh3/u-boot.lds | 2 +- arch/sh/cpu/sh4/u-boot.lds | 2 +- board/BuS/eb_cpu5282/u-boot.lds | 2 +- board/LEOX/elpt860/u-boot.lds | 2 +- board/RPXClassic/u-boot.lds | 2 +- board/RPXlite/u-boot.lds | 2 +- board/RPXlite_dw/u-boot.lds | 2 +- board/RRvision/u-boot.lds | 2 +- board/actux1/u-boot.lds | 2 +- board/actux2/u-boot.lds | 2 +- board/actux3/u-boot.lds | 2 +- board/adder/u-boot.lds | 2 +- board/ait/cam_enc_4xx/u-boot-spl.lds | 2 +- board/altera/nios2-generic/u-boot.lds | 2 +- board/amcc/acadia/u-boot-nand.lds | 2 +- board/amcc/bamboo/u-boot-nand.lds | 2 +- board/amcc/canyonlands/u-boot-nand.lds | 2 +- board/amcc/kilauea/u-boot-nand.lds | 2 +- board/amcc/sequoia/u-boot-nand.lds | 2 +- board/amcc/sequoia/u-boot-ram.lds | 2 +- board/astro/mcf5373l/u-boot.lds | 2 +- board/cobra5272/u-boot.lds | 2 +- board/cogent/u-boot.lds | 2 +- board/dave/PPChameleonEVB/u-boot.lds | 2 +- board/davinci/da8xxevm/u-boot-spl-da850evm.lds | 2 +- board/davinci/da8xxevm/u-boot-spl-hawk.lds | 2 +- board/dvlhost/u-boot.lds | 2 +- board/eltec/mhpc/u-boot.lds | 2 +- board/emk/top860/u-boot.lds | 2 +- board/ep88x/u-boot.lds | 2 +- board/esd/dasa_sim/u-boot.lds | 2 +- board/esd/pmc440/u-boot-nand.lds | 2 +- board/esd/tasreg/u-boot.lds | 2 +- board/esteem192e/u-boot.lds | 2 +- board/evb64260/u-boot.lds | 2 +- board/fads/u-boot.lds | 2 +- board/flagadm/u-boot.lds | 2 +- board/freescale/m5208evbe/u-boot.lds | 2 +- board/freescale/m52277evb/u-boot.lds | 2 +- board/freescale/m5235evb/u-boot.lds | 2 +- board/freescale/m5249evb/u-boot.lds | 2 +- board/freescale/m5253demo/u-boot.lds | 2 +- board/freescale/m5253evbe/u-boot.lds | 2 +- board/freescale/m5271evb/u-boot.lds | 2 +- board/freescale/m5272c3/u-boot.lds | 2 +- board/freescale/m5275evb/u-boot.lds | 2 +- board/freescale/m5282evb/u-boot.lds | 2 +- board/freescale/m53017evb/u-boot.lds | 2 +- board/freescale/m5329evb/u-boot.lds | 2 +- board/freescale/m5373evb/u-boot.lds | 2 +- board/freescale/m54418twr/u-boot.lds | 2 +- board/freescale/m54451evb/u-boot.lds | 2 +- board/freescale/m54455evb/u-boot.lds | 2 +- board/freescale/m547xevb/u-boot.lds | 2 +- board/freescale/m548xevb/u-boot.lds | 2 +- board/freescale/mx31ads/u-boot.lds | 2 +- board/gaisler/gr_cpci_ax2000/u-boot.lds | 2 +- board/gaisler/gr_ep2s60/u-boot.lds | 2 +- board/gaisler/gr_xc3s_1500/u-boot.lds | 2 +- board/gaisler/grsim/u-boot.lds | 2 +- board/gaisler/grsim_leon2/u-boot.lds | 2 +- board/gen860t/u-boot-flashenv.lds | 2 +- board/gen860t/u-boot.lds | 2 +- board/genietv/u-boot.lds | 2 +- board/hermes/u-boot.lds | 2 +- board/hymod/u-boot.lds | 2 +- board/icu862/u-boot.lds | 2 +- board/idmr/u-boot.lds | 2 +- board/ip860/u-boot.lds | 2 +- board/ivm/u-boot.lds | 2 +- board/korat/u-boot-F7FC.lds | 2 +- board/kup/kup4k/u-boot.lds | 2 +- board/kup/kup4x/u-boot.lds | 2 +- board/lwmon/u-boot.lds | 2 +- board/manroland/uc100/u-boot.lds | 2 +- board/matrix_vision/mvsmr/u-boot.lds | 2 +- board/mbx8xx/u-boot.lds | 2 +- board/mousse/u-boot.lds | 2 +- board/mvblue/u-boot.lds | 2 +- board/netphone/u-boot.lds | 2 +- board/netta/u-boot.lds | 2 +- board/netta2/u-boot.lds | 2 +- board/netvia/u-boot.lds | 2 +- board/nx823/u-boot.lds | 2 +- board/quantum/u-boot.lds | 2 +- board/r360mpi/u-boot.lds | 2 +- board/rbc823/u-boot.lds | 2 +- board/renesas/sh7752evb/u-boot.lds | 2 +- board/renesas/sh7757lcr/u-boot.lds | 2 +- board/rsdproto/u-boot.lds | 2 +- board/samsung/smdk5250/smdk5250-uboot-spl.lds | 2 +- board/samsung/smdk6400/u-boot-nand.lds | 2 +- board/sandpoint/u-boot.lds | 2 +- board/sixnet/u-boot.lds | 2 +- board/snmc/qs850/u-boot.lds | 2 +- board/snmc/qs860t/u-boot.lds | 2 +- board/spc1920/u-boot.lds | 2 +- board/spd8xx/u-boot.lds | 2 +- board/stx/stxxtc/u-boot.lds | 2 +- board/svm_sc8xx/u-boot.lds | 2 +- board/tqc/tqm8xx/u-boot.lds | 2 +- board/v37/u-boot.lds | 2 +- board/vpac270/u-boot-spl.lds | 2 +- board/woodburn/woodburn.c | 2 +- nand_spl/board/amcc/acadia/u-boot.lds | 2 +- nand_spl/board/amcc/bamboo/u-boot.lds | 2 +- nand_spl/board/amcc/canyonlands/u-boot.lds | 2 +- nand_spl/board/amcc/kilauea/u-boot.lds | 2 +- nand_spl/board/amcc/sequoia/u-boot.lds | 2 +- nand_spl/board/freescale/mpc8315erdb/u-boot.lds | 4 ++-- nand_spl/board/freescale/mx31pdk/u-boot.lds | 2 +- nand_spl/board/karo/tx25/u-boot.lds | 2 +- nand_spl/board/samsung/smdk6400/u-boot.lds | 2 +- nand_spl/board/sheldon/simpc8313/u-boot.lds | 4 ++-- 184 files changed, 207 insertions(+), 207 deletions(-)
arch/arm/cpu/arm1136/start.S +1 -1
@@ -106,7 +106,7 @@ _image_copy_end_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs:
arch/arm/cpu/arm1136/u-boot-spl.lds +1 -1
@@ -57,6 +57,6 @@ SECTIONS __bss_start = .; *(.bss*) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } >.sdram }
arch/arm/cpu/arm1176/start.S +1 -1
@@ -121,7 +121,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs:
arch/arm/cpu/arm720t/start.S +1 -1
@@ -103,7 +103,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs:
arch/arm/cpu/arm920t/ep93xx/u-boot.lds +1 -1
@@ -57,7 +57,7 @@ SECTIONS . = ALIGN(4); __bss_start = .; .bss : { *(.bss) } - __bss_end__ = .; + __bss_end = .; _end = .; }
arch/arm/cpu/arm920t/start.S +1 -1
@@ -87,7 +87,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs:
arch/arm/cpu/arm925t/start.S +1 -1
@@ -93,7 +93,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs:
arch/arm/cpu/arm926ejs/davinci/spl.c +1 -1
@@ -64,7 +64,7 @@ void board_init_f(ulong dummy)#endif /* Third, we clear the BSS. */ -memset (__bss_start,0 , __bss_end__ - __bss_start); +memset (__bss_start,0 , __bss_end - __bss_start);/* Finally, setup gd and move to the next step. */ gd = &gdata;
arch/arm/cpu/arm926ejs/mxs/start.S +1 -1
@@ -133,7 +133,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs:
arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds +1 -1
@@ -73,7 +73,7 @@ SECTIONS __bss_start = .; *(.bss*) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } _end = .;
arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds +1 -1
@@ -73,7 +73,7 @@ SECTIONS __bss_start = .; *(.bss*) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } _end = .;
arch/arm/cpu/arm926ejs/start.S +2 -2
@@ -142,7 +142,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs:
@@ -151,7 +151,7 @@ _end_ofs: #ifdef CONFIG_NAND_U_BOOT .globl _end _end: - .word __bss_end__ + .word __bss_end #endif #ifdef CONFIG_USE_IRQ
arch/arm/cpu/arm946es/start.S +1 -1
@@ -103,7 +103,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs:
arch/arm/cpu/arm_intcm/start.S +1 -1
@@ -99,7 +99,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs:
arch/arm/cpu/armv7/omap-common/u-boot-spl.lds +1 -1
@@ -62,6 +62,6 @@ SECTIONS __bss_start = .; *(.bss*) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } >.sdram }
arch/arm/cpu/armv7/socfpga/u-boot-spl.lds +1 -1
@@ -46,7 +46,7 @@ SECTIONS __bss_start = .; *(.bss*) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } >.sdram . = ALIGN(8);
arch/arm/cpu/armv7/start.S +1 -1
@@ -96,7 +96,7 @@ _image_copy_end_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs:
arch/arm/cpu/ixp/start.S +1 -1
@@ -112,7 +112,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs:
arch/arm/cpu/ixp/u-boot.lds +1 -1
@@ -71,7 +71,7 @@ SECTIONS __bss_start = .; *(.bss*) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } /DISCARD/ : { *(.dynstr*) }
arch/arm/cpu/pxa/start.S +1 -1
@@ -120,7 +120,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs:
arch/arm/cpu/s3c44b0/start.S +1 -1
@@ -78,7 +78,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs:
arch/arm/cpu/sa1100/start.S +1 -1
@@ -88,7 +88,7 @@ _bss_start_ofs: .globl _bss_end_ofs _bss_end_ofs: - .word __bss_end__ - _start + .word __bss_end - _start .globl _end_ofs _end_ofs:
arch/arm/cpu/u-boot.lds +2 -2
@@ -85,7 +85,7 @@ SECTIONS __bss_start = .; *(.bss*) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } /DISCARD/ : { *(.dynstr*) }
@@ -96,5 +96,5 @@ SECTIONS } #if defined(CONFIG_SPL_TEXT_BASE) && defined(CONFIG_SPL_MAX_SIZE) -ASSERT(__bss_end__ < (CONFIG_SPL_TEXT_BASE + CONFIG_SPL_MAX_SIZE), "SPL image too big"); +ASSERT(__bss_end < (CONFIG_SPL_TEXT_BASE + CONFIG_SPL_MAX_SIZE), "SPL image too big"); #endif
arch/arm/include/asm/spl.h +1 -1
@@ -27,7 +27,7 @@#include <asm/arch/spl.h> /* Linker symbols. */ -extern char __bss_start[], __bss_end__[]; +extern char __bss_start[], __bss_end[];extern gd_t gdata;
arch/arm/lib/crt0.S +2 -2
@@ -85,7 +85,7 @@ */ .globl __bss_start -.globl __bss_end__ +.globl __bss_end /* * entry point of crt0 sequence
@@ -141,7 +141,7 @@ here: bl c_runtime_cpu_setup /* we still call old routine here */ ldr r0, =__bss_start /* this is auto-relocated! */ - ldr r1, =__bss_end__ /* this is auto-relocated! */ + ldr r1, =__bss_end /* this is auto-relocated! */ mov r2, #0x00000000 /* prepare zero to clear BSS */
arch/arm/lib/spl.c +1 -1
@@ -45,7 +45,7 @@ void __weak board_init_f(ulong dummy) asmvolatile ("mov sp, %0\n" : :"r" (CONFIG_SPL_STACK ));/* Clear the BSS. */ -memset (__bss_start,0 , __bss_end__ - __bss_start); +memset (__bss_start,0 , __bss_end - __bss_start);/* Set global data pointer. */ gd = &gdata;
arch/avr32/cpu/start.S +1 -1
@@ -244,7 +244,7 @@ relocate_code: /* zero out .bss */ mov r0, 0 mov r1, 0 - lda.w r9, __bss_end__ + lda.w r9, __bss_end sub r9, r8 1: st.d r10++, r0 sub r9, 8
arch/avr32/cpu/u-boot.lds +1 -1
@@ -68,5 +68,5 @@ SECTIONS *(.bss.*) } . = ALIGN(8); - __bss_end__ = .; + __bss_end = .; }
arch/avr32/include/asm/sections.h +1 -1
@@ -27,6 +27,6 @@extern char _text[], _etext[];extern char _data[], __data_lma[], _edata[], __edata_lma[];extern char __got_start[], __got_lma[], __got_end[]; -extern char __bss_end__[]; +extern char __bss_end[];#endif /* __ASM_AVR32_SECTIONS_H */
arch/avr32/lib/board.c +2 -2
@@ -116,7 +116,7 @@ static int display_banner (void)printf ("\n\n%s\n\n" , version_string);printf ("U-Boot code: %08lx -> %08lx data: %08lx -> %08lx\n" , (unsigned long )_text, (unsigned long )_etext, - (unsigned long )_data, (unsigned long )__bss_end__); + (unsigned long )_data, (unsigned long )__bss_end);return 0 ; }
@@ -188,7 +188,7 @@ void board_init_f(ulong board_type)* - stack */ addr =CONFIG_SYS_SDRAM_BASE + sdram_size; - monitor_len = __bss_end__ - _text; + monitor_len = __bss_end - _text;/* * Reserve memory for u-boot code, data and bss.
arch/m68k/lib/board.c +2 -2
@@ -77,7 +77,7 @@ static char *failed = "*** failed ***\n";#include <environment.h> extern ulong __init_end; -extern ulong __bss_end__; +extern ulong __bss_end;#if defined(CONFIG_WATCHDOG )# define INIT_FUNC_WATCHDOG_INIT watchdog_init,
@@ -244,7 +244,7 @@ board_init_f (ulong bootflag)* - monitor code * - board info struct */ - len = (ulong )&__bss_end__ -CONFIG_SYS_MONITOR_BASE ; + len = (ulong )&__bss_end -CONFIG_SYS_MONITOR_BASE ; addr =CONFIG_SYS_SDRAM_BASE + gd->ram_size;
arch/nds32/cpu/n1213/start.S +1 -1
@@ -240,7 +240,7 @@ fix_got_loop: clear_bss: la $r0, __bss_start /* r0 <- rel __bss_start in FLASH */ add $r0, $r0, $r9 /* r0 <- rel __bss_start in FLASH */ - la $r1, __bss_end__ /* r1 <- rel __bss_end in RAM */ + la $r1, __bss_end /* r1 <- rel __bss_end in RAM */ add $r1, $r1, $r9 /* r0 <- rel __bss_end in RAM */ li $r2, 0x00000000 /* clear */
arch/nds32/cpu/n1213/u-boot.lds +1 -1
@@ -66,7 +66,7 @@ SECTIONS __bss_start = .; *(.bss) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } }
arch/nds32/include/asm/u-boot-nds32.h +1 -1
@@ -31,7 +31,7 @@/* for the following variables, see start.S */ extern ulong __bss_start;/* BSS start relative to _start */ -extern ulong __bss_end__;/* BSS end relative to _start */ +extern ulong __bss_end;/* BSS end relative to _start */ extern ulong _end;/* end of image relative to _start */ extern ulong _start;/* start of image relative to _start */ extern ulong _TEXT_BASE;/* code start */
arch/nds32/lib/board.c +1 -1
@@ -192,7 +192,7 @@ void board_init_f(ulong bootflag)memset ((void *)gd,0 ,GENERATED_GBL_DATA_SIZE ); - gd->mon_len = (unsigned int )(&__bss_end__) - (unsigned int )(&_start); + gd->mon_len = (unsigned int )(&__bss_end) - (unsigned int )(&_start);for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {if ((*init_fnc_ptr)() !=0 )
arch/nios2/cpu/start.S +3 -3
@@ -99,12 +99,12 @@ _cur: movhi r5, %hi(_cur - _start) 3: /* ZERO BSS/SBSS -- bss and sbss are assumed to be adjacent - * and between __bss_start and __bss_end__. + * and between __bss_start and __bss_end. */ movhi r5, %hi(__bss_start) ori r5, r5, %lo(__bss_start) - movhi r6, %hi(__bss_end__) - ori r6, r6, %lo(__bss_end__) + movhi r6, %hi(__bss_end) + ori r6, r6, %lo(__bss_end) beq r5, r6, 5f 4: stwio r0, 0(r5)
arch/nios2/cpu/u-boot.lds +1 -1
@@ -101,7 +101,7 @@ SECTIONS *(.scommon) } . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; PROVIDE (end = .); /* DEBUG -- symbol table, string table, etc. etc.
arch/powerpc/cpu/74xx_7xx/start.S +2 -2
@@ -72,7 +72,7 @@ GOT_ENTRY(transfer_to_handler) GOT_ENTRY(__init_end) - GOT_ENTRY(__bss_end__) + GOT_ENTRY(__bss_end) GOT_ENTRY(__bss_start) END_GOT
@@ -715,7 +715,7 @@ in_ram: * Now clear BSS segment */ lwz r3,GOT(__bss_start) - lwz r4,GOT(__bss_end__) + lwz r4,GOT(__bss_end) cmplw 0, r3, r4 beq 6f
arch/powerpc/cpu/74xx_7xx/u-boot.lds +1 -1
@@ -89,6 +89,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
arch/powerpc/cpu/mpc512x/start.S +2 -2
@@ -77,7 +77,7 @@ GOT_ENTRY(transfer_to_handler) GOT_ENTRY(__init_end) - GOT_ENTRY(__bss_end__) + GOT_ENTRY(__bss_end) GOT_ENTRY(__bss_start) END_GOT
@@ -622,7 +622,7 @@ clear_bss: * Now clear BSS segment */ lwz r3,GOT(__bss_start) - lwz r4,GOT(__bss_end__) + lwz r4,GOT(__bss_end) cmplw 0, r3, r4 beq 6f
arch/powerpc/cpu/mpc512x/u-boot.lds +1 -1
@@ -84,7 +84,7 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); } ENTRY(_start)
arch/powerpc/cpu/mpc5xx/start.S +2 -2
@@ -65,7 +65,7 @@ GOT_ENTRY(transfer_to_handler) GOT_ENTRY(__init_end) - GOT_ENTRY(__bss_end__) + GOT_ENTRY(__bss_end) GOT_ENTRY(__bss_start) END_GOT
@@ -459,7 +459,7 @@ clear_bss: * Now clear BSS segment */ lwz r3,GOT(__bss_start) - lwz r4,GOT(__bss_end__) + lwz r4,GOT(__bss_end) cmplw 0, r3, r4 beq 6f
arch/powerpc/cpu/mpc5xx/u-boot.lds +1 -1
@@ -93,7 +93,7 @@ SECTIONS . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); . = env_start; .ppcenv :
arch/powerpc/cpu/mpc5xxx/spl_boot.c +1 -1
@@ -47,7 +47,7 @@ void board_init_f(ulong bootflag)initdram (0 );/* Clear bss */ -memset (__bss_start,'\0' , __bss_end__ - __bss_start); +memset (__bss_start,'\0' , __bss_end - __bss_start);/* * Init global_data pointer. Has to be done before calling
arch/powerpc/cpu/mpc5xxx/start.S +2 -2
@@ -66,7 +66,7 @@ GOT_ENTRY(transfer_to_handler) GOT_ENTRY(__init_end) - GOT_ENTRY(__bss_end__) + GOT_ENTRY(__bss_end) GOT_ENTRY(__bss_start) END_GOT #endif
@@ -694,7 +694,7 @@ clear_bss: * Now clear BSS segment */ lwz r3,GOT(__bss_start) - lwz r4,GOT(__bss_end__) + lwz r4,GOT(__bss_end) cmplw 0, r3, r4 beq 6f
arch/powerpc/cpu/mpc5xxx/u-boot-customlayout.lds +1 -1
@@ -91,6 +91,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
arch/powerpc/cpu/mpc5xxx/u-boot-spl.lds +1 -1
@@ -52,6 +52,6 @@ SECTIONS __bss_start = .; *(.bss*) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } > sdram }
arch/powerpc/cpu/mpc5xxx/u-boot.lds +1 -1
@@ -87,6 +87,6 @@ SECTIONS *(.sbss*) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
arch/powerpc/cpu/mpc8220/start.S +2 -2
@@ -64,7 +64,7 @@ GOT_ENTRY(transfer_to_handler) GOT_ENTRY(__init_end) - GOT_ENTRY(__bss_end__) + GOT_ENTRY(__bss_end) GOT_ENTRY(__bss_start) END_GOT
@@ -647,7 +647,7 @@ clear_bss: * Now clear BSS segment */ lwz r3,GOT(__bss_start) - lwz r4,GOT(__bss_end__) + lwz r4,GOT(__bss_end) cmplw 0, r3, r4 beq 6f
arch/powerpc/cpu/mpc8220/u-boot.lds +1 -1
@@ -86,6 +86,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
arch/powerpc/cpu/mpc824x/start.S +2 -2
@@ -72,7 +72,7 @@ GOT_ENTRY(transfer_to_handler) GOT_ENTRY(__init_end) - GOT_ENTRY(__bss_end__) + GOT_ENTRY(__bss_end) GOT_ENTRY(__bss_start) #if defined(CONFIG_FADS) GOT_ENTRY(environment)
@@ -584,7 +584,7 @@ clear_bss: * Now clear BSS segment */ lwz r3,GOT(__bss_start) - lwz r4,GOT(__bss_end__) + lwz r4,GOT(__bss_end) cmplw 0, r3, r4 beq 6f
arch/powerpc/cpu/mpc824x/u-boot.lds +1 -1
@@ -87,6 +87,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
arch/powerpc/cpu/mpc8260/start.S +2 -2
@@ -65,7 +65,7 @@ GOT_ENTRY(transfer_to_handler) GOT_ENTRY(__init_end) - GOT_ENTRY(__bss_end__) + GOT_ENTRY(__bss_end) GOT_ENTRY(__bss_start) #if defined(CONFIG_HYMOD) GOT_ENTRY(environment)
@@ -920,7 +920,7 @@ clear_bss: */ lwz r4,GOT(environment) #else - lwz r4,GOT(__bss_end__) + lwz r4,GOT(__bss_end) #endif cmplw 0, r3, r4
arch/powerpc/cpu/mpc8260/u-boot.lds +1 -1
@@ -86,6 +86,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
arch/powerpc/cpu/mpc83xx/start.S +2 -2
@@ -76,7 +76,7 @@ START_GOT GOT_ENTRY(_GOT2_TABLE_) GOT_ENTRY(__bss_start) - GOT_ENTRY(__bss_end__) + GOT_ENTRY(__bss_end) #ifndef MINIMAL_SPL GOT_ENTRY(_FIXUP_TABLE_)
@@ -980,7 +980,7 @@ clear_bss: */ lwz r4,GOT(environment) #else - lwz r4,GOT(__bss_end__) + lwz r4,GOT(__bss_end) #endif cmplw 0, r3, r4
arch/powerpc/cpu/mpc83xx/u-boot-spl.lds +2 -2
@@ -49,7 +49,7 @@ SECTIONS .bss (NOLOAD) : { *(.*bss) } - __bss_end__ = .; + __bss_end = .; } ENTRY(_start) -ASSERT(__bss_end__ <= 0xfff01000, "NAND bootstrap too big"); +ASSERT(__bss_end <= 0xfff01000, "NAND bootstrap too big");
arch/powerpc/cpu/mpc83xx/u-boot.lds +1 -1
@@ -85,7 +85,7 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); } ENTRY(_start)
arch/powerpc/cpu/mpc85xx/start.S +2 -2
@@ -70,7 +70,7 @@ #endif GOT_ENTRY(__init_end) - GOT_ENTRY(__bss_end__) + GOT_ENTRY(__bss_end) GOT_ENTRY(__bss_start) END_GOT
@@ -1784,7 +1784,7 @@ clear_bss: * Now clear BSS segment */ lwz r3,GOT(__bss_start) - lwz r4,GOT(__bss_end__) + lwz r4,GOT(__bss_end) cmplw 0,r3,r4 beq 6f
arch/powerpc/cpu/mpc85xx/u-boot-nand.lds +1 -1
@@ -103,6 +103,6 @@ SECTIONS } :bss . = ALIGN(4); - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds +1 -1
@@ -80,6 +80,6 @@ SECTIONS *(.sbss*) *(.bss*) } - __bss_end__ = .; + __bss_end = .; } ASSERT(__init_end <= (0xfff00000 + RESET_VECTOR_OFFSET), "NAND bootstrap too big");
arch/powerpc/cpu/mpc85xx/u-boot-spl.lds +1 -1
@@ -83,5 +83,5 @@ SECTIONS *(.sbss*) *(.bss*) } - __bss_end__ = .; + __bss_end = .; }
arch/powerpc/cpu/mpc85xx/u-boot.lds +1 -1
@@ -127,6 +127,6 @@ SECTIONS } :bss . = ALIGN(4); - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
arch/powerpc/cpu/mpc86xx/start.S +2 -2
@@ -61,7 +61,7 @@ GOT_ENTRY(transfer_to_handler) GOT_ENTRY(__init_end) - GOT_ENTRY(__bss_end__) + GOT_ENTRY(__bss_end) GOT_ENTRY(__bss_start) END_GOT
@@ -800,7 +800,7 @@ in_ram: * Now clear BSS segment */ lwz r3,GOT(__bss_start) - lwz r4,GOT(__bss_end__) + lwz r4,GOT(__bss_end) cmplw 0, r3, r4 beq 6f
arch/powerpc/cpu/mpc86xx/u-boot.lds +1 -1
@@ -90,6 +90,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
arch/powerpc/cpu/mpc8xx/start.S +2 -2
@@ -72,7 +72,7 @@ GOT_ENTRY(transfer_to_handler) GOT_ENTRY(__init_end) - GOT_ENTRY(__bss_end__) + GOT_ENTRY(__bss_end) GOT_ENTRY(__bss_start) END_GOT
@@ -590,7 +590,7 @@ clear_bss: * Now clear BSS segment */ lwz r3,GOT(__bss_start) - lwz r4,GOT(__bss_end__) + lwz r4,GOT(__bss_end) cmplw 0, r3, r4 beq 6f
arch/powerpc/cpu/ppc4xx/start.S +2 -2
@@ -243,7 +243,7 @@ GOT_ENTRY(transfer_to_handler) GOT_ENTRY(__init_end) - GOT_ENTRY(__bss_end__) + GOT_ENTRY(__bss_end) GOT_ENTRY(__bss_start) END_GOT #endif /* CONFIG_NAND_SPL */
@@ -1509,7 +1509,7 @@ clear_bss: * Now clear BSS segment */ lwz r3,GOT(__bss_start) - lwz r4,GOT(__bss_end__) + lwz r4,GOT(__bss_end) cmplw 0, r3, r4 beq 7f
arch/powerpc/cpu/ppc4xx/u-boot.lds +1 -1
@@ -142,6 +142,6 @@ SECTIONS } :bss . = ALIGN(4); - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
arch/powerpc/include/asm/spl.h +1 -1
@@ -26,6 +26,6 @@#define BOOT_DEVICE_NOR 1/* Linker symbols */ -extern char __bss_start[], __bss_end__[]; +extern char __bss_start[], __bss_end[];#endif
arch/powerpc/lib/board.c +2 -2
@@ -123,7 +123,7 @@ DECLARE_GLOBAL_DATA_PTR;#endif extern ulong __init_end; -extern ulong __bss_end__; +extern ulong __bss_end;ulong monitor_flash_len;#if defined(CONFIG_CMD_BEDBUG )
@@ -419,7 +419,7 @@ void board_init_f(ulong bootflag)* - monitor code * - board info struct */ - len = (ulong )&__bss_end__ -CONFIG_SYS_MONITOR_BASE ; + len = (ulong )&__bss_end -CONFIG_SYS_MONITOR_BASE ;/* * Subtract specified amount of memory to hide so that it won't
arch/sh/cpu/sh2/u-boot.lds +1 -1
@@ -88,5 +88,5 @@ SECTIONS } PROVIDE (bss_end = .); - PROVIDE (__bss_end__ = .); + PROVIDE (__bss_end = .); }
arch/sh/cpu/sh3/u-boot.lds +1 -1
@@ -95,5 +95,5 @@ SECTIONS } PROVIDE (bss_end = .); - PROVIDE (__bss_end__ = .); + PROVIDE (__bss_end = .); }
arch/sh/cpu/sh4/u-boot.lds +1 -1
@@ -92,5 +92,5 @@ SECTIONS } PROVIDE (bss_end = .); - PROVIDE (__bss_end__ = .); + PROVIDE (__bss_end = .); }
board/BuS/eb_cpu5282/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/LEOX/elpt860/u-boot.lds +1 -1
@@ -112,6 +112,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/RPXClassic/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/RPXlite/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/RPXlite_dw/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/RRvision/u-boot.lds +1 -1
@@ -98,6 +98,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/actux1/u-boot.lds +1 -1
@@ -78,7 +78,7 @@ SECTIONS . = ALIGN(4); _end = .; } - __bss_end__ =.; + __bss_end =.; /DISCARD/ : { *(.dynstr*) } /DISCARD/ : { *(.dynamic*) } /DISCARD/ : { *(.plt*) }
board/actux2/u-boot.lds +1 -1
@@ -78,7 +78,7 @@ SECTIONS . = ALIGN(4); _end = .; } - __bss_end__ =.; + __bss_end =.; /DISCARD/ : { *(.dynstr*) } /DISCARD/ : { *(.dynamic*) } /DISCARD/ : { *(.plt*) }
board/actux3/u-boot.lds +1 -1
@@ -78,7 +78,7 @@ SECTIONS . = ALIGN(4); _end = .; } - __bss_end__ =.; + __bss_end =.; /DISCARD/ : { *(.dynstr*) } /DISCARD/ : { *(.dynamic*) } /DISCARD/ : { *(.plt*) }
board/adder/u-boot.lds +1 -1
@@ -89,7 +89,7 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); } ENTRY(_start)
board/ait/cam_enc_4xx/u-boot-spl.lds +1 -1
@@ -69,7 +69,7 @@ SECTIONS __bss_start = .; *(.bss*) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } >.sram __image_copy_end = .;
board/altera/nios2-generic/u-boot.lds +1 -1
@@ -102,7 +102,7 @@ SECTIONS *(.scommon) } . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; PROVIDE (end = .); /* DEBUG -- symbol table, string table, etc. etc.
board/amcc/acadia/u-boot-nand.lds +1 -1
@@ -98,6 +98,6 @@ SECTIONS . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/amcc/bamboo/u-boot-nand.lds +1 -1
@@ -99,6 +99,6 @@ SECTIONS . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/amcc/canyonlands/u-boot-nand.lds +1 -1
@@ -99,6 +99,6 @@ SECTIONS . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/amcc/kilauea/u-boot-nand.lds +1 -1
@@ -98,6 +98,6 @@ SECTIONS . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/amcc/sequoia/u-boot-nand.lds +1 -1
@@ -99,6 +99,6 @@ SECTIONS . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/amcc/sequoia/u-boot-ram.lds +1 -1
@@ -90,6 +90,6 @@ SECTIONS . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/astro/mcf5373l/u-boot.lds +1 -1
@@ -97,6 +97,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/cobra5272/u-boot.lds +1 -1
@@ -96,6 +96,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/cogent/u-boot.lds +1 -1
@@ -97,6 +97,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/dave/PPChameleonEVB/u-boot.lds +1 -1
@@ -126,6 +126,6 @@ SECTIONS } :bss . = ALIGN(4); - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/davinci/da8xxevm/u-boot-spl-da850evm.lds +1 -1
@@ -71,7 +71,7 @@ SECTIONS __bss_start = .; *(.bss*) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } >.sram __image_copy_end = .;
board/davinci/da8xxevm/u-boot-spl-hawk.lds +1 -1
@@ -79,7 +79,7 @@ SECTIONS __bss_start = .; *(.bss*) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } _end = .;
board/dvlhost/u-boot.lds +1 -1
@@ -78,7 +78,7 @@ SECTIONS . = ALIGN(4); _end = .; } - __bss_end__ =.; + __bss_end =.; /DISCARD/ : { *(.dynstr*) } /DISCARD/ : { *(.dynamic*) } /DISCARD/ : { *(.plt*) }
board/eltec/mhpc/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/emk/top860/u-boot.lds +1 -1
@@ -94,6 +94,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/ep88x/u-boot.lds +1 -1
@@ -89,7 +89,7 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); } ENTRY(_start)
board/esd/dasa_sim/u-boot.lds +1 -1
@@ -100,6 +100,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/esd/pmc440/u-boot-nand.lds +1 -1
@@ -129,6 +129,6 @@ SECTIONS . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/esd/tasreg/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/esteem192e/u-boot.lds +1 -1
@@ -101,6 +101,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/evb64260/u-boot.lds +1 -1
@@ -97,6 +97,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/fads/u-boot.lds +1 -1
@@ -95,7 +95,7 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); } ENTRY(_start)
board/flagadm/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/freescale/m5208evbe/u-boot.lds +1 -1
@@ -97,6 +97,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/freescale/m52277evb/u-boot.lds +1 -1
@@ -96,6 +96,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/freescale/m5235evb/u-boot.lds +1 -1
@@ -96,6 +96,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/freescale/m5249evb/u-boot.lds +1 -1
@@ -96,6 +96,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/freescale/m5253demo/u-boot.lds +1 -1
@@ -97,6 +97,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/freescale/m5253evbe/u-boot.lds +1 -1
@@ -96,6 +96,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/freescale/m5271evb/u-boot.lds +1 -1
@@ -96,6 +96,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/freescale/m5272c3/u-boot.lds +1 -1
@@ -96,6 +96,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/freescale/m5275evb/u-boot.lds +1 -1
@@ -96,6 +96,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/freescale/m5282evb/u-boot.lds +1 -1
@@ -96,6 +96,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/freescale/m53017evb/u-boot.lds +1 -1
@@ -99,6 +99,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/freescale/m5329evb/u-boot.lds +1 -1
@@ -97,6 +97,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/freescale/m5373evb/u-boot.lds +1 -1
@@ -97,6 +97,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/freescale/m54418twr/u-boot.lds +1 -1
@@ -94,6 +94,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/freescale/m54451evb/u-boot.lds +1 -1
@@ -94,6 +94,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/freescale/m54455evb/u-boot.lds +1 -1
@@ -94,6 +94,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/freescale/m547xevb/u-boot.lds +1 -1
@@ -94,6 +94,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/freescale/m548xevb/u-boot.lds +1 -1
@@ -94,6 +94,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/freescale/mx31ads/u-boot.lds +1 -1
@@ -84,7 +84,7 @@ SECTIONS __bss_start = .; *(.bss) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } /DISCARD/ : { *(.bss*) }
board/gaisler/gr_cpci_ax2000/u-boot.lds +1 -1
@@ -134,7 +134,7 @@ SECTIONS . = ALIGN(16); /* to speed clearing of bss up */ } __bss_end = . ; - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); /* Relocated into main memory */
board/gaisler/gr_ep2s60/u-boot.lds +1 -1
@@ -134,7 +134,7 @@ SECTIONS . = ALIGN(16); /* to speed clearing of bss up */ } __bss_end = . ; - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); /* Relocated into main memory */
board/gaisler/gr_xc3s_1500/u-boot.lds +1 -1
@@ -135,7 +135,7 @@ SECTIONS . = ALIGN(16); /* to speed clearing of bss up */ } __bss_end = . ; - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); /* Relocated into main memory */
board/gaisler/grsim/u-boot.lds +1 -1
@@ -134,7 +134,7 @@ SECTIONS . = ALIGN(16); /* to speed clearing of bss up */ } __bss_end = . ; - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); /* Relocated into main memory */
board/gaisler/grsim_leon2/u-boot.lds +1 -1
@@ -133,7 +133,7 @@ SECTIONS . = ALIGN(16); /* to speed clearing of bss up */ } __bss_end = . ; - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); /* Relocated into main memory */
board/gen860t/u-boot-flashenv.lds +1 -1
@@ -97,7 +97,7 @@ SECTIONS . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); .ppcenv:
board/gen860t/u-boot.lds +1 -1
@@ -98,6 +98,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/genietv/u-boot.lds +1 -1
@@ -112,6 +112,6 @@ SECTIONS common/env_embedded.o (.ppcenv) } . = ALIGN(4); - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/hermes/u-boot.lds +1 -1
@@ -99,6 +99,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/hymod/u-boot.lds +1 -1
@@ -143,6 +143,6 @@ SECTIONS common/env_embedded.o (.ppcenv) } . = ALIGN(4); - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/icu862/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/idmr/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS . = ALIGN(4); _ebss = .; } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/ip860/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/ivm/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/korat/u-boot-F7FC.lds +1 -1
@@ -135,6 +135,6 @@ SECTIONS . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/kup/kup4k/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/kup/kup4x/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/lwmon/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/manroland/uc100/u-boot.lds +1 -1
@@ -96,6 +96,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/matrix_vision/mvsmr/u-boot.lds +1 -1
@@ -100,6 +100,6 @@ SECTIONS *(.sbss*) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/mbx8xx/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/mousse/u-boot.lds +1 -1
@@ -88,6 +88,6 @@ SECTIONS . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/mvblue/u-boot.lds +1 -1
@@ -97,6 +97,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/netphone/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/netta/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/netta2/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/netvia/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/nx823/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/quantum/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/r360mpi/u-boot.lds +1 -1
@@ -95,7 +95,7 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); . = ALIGN(128 * 1024); .ppcenv :
board/rbc823/u-boot.lds +1 -1
@@ -103,6 +103,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/renesas/sh7752evb/u-boot.lds +1 -1
@@ -93,5 +93,5 @@ SECTIONS } PROVIDE (bss_end = .); - PROVIDE (__bss_end__ = .); + PROVIDE (__bss_end = .); }
board/renesas/sh7757lcr/u-boot.lds +1 -1
@@ -94,5 +94,5 @@ SECTIONS } PROVIDE (bss_end = .); - PROVIDE (__bss_end__ = .); + PROVIDE (__bss_end = .); }
board/rsdproto/u-boot.lds +1 -1
@@ -125,6 +125,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/samsung/smdk5250/smdk5250-uboot-spl.lds +1 -1
@@ -66,6 +66,6 @@ SECTIONS __bss_start = .; *(.bss*) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } >.sram }
board/samsung/smdk6400/u-boot-nand.lds +1 -1
@@ -75,7 +75,7 @@ SECTIONS __bss_start = .; *(.bss) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } /DISCARD/ : { *(.dynstr*) }
board/sandpoint/u-boot.lds +1 -1
@@ -95,6 +95,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/sixnet/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/snmc/qs850/u-boot.lds +1 -1
@@ -96,6 +96,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/snmc/qs860t/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/spc1920/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/spd8xx/u-boot.lds +1 -1
@@ -102,6 +102,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/stx/stxxtc/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/svm_sc8xx/u-boot.lds +1 -1
@@ -110,6 +110,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/tqc/tqm8xx/u-boot.lds +1 -1
@@ -106,6 +106,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/v37/u-boot.lds +1 -1
@@ -93,6 +93,6 @@ SECTIONS *(COMMON) . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; PROVIDE (end = .); }
board/vpac270/u-boot-spl.lds +1 -1
@@ -82,7 +82,7 @@ SECTIONS __bss_start = .; *(.bss) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } /DISCARD/ : { *(.bss*) }
board/woodburn/woodburn.c +1 -1
@@ -148,7 +148,7 @@ void board_init_f(ulong dummy)woodburn_init ();/* Clear the BSS. */ -memset (__bss_start,0 , __bss_end__ - __bss_start); +memset (__bss_start,0 , __bss_end - __bss_start);/* Set global data pointer. */ gd = &gdata;
nand_spl/board/amcc/acadia/u-boot.lds +1 -1
@@ -60,5 +60,5 @@ SECTIONS . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; }
nand_spl/board/amcc/bamboo/u-boot.lds +1 -1
@@ -62,5 +62,5 @@ SECTIONS . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; }
nand_spl/board/amcc/canyonlands/u-boot.lds +1 -1
@@ -62,5 +62,5 @@ SECTIONS . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; }
nand_spl/board/amcc/kilauea/u-boot.lds +1 -1
@@ -60,5 +60,5 @@ SECTIONS . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; }
nand_spl/board/amcc/sequoia/u-boot.lds +1 -1
@@ -62,5 +62,5 @@ SECTIONS . = ALIGN(4); } - __bss_end__ = . ; + __bss_end = . ; }
nand_spl/board/freescale/mpc8315erdb/u-boot.lds +2 -2
@@ -49,7 +49,7 @@ SECTIONS .bss (NOLOAD) : { *(.*bss) } - __bss_end__ = .; + __bss_end = .; } ENTRY(_start) -ASSERT(__bss_end__ <= 0xfff01000, "NAND bootstrap too big"); +ASSERT(__bss_end <= 0xfff01000, "NAND bootstrap too big");
nand_spl/board/freescale/mx31pdk/u-boot.lds +1 -1
@@ -73,7 +73,7 @@ SECTIONS __bss_start = .; *(.bss) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } /DISCARD/ : { *(.bss*) }
nand_spl/board/karo/tx25/u-boot.lds +1 -1
@@ -71,7 +71,7 @@ SECTIONS __bss_start = .; *(.bss) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } /DISCARD/ : { *(.bss*) }
nand_spl/board/samsung/smdk6400/u-boot.lds +1 -1
@@ -75,6 +75,6 @@ SECTIONS __bss_start = .; *(.bss) . = ALIGN(4); - __bss_end__ = .; + __bss_end = .; } }
nand_spl/board/sheldon/simpc8313/u-boot.lds +2 -2
@@ -48,7 +48,7 @@ SECTIONS . = ALIGN(8); __bss_start = .; .bss (NOLOAD) : { *(.*bss) } - __bss_end__ = .; + __bss_end = .; } ENTRY(_start) -ASSERT(__bss_end__ <= 0xfff01000, "NAND bootstrap too big"); +ASSERT(__bss_end <= 0xfff01000, "NAND bootstrap too big");
Signature · 1 line
1.8.1
PATCH v5 3/23 Replace __bss_end__ with __bss_end
Quoted 11 lines · Simon Glass
Note this is a tree-wide change affecting multiple architectures.
At present we use
__bss_start, but mostly__bss_end__. This seems inconsistent and in a number of places__bss_endis used instead.Change to use
__bss_endfor the BSS end symbol throughout U-Boot. This makes it possible to use theasm-generic/sections.hfile on all archs.Signed-off-by Simon Glass <[email protected]>
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/20130218/b9dd1b9e/attachment.pgp>
PATCH v5 3/23 Replace __bss_end__ with __bss_end
Quoted 7 lines · Tom Rini
Quoted 5 lines · Simon Glass
Note this is a tree-wide change affecting multiple architectures.
At present we use
__bss_start, but mostly__bss_end__. This seems inconsistent and in a number of places__bss_endis used instead.
Quoted 8 lines
Quoted 6 lines
Change to use
__bss_endfor the BSS end symbol throughout U-Boot. This makes it possible to use theasm-generic/sections.hfile on all archs.Signed-off-by Simon Glass <[email protected]>Reviewed-by Tom Rini <[email protected]>
The short commit log is wrong; it say's twice __bss_end.
Signature · 3 lines
Otavio Salvador O.S. Systems E-mail: otavio at ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
PATCH v5 3/23 Replace __bss_end__ with __bss_end
Hi Otavio,
Quoted 13 lines · Otavio Salvador
Quoted 12 lines · Tom Rini
Quoted 10 lines · Simon Glass
Note this is a tree-wide change affecting multiple architectures.
At present we use
__bss_start, but mostly__bss_end__. This seems inconsistent and in a number of places__bss_endis used instead.Change to use
__bss_endfor the BSS end symbol throughout U-Boot. This makes it possible to use theasm-generic/sections.hfile on all archs.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Simon Glass <[email protected]>Reviewed-by Tom Rini <[email protected]>The short commit log is wrong; it say's twice
__bss_end.
Can you please explain that one a bit more. I'm not sure I understand.
Regards,
Simon
Quoted 5 lines
--
Otavio SalvadorO.S. Systems
E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
PATCH v5 3/23 Replace __bss_end__ with __bss_end
Quoted 17 lines · Simon Glass
Hi Otavio,
Quoted 13 lines · Otavio Salvador
Quoted 12 lines · Tom Rini
Quoted 10 lines · Simon Glass
Note this is a tree-wide change affecting multiple architectures.
At present we use
__bss_start, but mostly__bss_end__. This seems inconsistent and in a number of places__bss_endis used instead.Change to use
__bss_endfor the BSS end symbol throughout U-Boot. This makes it possible to use theasm-generic/sections.hfile on all archs.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Simon Glass <[email protected]>Reviewed-by Tom Rini <[email protected]>The short commit log is wrong; it say's twice
__bss_end.Can you please explain that one a bit more. I'm not sure I understand.
Sorry; I read it wrong; it is right ... (I need to take more coffee :P)
Regards,
Signature · 3 lines
Otavio Salvador O.S. Systems E-mail: otavio at ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
PATCH v5 3/23 Replace __bss_end__ with __bss_end
Hi Otavio,
Quoted 20 lines · Otavio Salvador
Quoted 19 lines · Simon Glass
Hi Otavio,
Quoted 15 lines · Otavio Salvador
Quoted 14 lines · Tom Rini
Quoted 11 lines · Simon Glass
Note this is a tree-wide change affecting multiple architectures.
At present we use
__bss_start, but mostly__bss_end__. This seems inconsistent and in a number of places__bss_endis used instead.Change to use
__bss_endfor the BSS end symbol throughout U-Boot. This makes it possible to use theasm-generic/sections.hfile on all archs.Signed-off-by Simon Glass <[email protected]>
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Reviewed-by Tom Rini <[email protected]>The short commit log is wrong; it say's twice
__bss_end.Can you please explain that one a bit more. I'm not sure I understand.
Sorry; I read it wrong; it is right ... (I need to take more coffee :P)
OK thank you. It will be less confusing when they are all the same.
Regards,
Simon
Quoted 7 lines
Regards,
--
Otavio SalvadorO.S. Systems
E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
PATCH v5 3/23 Replace __bss_end__ with __bss_end
In reply to Simon GlassQuoted 5 lines · Simon Glass
Note this is a tree-wide change affecting multiple architectures.
At present we use
__bss_start, but mostly__bss_end__. This seems inconsistent and in a number of places__bss_endis used instead.
Quoted 7 lines
Change to use
__bss_endfor the BSS end symbol throughout U-Boot. This makes it possible to use theasm-generic/sections.hfile on all archs.Signed-off-by Simon Glass <[email protected]>
Builds for all 85xx, so:
PATCH v5 4/23 Introduce generic link section.h symbol files
In reply to Simon GlassWe create a separate header file for link symbols defined by the link scripts. It is helpful to have these all in one place and try to make them common across architectures. Since Linux already has a similar file, we bring this in even though many of the symbols there are not relevant to us.
Each architecture has its own asm/sections.h where symbols specifc to that architecture can be added. For now everything except AVR32 just includes the generic header.
One change is needed in arch/avr32/lib/board.c to make this conversion work.
---
Changes in v5:
- Remove the __bss_end #define now that this is consistent across U-Boot
Changes in v4:
- Add asm/sections.h for each architecture
Changes in v3: None
Changes in v2: None
arch/arm/include/asm/sections.h | 27 ++++++++ arch/avr32/include/asm/sections.h | 6 +- arch/avr32/lib/board.c | 2 +- arch/blackfin/include/asm/sections.h | 27 ++++++++ arch/m68k/include/asm/sections.h | 27 ++++++++ arch/microblaze/include/asm/sections.h | 27 ++++++++ arch/mips/include/asm/sections.h | 27 ++++++++ arch/nds32/include/asm/sections.h | 27 ++++++++ arch/nios2/include/asm/sections.h | 27 ++++++++ arch/openrisc/include/asm/sections.h | 27 ++++++++ arch/powerpc/include/asm/sections.h | 27 ++++++++ arch/sandbox/include/asm/sections.h | 2 + arch/sh/include/asm/sections.h | 27 ++++++++ arch/sparc/include/asm/sections.h | 27 ++++++++ arch/x86/include/asm/sections.h | 27 ++++++++ include/asm-generic/sections.h | 119 +++++++++++++++++++++++++++++++++ 16 files changed, 449 insertions(+), 4 deletions(-) create mode 100644 arch/arm/include/asm/sections.h create mode 100644 arch/blackfin/include/asm/sections.h create mode 100644 arch/m68k/include/asm/sections.h create mode 100644 arch/microblaze/include/asm/sections.h create mode 100644 arch/mips/include/asm/sections.h create mode 100644 arch/nds32/include/asm/sections.h create mode 100644 arch/nios2/include/asm/sections.h create mode 100644 arch/openrisc/include/asm/sections.h create mode 100644 arch/powerpc/include/asm/sections.h create mode 100644 arch/sh/include/asm/sections.h create mode 100644 arch/sparc/include/asm/sections.h create mode 100644 arch/x86/include/asm/sections.h create mode 100644 include/asm-generic/sections.h
arch/arm/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/avr32/include/asm/sections.h +3 -3
@@ -22,11 +22,11 @@#ifndef __ASM_AVR32_SECTIONS_H#define __ASM_AVR32_SECTIONS_H +#include <asm-generic/sections.h> +/* References to section boundaries */ -extern char _text[], _etext[]; -extern char _data[], __data_lma[], _edata[], __edata_lma[]; +extern char __data_lma[], __edata_lma[];extern char __got_start[], __got_lma[], __got_end[]; -extern char __bss_end[];#endif /* __ASM_AVR32_SECTIONS_H */
arch/avr32/lib/board.c +1 -1
@@ -188,7 +188,7 @@ void board_init_f(ulong board_type)* - stack */ addr =CONFIG_SYS_SDRAM_BASE + sdram_size; - monitor_len = __bss_end - _text; + monitor_len = (char *)__bss_end - _text;/* * Reserve memory for u-boot code, data and bss.
arch/blackfin/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_BLACKFIN_SECTIONS_H +#define __ASM_BLACKFIN_SECTIONS_H + +#include <asm-generic/sections.h> + +#endif
arch/m68k/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_M68K_SECTIONS_H +#define __ASM_M68K_SECTIONS_H + +#include <asm-generic/sections.h> + +#endif
arch/microblaze/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_MICROBLAZE_SECTIONS_H +#define __ASM_MICROBLAZE_SECTIONS_H + +#include <asm-generic/sections.h> + +#endif
arch/mips/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_MIPS_SECTIONS_H +#define __ASM_MIPS_SECTIONS_H + +#include <asm-generic/sections.h> + +#endif
arch/nds32/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_NDS32_SECTIONS_H +#define __ASM_NDS32_SECTIONS_H + +#include <asm-generic/sections.h> + +#endif
arch/nios2/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_NIOS2_SECTIONS_H +#define __ASM_NIOS2_SECTIONS_H + +#include <asm-generic/sections.h> + +#endif
arch/openrisc/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_OPENRISC_SECTIONS_H +#define __ASM_OPENRISC_SECTIONS_H + +#include <asm-generic/sections.h> + +#endif
arch/powerpc/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_POWERPC_SECTIONS_H +#define __ASM_POWERPC_SECTIONS_H + +#include <asm-generic/sections.h> + +#endif
arch/sandbox/include/asm/sections.h +2 -0
@@ -9,6 +9,8 @@#ifndef __SANDBOX_SECTIONS_H#define __SANDBOX_SECTIONS_H +#include <asm-generic/sections.h> +struct sb_cmdline_option ; extern struct sb_cmdline_option *__u_boot_sandbox_option_start[],
arch/sh/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_SH_SECTIONS_H +#define __ASM_SH_SECTIONS_H + +#include <asm-generic/sections.h> + +#endif
arch/sparc/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_SPARC_SECTIONS_H +#define __ASM_SPARC_SECTIONS_H + +#include <asm-generic/sections.h> + +#endif
arch/x86/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_X86_SECTIONS_H +#define __ASM_X86_SECTIONS_H + +#include <asm-generic/sections.h> + +#endif
include/asm-generic/sections.h new file +119 -0
119 lines not on this page · raw message
Signature · 1 line
1.8.1
PATCH v5 4/23 Introduce generic link section.h symbol files
Quoted 6 lines · Simon Glass
We create a separate header file for link symbols defined by the link scripts. It is helpful to have these all in one place and try to make them common across architectures. Since Linux already has a similar file, we bring this in even though many of the symbols there are not relevant to us.
Quoted 8 lines
Each architecture has its own
asm/sections.hwhere symbols specifc to that architecture can be added. For now everything except AVR32 just includes the generic header.One change is needed in
arch/avr32/lib/board.cto make this conversion work.Signed-off-by Simon Glass <[email protected]>
Need to specify a tag/hash for where this came from in the kernel. Also, didn't you and Wolfgang agree to drop the CREDITS file bit from the boilerplate on new files?
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/20130218/c911754b/attachment.pgp>
PATCH v5 5/23 arm: Use sections header to obtain link symbols
In reply to Simon GlassInclude this header to get access to link symbols, which are otherwise removed.
---
Changes in v5:
- Remove avr32 changes from what should be an arm patch
Changes in v4:
- Use asm/sections.h instead of asm-generic/sections.h
Changes in v3: None
Changes in v2: None
arch/arm/include/asm/u-boot-arm.h | 4 ---- arch/arm/lib/board.c | 1 + board/cm4008/flash.c | 1 + board/cm41xx/flash.c | 1 + 4 files changed, 3 insertions(+), 4 deletions(-)
arch/arm/include/asm/u-boot-arm.h +0 -4
@@ -30,12 +30,8 @@#define _U_BOOT_ARM_H_ 1/* for the following variables, see start.S */ -extern ulong _bss_start_ofs;/* BSS start relative to _start */ -extern ulong _bss_end_ofs;/* BSS end relative to _start */ -extern ulong _end_ofs;/* end of image relative to _start */ extern ulong IRQ_STACK_START ;/* top of IRQ stack */ extern ulong FIQ_STACK_START ;/* top of FIQ stack */ -extern ulong _TEXT_BASE;/* code start */ extern ulong _datarel_start_ofs;extern ulong _datarelrolocal_start_ofs;extern ulong _datarellocal_start_ofs;
arch/arm/lib/board.c +1 -0
@@ -53,6 +53,7 @@#include <fdtdec.h> #include <post.h> #include <logbuff.h> +#include <asm/sections.h> #ifdef CONFIG_BITBANGMII #include <miiphy.h>
board/cm4008/flash.c +1 -0
@@ -29,6 +29,7 @@#include <common.h> #include <linux/byteorder/swab.h> +#include <asm/sections.h> flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS ];/* info for FLASH chips */
board/cm41xx/flash.c +1 -0
@@ -29,6 +29,7 @@#include <common.h> #include <linux/byteorder/swab.h> +#include <asm/sections.h> flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS ];/* info for FLASH chips */
Signature · 1 line
1.8.1
PATCH v5 6/23 x86: nds32: Change stub example to use asm-generic/sections.h
In reply to Simon GlassWe can use the declarations of __bss_start and _end from this header instead of declaring them locally.
---
Changes in v5:
- Adjust u-boot-nds32.h link symbols to keep U-Boot building
Changes in v4:
- Use asm/sections.h instead of asm-generic/sections.h
- Adjust u-boot-x86.h link symbols to keep U-Boot building
Changes in v3: None
Changes in v2: None
arch/nds32/include/asm/u-boot-nds32.h | 8 ++++---- arch/x86/include/asm/u-boot-x86.h | 6 +++--- examples/standalone/stubs.c | 7 +++---- 3 files changed, 10 insertions(+), 11 deletions(-)
arch/nds32/include/asm/u-boot-nds32.h +4 -4
@@ -30,10 +30,10 @@#define _U_BOOT_NDS32_H_ 1/* for the following variables, see start.S */ -extern ulong __bss_start;/* BSS start relative to _start */ -extern ulong __bss_end;/* BSS end relative to _start */ -extern ulong _end;/* end of image relative to _start */ -extern ulong _start;/* start of image relative to _start */ +extern char __bss_start[];/* BSS start relative to _start */ +extern ulong __bss_end;/* BSS end relative to _start */ +extern char _end[];/* end of image relative to _start */ +extern void _start (void );/* start of image relative to _start */ extern ulong _TEXT_BASE;/* code start */ extern ulong IRQ_STACK_START ;/* top of IRQ stack */ extern ulong FIQ_STACK_START ;/* top of FIQ stack */
arch/x86/include/asm/u-boot-x86.h +3 -3
@@ -25,13 +25,13 @@#define _U_BOOT_I386_H_ 1/* Exports from the Linker Script */ -extern ulong __text_start; +extern char __text_start[];extern ulong __data_end;extern ulong __rel_dyn_start;extern ulong __rel_dyn_end; -extern ulong __bss_start; +extern char __bss_start[];extern ulong __bss_end; -extern ulong _end; +extern char _end[];/* cpu/.../cpu.c */ int x86_cpu_init_r (void );
examples/standalone/stubs.c +3 -4
@@ -217,16 +217,15 @@ void __attribute__((unused)) dummy(void)#include <_exports.h> } -extern unsigned long __bss_start, _end; +#include <asm/sections.h> void app_startup (char *const *argv) { -unsigned char * cp = (unsigned char *) &__bss_start; +char *cp = __bss_start;/* Zero out BSS */ -while (cp < (unsigned char *)&_end) { +while (cp < _end) *cp++ =0 ; - }#if defined(CONFIG_X86 )/* x86 does not have a dedicated register for passing global_data */
Signature · 1 line
1.8.1
PATCH v5 7/23 Introduce a basic initcall implementation
In reply to Simon GlassThis library supports calling a list of functions one after the other.
It is intended that we move to a more powerful initcall implementation as proposed by Graeme Russ <[email protected]>. For now, this allows us to do the basics.
---
Changes in v5:
- Add debug() code to initcalls
- Update copyright on initcalls
Changes in v4: None
Changes in v3: None
Changes in v2: None
include/initcall.h | 25 +++++++++++++++++++++++++ lib/Makefile | 1 + lib/initcall.c | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 include/initcall.h create mode 100644 lib/initcall.c
include/initcall.h new file +25 -0
@@ -0,0 +1,25 @@ +/* +* Copyright (c) 2011 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 +*/ + +typedef int (*init_fnc_t )(void ); + +int initcall_run_list (init_fnc_t init_sequence[]);
lib/Makefile +1 -0
@@ -44,6 +44,7 @@ COBJS-$(CONFIG_TEST_FDTDEC) += fdtdec_test.o COBJS-$(CONFIG_GZIP) += gunzip.o COBJS-$(CONFIG_GZIP_COMPRESSED) += gzip.o COBJS-y += hashtable.o +COBJS-y += initcall.o COBJS-$(CONFIG_LMB) += lmb.o COBJS-y += ldiv.o COBJS-$(CONFIG_MD5) += md5.o
lib/initcall.c new file +39 -0
@@ -0,0 +1,39 @@ +/* +* Copyright (c) 2013 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 +*/ + +#include <common.h> +#include <initcall.h> + +int initcall_run_list (init_fnc_t init_sequence[]) +{ +init_fnc_t *init_fnc_ptr; + +for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { +debug ("initcall: %p\n" , *init_fnc_ptr); +if ((*init_fnc_ptr)()) { +debug ("initcall sequence %p failed at call %p\n" , + init_sequence, *init_fnc_ptr); +return -1 ; + } + } +return 0 ; +}
Signature · 1 line
1.8.1
PATCH v5 8/23 Define CONFIG_SYS_LEGACY_BOARD everywhere
In reply to Simon GlassWe are introducing a new unified board setup and we want this to be the default. So we need to opt all architectures out first.
---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None
README | 11 +++++++++++ arch/arm/config.mk | 3 +++ arch/avr32/config.mk | 3 +++ arch/blackfin/config.mk | 3 +++ arch/m68k/config.mk | 3 +++ arch/microblaze/config.mk | 3 +++ arch/mips/config.mk | 3 +++ arch/nds32/config.mk | 3 +++ arch/nios2/config.mk | 3 +++ arch/powerpc/config.mk | 3 +++ arch/sandbox/config.mk | 3 +++ arch/sh/config.mk | 3 +++ arch/sparc/config.mk | 3 +++ arch/x86/config.mk | 3 +++ config.mk | 8 ++++++++ 15 files changed, 58 insertions(+)
README +11 -0
@@ -3209,6 +3209,17 @@ Configuration Settings: If defined, don't allow the -f switch to env set override variable access flags. +- CONFIG_SYS_GENERIC_BOARD + This selects the architecture-generic board system instead of the + architecture-specific board files. It is intended to move boards + to this new framework over time. Defining this will disable the + arch/foo/lib/board.c file and use common/board_f.c and + common/board_r.c instead. To use this option your architecture + must support it (i.e. must NOT define CONFIG_SYS_LEGACY_BOARD in + its config.mk file). If you find problems enabling this option on + your board please report the problem and send patches! + + The following definitions that deal with the placement and management of environment data (variable area); in general, we support the following configurations:
arch/arm/config.mk +3 -0
@@ -49,6 +49,9 @@ ifneq ($(CONFIG_SPL_BUILD),y) ALL-$(CONFIG_SYS_THUMB_BUILD) += checkthumb endif +# Move to unified board system later +CONFIG_SYS_LEGACY_BOARD := y + # Try if EABI is supported, else fall back to old API, # i. e. for example: # - with ELDK 4.2 (EABI supported), use:
arch/avr32/config.mk +3 -0
@@ -29,3 +29,6 @@ PLATFORM_RELFLAGS += -ffixed-r5 -fPIC -mno-init-got -mrelax PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections LDFLAGS_u-boot = --gc-sections --relax + +# Move to unified board system later +CONFIG_SYS_LEGACY_BOARD := y
arch/blackfin/config.mk +3 -0
@@ -37,6 +37,9 @@ CONFIG_BFIN_BOOT_MODE := $(strip $(subst ",,$(CONFIG_BFIN_BOOT_MODE))) PLATFORM_RELFLAGS += -ffixed-P3 -fomit-frame-pointer -mno-fdpic PLATFORM_CPPFLAGS += -DCONFIG_BLACKFIN +# Move to unified board system later +CONFIG_SYS_LEGACY_BOARD := y + LDFLAGS_FINAL += --gc-sections LDFLAGS += -m elf32bfin PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
arch/m68k/config.mk +3 -0
@@ -29,3 +29,6 @@ PLATFORM_CPPFLAGS += -DCONFIG_M68K -D__M68K__ PLATFORM_LDFLAGS += -n PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections LDFLAGS_FINAL += --gc-sections + +# Move to unified board system later +CONFIG_SYS_LEGACY_BOARD := y
arch/microblaze/config.mk +3 -0
@@ -33,3 +33,6 @@ PLATFORM_CPPFLAGS += -ffixed-r31 -D__microblaze__ LDSCRIPT ?= $(SRCTREE)/$(CPUDIR)/u-boot.lds CONFIG_ARCH_DEVICE_TREE := microblaze + +# Move to unified board system later +CONFIG_SYS_LEGACY_BOARD := y
arch/mips/config.mk +3 -0
@@ -41,6 +41,9 @@ ENDIANNESS ?= -EB PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__ +# Move to unified board system later +CONFIG_SYS_LEGACY_BOARD := y + # # From Linux arch/mips/Makefile #
arch/nds32/config.mk +3 -0
@@ -33,3 +33,6 @@ PLATFORM_RELFLAGS += -gdwarf-2 PLATFORM_CPPFLAGS += -DCONFIG_NDS32 -D__nds32__ -G0 -ffixed-10 -fpie LDFLAGS_u-boot = --gc-sections --relax + +# Move to unified board system later +CONFIG_SYS_LEGACY_BOARD := y
arch/nios2/config.mk +3 -0
@@ -31,3 +31,6 @@ PLATFORM_CPPFLAGS += -G0 LDFLAGS_FINAL += --gc-sections PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections + +# Move to unified board system later +CONFIG_SYS_LEGACY_BOARD := y
arch/powerpc/config.mk +3 -0
@@ -29,6 +29,9 @@ PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__ PLATFORM_LDFLAGS += -n +# Move to unified board system later +CONFIG_SYS_LEGACY_BOARD := y + # # When cross-compiling on NetBSD, we have to define __PPC__ or else we # will pick up a va_list declaration that is incompatible with the
arch/sandbox/config.mk +3 -0
@@ -19,3 +19,6 @@ PLATFORM_CPPFLAGS += -DCONFIG_SANDBOX -D__SANDBOX__ -U_FORTIFY_SOURCE PLATFORM_LIBS += -lrt + +# Move to unified board system later +CONFIG_SYS_LEGACY_BOARD := y
arch/sh/config.mk +3 -0
@@ -31,3 +31,6 @@ endif PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__ PLATFORM_LDFLAGS += -e $(CONFIG_SYS_TEXT_BASE) --defsym reloc_dst=$(CONFIG_SYS_TEXT_BASE) LDFLAGS_FINAL = --gc-sections + +# Move to unified board system later +CONFIG_SYS_LEGACY_BOARD := y
arch/sparc/config.mk +3 -0
@@ -26,3 +26,6 @@ CROSS_COMPILE ?= sparc-elf- CONFIG_STANDALONE_LOAD_ADDR ?= 0x00000000 -L $(gcclibdir) -T sparc.lds PLATFORM_CPPFLAGS += -DCONFIG_SPARC -D__sparc__ + +# Move to unified board system later +CONFIG_SYS_LEGACY_BOARD := y
arch/x86/config.mk +3 -0
@@ -48,3 +48,6 @@ NORMAL_LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) PREFIXED_LIBGCC = $(OBJTREE)/arch/$(ARCH)/lib/$(shell basename $(NORMAL_LIBGCC)) export USE_PRIVATE_LIBGCC=$(shell dirname $(PREFIXED_LIBGCC)) + +# Move to unified board system later +CONFIG_SYS_LEGACY_BOARD := y
config.mk +8 -0
@@ -221,6 +221,14 @@ ifeq ($(CONFIG_SPL_BUILD),y) CPPFLAGS += -DCONFIG_SPL_BUILD endif +# Does this architecture support generic board init? +ifneq ($(CONFIG_SYS_LEGACY_BOARD),) +ifneq ($(CONFIG_SYS_GENERIC_BOARD),) +$(error Your architecture does not support generic board. Please undefined \ +CONFIG_SYS_GENERIC_BOARD in your board config file) +endif +endif + ifneq ($(RESET_VECTOR_ADDRESS),) CPPFLAGS += -DRESET_VECTOR_ADDRESS=$(RESET_VECTOR_ADDRESS) endif
Signature · 1 line
1.8.1
PATCH v5 9/23 Declare watchdog functions in watchdog.h
In reply to Simon GlassThese functions are only available for powerpc and are not declared in a header file. We want to use the rest function in two places (board_f and board_r), so declare the functions in watchdog.h.
---
Changes in v5:
- Avoid using static declaration for init_func_watchdog_reset()
Changes in v4: None
Changes in v3: None
Changes in v2: None
arch/powerpc/lib/board.c | 11 ++--------- include/watchdog.h | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 9 deletions(-)
arch/powerpc/lib/board.c +2 -9
@@ -237,25 +237,18 @@ static int init_func_spi(void)/***********************************************************************/ #if defined(CONFIG_WATCHDOG ) -static int init_func_watchdog_init (void ) +int init_func_watchdog_init (void ) {puts (" Watchdog enabled\n" );WATCHDOG_RESET ();return 0 ; } -#define INIT_FUNC_WATCHDOG_INIT init_func_watchdog_init, - -static int init_func_watchdog_reset (void ) +int init_func_watchdog_reset (void ) {WATCHDOG_RESET ();return 0 ; } - -#define INIT_FUNC_WATCHDOG_RESET init_func_watchdog_reset, -#else -#define INIT_FUNC_WATCHDOG_INIT /* undef */ -#define INIT_FUNC_WATCHDOG_RESET /* undef */ #endif /* CONFIG_WATCHDOG */ /*
include/watchdog.h +18 -0
@@ -27,6 +27,24 @@#ifndef _WATCHDOG_H_#define _WATCHDOG_H_ +#if !defined(__ASSEMBLY__) +/* +* Reset the watchdog timer, always returns 0 +* +* This function is here since it is shared between board_f() and board_r(), +* and the legacy arch/<arch>/board.c code. +*/ +int init_func_watchdog_reset (void ); +#endif + +#ifdef CONFIG_WATCHDOG +#define INIT_FUNC_WATCHDOG_INIT init_func_watchdog_init, +#define INIT_FUNC_WATCHDOG_RESET init_func_watchdog_reset, +#else +#define INIT_FUNC_WATCHDOG_INIT +#define INIT_FUNC_WATCHDOG_RESET +#endif +#if defined(CONFIG_HW_WATCHDOG ) && defined(CONFIG_WATCHDOG )# error "Configuration error: CONFIG_HW_WATCHDOG and CONFIG_WATCHDOG can't be used together."#endif
Signature · 1 line
1.8.1
PATCH v5 10/23 Introduce generic pre-relocation board_f.c
In reply to Simon GlassThis file handles common pre-relocation init for boards which use the generic framework.
It starts up the console, DRAM, performs relocation and then jumps to post-relocation init.
---
Changes in v5:
- Add fdtdec header file to board_f.c
- Remove setup_global_data_ptr()
- Tidy up stack init
- Put global data on stack in board_init_f()
- Add fdt relocation
- Remove fdt relocation field from x86 arch_global_data
- Deal with change of board_init_f() semantics on ARM
- Save boot_flags in global_data in board_init_f()
- Add print_cpuinfo() prototype to include/common.h
Changes in v4:
- Use asm/sections.h instead of asm-generic/sections.h
Changes in v3:
- Cast away the volatile on gd for memcpy()
Changes in v2: None
arch/x86/include/asm/global_data.h | 1 - arch/x86/lib/board.c | 2 +- arch/x86/lib/init_helpers.c | 2 +- arch/x86/lib/relocate.c | 8 +- common/Makefile | 3 + common/board_f.c | 564 +++++++++++++++++++++++++++++++++++++ include/asm-generic/global_data.h | 2 + include/common.h | 1 + 8 files changed, 576 insertions(+), 7 deletions(-) create mode 100644 common/board_f.c
arch/x86/include/asm/global_data.h +0 -1
@@ -29,7 +29,6 @@/* Architecture-specific global data */ struct arch_global_data {struct global_data *gd_addr;/* Location of Global Data */ -void *new_fdt;/* Relocated FDT */ };#endif
arch/x86/lib/board.c +1 -1
@@ -219,7 +219,7 @@ static void do_init_loop(init_fnc_t **init_fnc_ptr)void board_init_f (ulong boot_flags) { - gd->fdt_blob = gd->arch.new_fdt =NULL ; + gd->fdt_blob = gd->new_fdt =NULL ; gd->flags = boot_flags;do_init_loop (init_sequence_f);
arch/x86/lib/init_helpers.c +1 -1
@@ -111,7 +111,7 @@ int calculate_relocation_address(void)*/ if (gd->fdt_blob) { dest_addr -= fdt_size; - gd->arch.new_fdt = (void *)dest_addr; + gd->new_fdt = (void *)dest_addr; dest_addr &= ~15 ; }#endif
arch/x86/lib/relocate.c +4 -4
@@ -49,15 +49,15 @@ int copy_uboot_to_ram(void)int copy_fdt_to_ram (void ) { -if (gd->arch.new_fdt) { +if (gd->new_fdt) {ulong fdt_size; fdt_size =ALIGN (fdt_totalsize (gd->fdt_blob) +0x1000 ,32 ); -memcpy (gd->arch.new_fdt, gd->fdt_blob, fdt_size); +memcpy (gd->new_fdt, gd->fdt_blob, fdt_size);debug ("Relocated fdt from %p to %p, size %lx\n" , - gd->fdt_blob, gd->arch.new_fdt, fdt_size); - gd->fdt_blob = gd->arch.new_fdt; + gd->fdt_blob, gd->new_fdt, fdt_size); + gd->fdt_blob = gd->new_fdt; }return 0 ;
common/Makefile +3 -0
@@ -36,6 +36,9 @@ COBJS-y += s_record.o COBJS-y += xyzModem.o COBJS-y += cmd_disk.o +# boards +COBJS-$(CONFIG_SYS_GENERIC_BOARD) += board_f.o + # core command COBJS-y += cmd_boot.o COBJS-$(CONFIG_CMD_BOOTM) += cmd_bootm.o
common/board_f.c new file +564 -0
564 lines not on this page · raw message
include/asm-generic/global_data.h +2 -0
@@ -81,6 +81,8 @@ typedef struct global_data {unsigned long reloc_off;struct global_data *new_gd;/* relocated global data */ const void *fdt_blob;/* Our device tree, NULL if none */ +void *new_fdt;/* Relocated FDT */ +unsigned long fdt_size;/* Space reserved for relocated FDT */ void **jt;/* jump table */ char env_buf[32 ];/* buffer for getenv() before reloc. */ struct arch_global_data arch;/* architecture-specific data */
include/common.h +1 -0
@@ -310,6 +310,7 @@ extern ulong monitor_flash_len;int mac_read_from_eeprom (void );extern u8 _binary_dt_dtb_start[];/* embedded device tree blob */ int set_cpu_clk_info (void ); +int print_cpuinfo (void );/** * Show the DRAM size in a board-specific way
Signature · 1 line
1.8.1
PATCH v5 11/23 Introduce generic post-relocation board_r.c
In reply to Simon GlassThis file handles common post-relocation init for boards which use the generic framework.
---
Changes in v5:
- Add code from arch/arm/lib/board.c to control loading of environment
- Put watchdog init function definitions in watchdog.h
- Adjust ppc to work with watchdog.h additions
Changes in v4:
- Use asm/sections.h instead of asm-generic/sections.h
Changes in v3: None
Changes in v2: None
arch/powerpc/lib/board.c | 3 +- common/Makefile | 1 + common/board_r.c | 424 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 427 insertions(+), 1 deletion(-) create mode 100644 common/board_r.c
arch/powerpc/lib/board.c +2 -1
@@ -319,7 +319,8 @@ static init_fnc_t *init_sequence[] = {#ifdef CONFIG_POST post_init_f,#endif - INIT_FUNC_WATCHDOG_RESET init_func_ram, + INIT_FUNC_WATCHDOG_RESET + init_func_ram,#if defined(CONFIG_SYS_DRAM_TEST ) testdram,#endif /* CONFIG_SYS_DRAM_TEST */
common/Makefile +1 -0
@@ -38,6 +38,7 @@ COBJS-y += cmd_disk.o # boards COBJS-$(CONFIG_SYS_GENERIC_BOARD) += board_f.o +COBJS-$(CONFIG_SYS_GENERIC_BOARD) += board_r.o # core command COBJS-y += cmd_boot.o
common/board_r.c new file +424 -0
424 lines not on this page · raw message
Signature · 1 line
1.8.1
PATCH v5 12/23 Add spl load feature
In reply to Simon GlassThis adds secondary program loader support to the generic board.
---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None
common/board_f.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
common/board_f.c +20 -0
@@ -309,6 +309,7 @@ static int reserve_uboot(void)return 0 ; } +#ifndef CONFIG_SPL_BUILD /* reserve memory for malloc() area */ static int reserve_malloc (void ) {
@@ -328,6 +329,7 @@ static int reserve_board(void) sizeof(bd_t), gd->dest_addr_sp); return 0; } +#endif static int setup_machine (void ) {
@@ -365,6 +367,7 @@ static int reserve_fdt(void)return 0 ; } +#ifndef CONFIG_SPL_BUILD static int reserve_stacks (void ) {/* setup stack pointer for exceptions */
@@ -384,6 +387,17 @@ static int reserve_stacks(void) return 0; } +#endif + +#ifdef CONFIG_SPL_BUILD +static int reserve_stacks_spl (void ) +{ +/* Why not -= ? */ + gd->dest_addr_sp +=128 ;/* leave 32 words for abort-stack */ + gd->irq_sp = gd->dest_addr_sp; +return 0 ; +} +#endif static int display_new_sp (void ) {
@@ -524,12 +538,18 @@ static init_fnc_t init_sequence_f[] = { reserve_lcd, #endif reserve_uboot, +#ifndef CONFIG_SPL_BUILD reserve_malloc, reserve_board, +#endif setup_machine, reserve_global_data, reserve_fdt, +#ifdef CONFIG_SPL_BUILD + reserve_stacks_spl, +#else reserve_stacks, +#endif setup_baud_rate, display_new_sp, reloc_fdt,
Signature · 1 line
1.8.1
PATCH v5 12/23 Add spl load feature
Quoted 52 lines · Simon Glass
This adds secondary program loader support to the generic board.
Signed-off-by Simon Glass <[email protected]>---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: Nonecommon/board_f.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)common/board_f.c +10
-0@@ -309,6 +309,7 @@ static int reserve_uboot(void)return 0 ; } +#ifndef CONFIG_SPL_BUILD /* reserve memory for malloc() area */ static int reserve_malloc (void ) {@@ -328,6 +329,7 @@ static int reserve_board(void) sizeof(bd_t), gd->dest_addr_sp); return 0; } +#endif static int setup_machine (void ) {@@ -365,6 +367,7 @@ static int reserve_fdt(void)return 0 ; } +#ifndef CONFIG_SPL_BUILD static int reserve_stacks (void ) {/* setup stack pointer for exceptions */ @@ -384,6 +387,17 @@ static int reserve_stacks(void)return 0 ; } +#endif + +#ifdef CONFIG_SPL_BUILD +static int reserve_stacks_spl (void ) +{ +/* Why not -= ? */ + gd->dest_addr_sp +=128 ;/* leave 32 words for abort-stack */
common/board_f.c static int reserve_stacks(void) · line 400
Quoted 4 lines
common/board_f.c +4
-0+ gd->irq_sp = gd->dest_addr_sp; + return 0; +} +#endif
"abort-stack" doesn't sound very generic, and that "why not" question should probably be answered.
Quoted 8 lines
static int
display_new_sp(void)
{common/board_f.c +1
-0@@ -524,12 +538,18 @@ static init_fnc_t init_sequence_f[] = { reserve_lcd, #endif reserve_uboot, +#ifndef CONFIG_SPL_BUILD reserve_malloc,
common/board_f.c static init_fnc_t init_sequence_f[] = { · line 552
Quoted 10 lines
common/board_f.c +5
-0reserve_board, +#endif setup_machine, reserve_global_data, reserve_fdt, +#ifdef CONFIG_SPL_BUILD + reserve_stacks_spl, +#else reserve_stacks, +#endif
Why not just put the ifdef inside reserve_stacks()? Or at least give them the same name?
-Scott
PATCH v5 12/23 Add spl load feature
+Albert
Hi Scott,
Quoted 54 lines · Scott Wood
Quoted 53 lines · Simon Glass
This adds secondary program loader support to the generic board.
Signed-off-by Simon Glass <[email protected]>---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: Nonecommon/board_f.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)common/board_f.c +10
-0@@ -309,6 +309,7 @@ static int reserve_uboot(void)return 0 ; } +#ifndef CONFIG_SPL_BUILD /* reserve memory for malloc() area */ static int reserve_malloc (void ) {@@ -328,6 +329,7 @@ static int reserve_board(void) sizeof(bd_t), gd->dest_addr_sp); return 0; } +#endif static int setup_machine (void ) {@@ -365,6 +367,7 @@ static int reserve_fdt(void)return 0 ; } +#ifndef CONFIG_SPL_BUILD static int reserve_stacks (void ) {/* setup stack pointer for exceptions */ @@ -384,6 +387,17 @@ static int reserve_stacks(void)return 0 ; } +#endif + +#ifdef CONFIG_SPL_BUILD +static int reserve_stacks_spl (void ) +{ +/* Why not -= ? */ + gd->dest_addr_sp +=128 ;/* leave 32 words for abort-stack */
Quoted 8 lines
common/board_f.c static int reserve_stacks(void) · line 400
Quoted 4 lines
common/board_f.c +4
-0+ gd->irq_sp = gd->dest_addr_sp; + return 0; +} +#endif "abort-stack" doesn't sound very generic, and that "why not" question should probably be answered.
I'm not sure what you mean by the first comment. For the second, I agree. It looks wrong to me. I copied Albert who might know.
Quoted 16 lines
Quoted 16 lines
common/board_f.c +3
-0static int display_new_sp (void ) {@@ -524,12 +538,18 @@ static init_fnc_t init_sequence_f[] = { reserve_lcd, #endif reserve_uboot, +#ifndef CONFIG_SPL_BUILD reserve_malloc, reserve_board, +#endif setup_machine, reserve_global_data, reserve_fdt, +#ifdef CONFIG_SPL_BUILD
Quoted 8 lines
common/board_f.c static init_fnc_t init_sequence_f[] = { · line 552
Quoted 4 lines
common/board_f.c +3
-0+ reserve_stacks_spl, +#else reserve_stacks, +#endif Why not just put the ifdef inside
reserve_stacks()? Or at least give them the same name?
OK I will do that.
Quoted 2 lines
-Scott
Regards,
Simon
PATCH v5 12/23 Add spl load feature
Quoted 68 lines · Simon Glass
+Albert
Hi Scott,
Quoted 44 lines · Scott Wood
Quoted 43 lines · Simon Glass
This adds secondary program loader support to the generic board.
Signed-off-by Simon Glass <[email protected]>---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: Nonecommon/board_f.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)common/board_f.c +3
-0@@ -309,6 +309,7 @@ static int reserve_uboot(void)return 0 ; } +#ifndef CONFIG_SPL_BUILD /* reserve memory for malloc() area */ static int reserve_malloc (void ) {@@ -328,6 +329,7 @@ static int reserve_board(void) sizeof(bd_t), gd->dest_addr_sp); return 0; } +#endif static int setup_machine (void ) {@@ -365,6 +367,7 @@ static int reserve_fdt(void)return 0 ; } +#ifndef CONFIG_SPL_BUILD static int reserve_stacks (void ) {/* setup stack pointer for exceptions */ @@ -384,6 +387,17 @@ static int reserve_stacks(void)Quoted 9 lines
common/board_f.c static int reserve_stacks(void)
Quoted 9 lines
common/board_f.c +7
-0return 0 ; } +#endif + +#ifdef CONFIG_SPL_BUILD +static int reserve_stacks_spl (void ) +{ +/* Why not -= ? */ + gd->dest_addr_sp +=128 ;/* leave 32 words for abort-stack
Quoted 8 lines
common/board_f.c static int reserve_stacks(void) · line 400
Quoted 5 lines
common/board_f.c +4
-0*/ + gd->irq_sp = gd->dest_addr_sp; + return 0; +} +#endif "abort-stack" doesn't sound very generic, and that "why not"
Quoted 4 lines
question should
Quoted 1 line
probably be answered.
I'm not sure what you mean by the first comment.
It's ARM-specific terminology ("exception" is more typical than "abort" elsewhere). Why 32 words, BTW? Why is it larger in SPL versus non-SPL?
-Scott
PATCH v5 12/23 Add spl load feature
Hi Scott,
Quoted 73 lines · Scott Wood
Quoted 72 lines · Simon Glass
+Albert
Hi Scott,
Quoted 64 lines · Scott Wood
Quoted 54 lines · Simon Glass
This adds secondary program loader support to the generic board.
Signed-off-by Simon Glass <[email protected]>---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: Nonecommon/board_f.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)common/board_f.c +10
-0@@ -309,6 +309,7 @@ static int reserve_uboot(void)return 0 ; } +#ifndef CONFIG_SPL_BUILD /* reserve memory for malloc() area */ static int reserve_malloc (void ) {@@ -328,6 +329,7 @@ static int reserve_board(void) sizeof(bd_t), gd->dest_addr_sp); return 0; } +#endif static int setup_machine (void ) {@@ -365,6 +367,7 @@ static int reserve_fdt(void)return 0 ; } +#ifndef CONFIG_SPL_BUILD static int reserve_stacks (void ) {/* setup stack pointer for exceptions */ @@ -384,6 +387,17 @@ static int reserve_stacks(void)return 0 ; } +#endif + +#ifdef CONFIG_SPL_BUILD +static int reserve_stacks_spl (void ) +{ +/* Why not -= ? */ + gd->dest_addr_sp +=128 ;/* leave 32 words for abort-stack
*/common/board_f.c static int reserve_stacks(void) · line 400
Quoted 4 lines
common/board_f.c +4
-0+ gd->irq_sp = gd->dest_addr_sp; + return 0; +} +#endif "abort-stack" doesn't sound very generic, and that "why not" question should
probably be answered.
Quoted 5 lines
Quoted 1 line
I'm not sure what you mean by the first comment.
It's ARM-specific terminology ("exception" is more typical than "abort" elsewhere). Why 32 words, BTW? Why is it larger in SPL versus non-SPL?
These are good questions but I don't know the answers. I guess the abort stack may need enough space to panic()?
I am copying code from the various arch/xxx/board.c files in order to merge them.
Regards,
Simon
Quoted 2 lines
-Scott
PATCH v5 13/23 arm: Remove use of board_early_init_r/last_stage_init()
In reply to Simon GlassThese boards define CONFIG_LAST_STAGE_INIT and CONFIG_BOARD_EARLY_INIT_R but these options are not available on ARM. Move them into the powerpc common file instead.
This change affects: km_kirkwood_pci, mgcoge3un, kmnusa, kmcoge5un, km_kirkwood and portl2.
---
Changes in v5:
- Add new patch to fix config in keymile boards
Changes in v4: None
Changes in v3: None
Changes in v2: None
include/configs/km/keymile-common.h | 4 ---- include/configs/km/km-powerpc.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-)
include/configs/km/keymile-common.h +0 -4
@@ -24,10 +24,6 @@#ifndef __CONFIG_KEYMILE_H#define __CONFIG_KEYMILE_H -/* Do boardspecific init for all boards */ -#define CONFIG_BOARD_EARLY_INIT_R -#define CONFIG_LAST_STAGE_INIT -#define CONFIG_BOOTCOUNT_LIMIT /*
include/configs/km/km-powerpc.h +4 -0
@@ -24,6 +24,10 @@#ifndef __CONFIG_KEYMILE_POWERPC_H#define __CONFIG_KEYMILE_POWERPC_H +/* Do boardspecific init for all boards */ +#define CONFIG_BOARD_EARLY_INIT_R +#define CONFIG_LAST_STAGE_INIT +#define CONFIG_BOOTCOUNT_LIMIT #define CONFIG_CMD_DTT
Signature · 1 line
1.8.1
PATCH v5 14/23 arm: Enable generic board support
In reply to Simon GlassThis enables generic board support so that ARM boards can define CONFIG_SYS_GENERIC_BOARD.
---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None
arch/arm/config.mk | 3 --- arch/arm/include/asm/u-boot.h | 9 +++++++++ arch/arm/lib/Makefile | 3 +++ 3 files changed, 12 insertions(+), 3 deletions(-)
arch/arm/config.mk +0 -3
@@ -49,9 +49,6 @@ ifneq ($(CONFIG_SPL_BUILD),y) ALL-$(CONFIG_SYS_THUMB_BUILD) += checkthumb endif -# Move to unified board system later -CONFIG_SYS_LEGACY_BOARD := y - # Try if EABI is supported, else fall back to old API, # i. e. for example: # - with ELDK 4.2 (EABI supported), use:
arch/arm/include/asm/u-boot.h +9 -0
@@ -36,6 +36,12 @@ #ifndef _U_BOOT_H_ #define _U_BOOT_H_ 1 +#ifdef CONFIG_SYS_GENERIC_BOARD +/* Use the generic board which requires a unified bd_info */ +#include <asm-generic/u-boot.h> +#else + +#ifndef __ASSEMBLY__ typedef struct bd_info { unsigned int bi_baudrate; /* serial console baudrate */ ulong bi_arch_number; /* unique id for this board */
@@ -49,6 +55,9 @@ typedef struct bd_info {ulong size; } bi_dram[CONFIG_NR_DRAM_BANKS]; } bd_t; +#endif + +#endif /* nCONFIG_SYS_GENERIC_BOARD */ /* For image.h:image_check_target_arch() */ #define IH_ARCH_DEFAULT IH_ARCH_ARM
arch/arm/lib/Makefile +3 -0
@@ -39,7 +39,10 @@ GLCOBJS += div0.o SOBJS-y += crt0.o ifndef CONFIG_SPL_BUILD +ifndef CONFIG_SYS_GENERIC_BOARD COBJS-y += board.o +endif + COBJS-y += bootm.o COBJS-$(CONFIG_SYS_L2_PL310) += cache-pl310.o SOBJS-$(CONFIG_USE_ARCH_MEMSET) += memset.o
Signature · 1 line
1.8.1
PATCH v5 15/23 Add CONFIG_SYS_SYM_OFFSETS to support offset symbols
In reply to Simon GlassLink symbols as created by the link script can either be absolute or relative to the text start. This option switches between the two options so that we can support both.
As we convert architectures over to generic board, we can see if this option is actually needed, or whether it is possible to unify this feature also.
---
Changes in v5:
- Add offsets support for access to fdt that uses CONFIG_OF_SEPARATE
Changes in v4: None
Changes in v3: None
Changes in v2: None
README | 6 ++++++ common/board_f.c | 15 +++++++++++++++ 2 files changed, 21 insertions(+)
README +6 -0
@@ -3219,6 +3219,12 @@ Configuration Settings: its config.mk file). If you find problems enabling this option on your board please report the problem and send patches! +- CONFIG_SYS_SYM_OFFSETS + This is set by architectures that use offsets for link symbols + instead of absolute values. So bss_start is obtained using an + offset _bss_start_ofs from CONFIG_SYS_TEXT_BASE, rather than + directly. You should not need to touch this setting. + The following definitions that deal with the placement and management of environment data (variable area); in general, we support the
common/board_f.c +15 -0
@@ -107,8 +107,13 @@ static int display_text_info(void) {ulong bss_start, bss_end; +#ifdef CONFIG_SYS_SYM_OFFSETS bss_start = _bss_start_ofs + _TEXT_BASE; bss_end = _bss_end_ofs + _TEXT_BASE; +#else + bss_start = (ulong)&__bss_start; + bss_end = (ulong)&__bss_end; +#endif debug ("U-Boot code: %08X -> %08lX BSS: -> %08lX\n" ,CONFIG_SYS_TEXT_BASE , bss_start, bss_end);
@@ -174,7 +179,11 @@ static int zero_global_data(void)static int setup_mon_len (void ) { +#ifdef CONFIG_SYS_SYM_OFFSETS gd->mon_len = _bss_end_ofs; +#else + gd->mon_len = (ulong )&__bss_end - (ulong )&__text_start; +#endif return 0 ; }
@@ -190,7 +199,11 @@ static int setup_fdt(void) gd->fdt_blob = _binary_dt_dtb_start;#elif definedCONFIG_OF_SEPARATE /* FDT is at end of image */ +# ifdef CONFIG_SYS_SYM_OFFSETS gd->fdt_blob = (void *)(_end_ofs +CONFIG_SYS_TEXT_BASE ); +# else + gd->fdt_blob = (ulong *)&_end; +# endif #endif /* Allow the early environment to override the fdt address */ gd->fdt_blob = (void *)getenv_ulong("fdtcontroladdr", 16,
@@ -476,6 +489,7 @@ static int mark_bootstage(void) }static init_fnc_t init_sequence_f[] = { + zero_global_data, setup_fdt, setup_mon_len, arch_cpu_init,/* basic arch cpu dependent setup */
@@ -510,6 +524,7 @@ static init_fnc_t init_sequence_f[] = {#ifdef CONFIG_POST init_post, #endif + setup_dram_config,/* * Now that we have DRAM mapped and working, we can * relocate the code and continue running from DRAM.
Signature · 1 line
1.8.1
PATCH v5 16/23 Adjust board_f.c for ppc
In reply to Simon GlassThis adds ppc features to the generic pre-relocation board init.
This is a separate commit so that these features are clearly shown.
---
Changes in v5:
- Use watchdog.h for watchdog functions
- Add define to work around __bss_end / __bss_end__ confusion
Changes in v4:
- Updates to sit on top of earlier patches
Changes in v3: None
Changes in v2: None
common/board_f.c | 347 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 345 insertions(+), 2 deletions(-)
common/board_f.c +345 -2
@@ -31,10 +31,31 @@#include <version.h> #include <environment.h> #include <fdtdec.h> +#if defined(CONFIG_CMD_IDE ) +#include <ide.h> +#endif +#include <i2c.h> #include <initcall.h> #include <logbuff.h> + +/* TODO: Can we move these into arch/ headers? */ +#ifdef CONFIG_8xx +#include <mpc8xx.h> +#endif +#ifdef CONFIG_5xx +#include <mpc5xx.h> +#endif +#ifdef CONFIG_MPC5xxx +#include <mpc5xxx.h> +#endif +#include <post.h> +#include <spi.h> +#include <watchdog.h> #include <asm/io.h> +#ifdef CONFIG_MP +#include <asm/mp.h> +#endif #include <asm/sections.h> #include <linux/compiler.h>
@@ -97,6 +118,31 @@ void blue_led_off(void) __attribute__((weak, alias("__blue_led_off")));* Could the CONFIG_SPL_BUILD infection become a flag in gd? */ +#if defined(CONFIG_WATCHDOG ) +static int init_func_watchdog_init (void ) +{ +puts (" Watchdog enabled\n" ); +WATCHDOG_RESET (); + +return 0 ; +} + +int init_func_watchdog_reset (void ) +{ +WATCHDOG_RESET (); + +return 0 ; +} +#endif /* CONFIG_WATCHDOG */ + +void __board_add_ram_info (int use_default) +{ +/* please define platform specific board_add_ram_info() */ +} + +void board_add_ram_info (int ) + __attribute__ ((weak,alias ("__board_add_ram_info" ))); +static int init_baud_rate (void ) { gd->baudrate =getenv_ulong ("baudrate" ,10 ,CONFIG_BAUDRATE );
@@ -134,6 +180,25 @@ static int announce_dram_init(void)return 0 ; } +#ifdef CONFIG_PPC +static int init_func_ram (void ) +{ +#ifdef CONFIG_BOARD_TYPES +int board_type = gd->board_type; +#else +int board_type =0 ;/* use dummy arg */ +#endif + + gd->ram_size =initdram (board_type); + +if (gd->ram_size >0 ) +return 0 ; + +puts ("*** failed ***\n" ); +return 1 ; +} +#endif +static int show_dram_config (void ) {ulong size;
@@ -154,11 +219,24 @@ static int show_dram_config(void) size = gd->ram_size;#endif -print_size (size,"\n" ); +print_size (size,"" ); +board_add_ram_info (0 ); +putc ('\n' );return 0 ; } +ulong get_effective_memsize (void ) +{ +#ifndef CONFIG_VERY_BIG_RAM +return gd->ram_size; +#else +/* limit stack to what we can reasonable map */ +return ((gd->ram_size >CONFIG_MAX_MEM_MAPPED ) ? +CONFIG_MAX_MEM_MAPPED : gd->ram_size); +#endif +} +void __dram_init_banksize (void ) {#if defined(CONFIG_NR_DRAM_BANKS ) && defined(CONFIG_SYS_SDRAM_BASE )
@@ -170,6 +248,27 @@ void __dram_init_banksize(void)void dram_init_banksize (void ) __attribute__((weak,alias ("__dram_init_banksize" ))); +#if defined(CONFIG_HARD_I2C ) || defined(CONFIG_SOFT_I2C ) +static int init_func_i2c (void ) +{ +puts ("I2C: " ); +i2c_init (CONFIG_SYS_I2C_SPEED ,CONFIG_SYS_I2C_SLAVE ); +puts ("ready\n" ); +return 0 ; +} +#endif + +#if defined(CONFIG_HARD_SPI ) +static int init_func_spi (void ) +{ +puts ("SPI: " ); +spi_init (); +puts ("ready\n" ); +return 0 ; +} +#endif + +__maybe_unused static int zero_global_data (void ) {memset ((void *)gd,'\0' ,sizeof (gd_t));
@@ -182,7 +281,8 @@ static int setup_mon_len(void)#ifdef CONFIG_SYS_SYM_OFFSETS gd->mon_len = _bss_end_ofs;#else - gd->mon_len = (ulong )&__bss_end - (ulong )&__text_start; +/* TODO: use (ulong)&__bss_end - (ulong)&__text_start; ? */ + gd->mon_len = (ulong )&__bss_end -CONFIG_SYS_MONITOR_BASE ;#endif return 0 ; }
@@ -237,9 +337,23 @@ static int setup_dest_addr(void)*/ gd->ram_size -=CONFIG_SYS_MEM_TOP_HIDE ;#endif +#ifdef CONFIG_NR_DRAM_BANKS gd->ram_top = gd->bd->bi_dram[0 ].start + gd->bd->bi_dram[0 ].size; +#else + gd->ram_top =CONFIG_SYS_SDRAM_BASE +get_effective_memsize (); +#endif gd->ram_top =board_get_usable_ram_top (gd->mon_len); gd->dest_addr = gd->ram_top; +#if defined(CONFIG_MP ) && (defined(CONFIG_MPC86xx) || defined(CONFIG_E500 )) +/* +* We need to make sure the location we intend to put secondary core +* boot code is reserved and not used by any part of u-boot +*/ +if (gd->dest_addr >determine_mp_bootpg (NULL )) { + gd->dest_addr =determine_mp_bootpg (NULL ); +debug ("Reserving MP boot page to %08lx\n" , gd->dest_addr); + } +#endif gd->dest_addr_sp = gd->dest_addr;return 0 ; }
@@ -308,6 +422,18 @@ static int reserve_lcd(void) }#endif /* CONFIG_LCD */ +#if defined(CONFIG_VIDEO ) && (!defined(CONFIG_PPC ) || defined(CONFIG_8xx)) \ + && !defined(CONFIG_ARM ) +static int reserve_video (void ) +{ +/* reserve memory for video display (always full pages) */ + gd->dest_addr =video_setmem (gd->dest_addr); + gd->fb_base = gd->dest_addr; + +return 0 ; +} +#endif +static int reserve_uboot (void ) {/*
@@ -316,6 +442,10 @@ static int reserve_uboot(void)*/ gd->dest_addr -= gd->mon_len; gd->dest_addr &= ~(4096 -1 ); +#ifdef CONFIG_E500 +/* round down to next 64 kB limit so that IVPR stays aligned */ + gd->dest_addr &= ~(65536 -1 ); +#endif debug ("Reserving %ldk for U-Boot at: %08lx\n" , gd->mon_len >>10 , gd->dest_addr);
@@ -383,6 +513,10 @@ static int reserve_fdt(void)#ifndef CONFIG_SPL_BUILD static int reserve_stacks (void ) { +#ifdef CONFIG_PPC +ulong *s; +#endif +/* setup stack pointer for exceptions */ gd->dest_addr_sp -=16 ; gd->dest_addr_sp &= ~0xf ;
@@ -398,6 +532,14 @@ static int reserve_stacks(void)/* leave 3 words for abort-stack, plus 1 for alignment */ gd->dest_addr_sp -=16 ; +#ifdef CONFIG_PPC +/* Clear initial stack frame */ + s = (ulong *) gd->dest_addr_sp; + *s =0 ;/* Terminate back chain */ + *++s =0 ;/* NULL return address */ + gd->dest_addr_sp = (ulong ) s; +#endif + return 0; }#endif
@@ -419,6 +561,106 @@ static int display_new_sp(void)return 0 ; } +#ifdef CONFIG_PPC +static int setup_board_part1 (void ) +{ +bd_t *bd = gd->bd; + +/* +* Save local variables to board info struct +*/ + + bd->bi_memstart =CONFIG_SYS_SDRAM_BASE ;/* start of memory */ + bd->bi_memsize = gd->ram_size;/* size in bytes */ + +#ifdef CONFIG_SYS_SRAM_BASE + bd->bi_sramstart =CONFIG_SYS_SRAM_BASE ;/* start of SRAM */ + bd->bi_sramsize =CONFIG_SYS_SRAM_SIZE ;/* size of SRAM */ +#endif + +#if defined(CONFIG_8xx) || defined(CONFIG_8260 ) || defined(CONFIG_5xx) || \ + defined(CONFIG_E500 ) || defined(CONFIG_MPC86xx) + bd->bi_immr_base =CONFIG_SYS_IMMR ;/* base of IMMR register */ +#endif +#if defined(CONFIG_MPC5xxx) + bd->bi_mbar_base =CONFIG_SYS_MBAR ;/* base of internal registers */ +#endif +#if defined(CONFIG_MPC83xx) + bd->bi_immrbar =CONFIG_SYS_IMMR ; +#endif +#if defined(CONFIG_MPC8220 ) + bd->bi_mbar_base =CONFIG_SYS_MBAR ;/* base of internal registers */ + bd->bi_inpfreq = gd->arch.inp_clk; + bd->bi_pcifreq = gd->pci_clk; + bd->bi_vcofreq = gd->arch.vco_clk; + bd->bi_pevfreq = gd->arch.pev_clk; + bd->bi_flbfreq = gd->arch.flb_clk; + +/* store bootparam to sram (backward compatible), here? */ + { +u32 *sram = (u32 *)CONFIG_SYS_SRAM_BASE ; + + *sram++ = gd->ram_size; + *sram++ = gd->bus_clk; + *sram++ = gd->arch.inp_clk; + *sram++ = gd->cpu_clk; + *sram++ = gd->arch.vco_clk; + *sram++ = gd->arch.flb_clk; + *sram++ =0xb8c3ba11 ;/* boot signature */ + } +#endif + +return 0 ; +} + +static int setup_board_part2 (void ) +{ +bd_t *bd = gd->bd; + + bd->bi_intfreq = gd->cpu_clk;/* Internal Freq, in Hz */ + bd->bi_busfreq = gd->bus_clk;/* Bus Freq, in Hz */ +#if defined(CONFIG_CPM2 ) + bd->bi_cpmfreq = gd->arch.cpm_clk; + bd->bi_brgfreq = gd->arch.brg_clk; + bd->bi_sccfreq = gd->arch.scc_clk; + bd->bi_vco = gd->arch.vco_out; +#endif /* CONFIG_CPM2 */ +#if defined(CONFIG_MPC512X ) + bd->bi_ipsfreq = gd->arch.ips_clk; +#endif /* CONFIG_MPC512X */ +#if defined(CONFIG_MPC5xxx) + bd->bi_ipbfreq = gd->arch.ipb_clk; + bd->bi_pcifreq = gd->pci_clk; +#endif /* CONFIG_MPC5xxx */ + +return 0 ; +} +#endif + +#ifdef CONFIG_SYS_EXTBDINFO +static int setup_board_extra (void ) +{ +bd_t *bd = gd->bd; + +strncpy ((char *) bd->bi_s_version,"1.2" ,sizeof (bd->bi_s_version)); +strncpy ((char *) bd->bi_r_version,U_BOOT_VERSION , +sizeof (bd->bi_r_version)); + + bd->bi_procfreq = gd->cpu_clk;/* Processor Speed, In Hz */ + bd->bi_plb_busfreq = gd->bus_clk; +#if defined(CONFIG_405GP ) || defined(CONFIG_405EP ) || \ + defined(CONFIG_440EP ) || defined(CONFIG_440GR ) || \ + defined(CONFIG_440EPX ) || defined(CONFIG_440GRX ) + bd->bi_pci_busfreq =get_PCI_freq (); + bd->bi_opbfreq =get_OPB_freq (); +#elif defined(CONFIG_XILINX_405 ) + bd->bi_pci_busfreq =get_PCI_freq (); +#endif + +return 0 ; +} +#endif +#ifdef CONFIG_POST static int init_post (void ) {
@@ -489,9 +731,17 @@ static int mark_bootstage(void) }static init_fnc_t init_sequence_f[] = { +#if !defined(CONFIG_CPM2) && !defined(CONFIG_MPC512X) && \ + !defined (CONFIG_MPC83xx) && !defined (CONFIG_MPC85xx) && \ + !defined (CONFIG_MPC86xx) zero_global_data, +#endif setup_fdt, setup_mon_len, +#if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) +/* TODO: can this go into arch_cpu_init()? */ + probecpu, +#endif arch_cpu_init,/* basic arch cpu dependent setup */ mark_bootstage, #ifdef CONFIG_OF_CONTROL
@@ -500,31 +750,110 @@ static init_fnc_t init_sequence_f[] = { #if defined(CONFIG_BOARD_EARLY_INIT_F) board_early_init_f, #endif + /* TODO: can any of this go into arch_cpu_init()? */ +#if defined(CONFIG_PPC) && !defined(CONFIG_8xx_CPUCLK_DEFAULT) + get_clocks, /* get CPU and bus clocks (etc.) */ +#if defined(CONFIG_TQM8xxL) && !defined(CONFIG_TQM866M) \ + && !defined(CONFIG_TQM885D) + adjust_sdram_tbs_8xx, +#endif + /* TODO: can we rename this to timer_init()? */ + init_timebase, +#endif +#if defined(CONFIG_BOARD_EARLY_INIT_F) + board_early_init_f, +#endif +#ifdef CONFIG_ARM timer_init, /* initialize timer */ +#endif #ifdef CONFIG_BOARD_POSTCLK_INIT board_postclk_init, #endif #ifdef CONFIG_FSL_ESDHC get_clocks, #endif +#ifdef CONFIG_SYS_ALLOC_DPRAM +#if !defined(CONFIG_CPM2) + dpram_init, +#endif +#endif +#if defined(CONFIG_BOARD_POSTCLK_INIT) + board_postclk_init, +#endif env_init, /* initialize environment */ +#if defined(CONFIG_8xx_CPUCLK_DEFAULT) + /* get CPU and bus clocks according to the environment variable */ + get_clocks_866, + /* adjust sdram refresh rate according to the new clock */ + sdram_adjust_866, + init_timebase, +#endif init_baud_rate, /* initialze baudrate settings */ serial_init, /* serial communications setup */ console_init_f, /* stage 1 init of console */ display_options, /* say that we are here */ display_text_info, /* show debugging info if required */ +#if defined(CONFIG_8260) + prt_8260_rsr, + prt_8260_clks, +#endif /* CONFIG_8260 */ +#if defined(CONFIG_MPC83xx) + prt_83xx_rsr, +#endif +#ifdef CONFIG_PPC + checkcpu, +#endif #if defined(CONFIG_DISPLAY_CPUINFO) print_cpuinfo, /* display cpu info (and speed) */ #endif +#if defined(CONFIG_MPC5xxx) + prt_mpc5xxx_clks, +#endif /* CONFIG_MPC5xxx */ +#if defined(CONFIG_MPC8220) + prt_mpc8220_clks, +#endif #if defined(CONFIG_DISPLAY_BOARDINFO) checkboard, /* display board info */ #endif + INIT_FUNC_WATCHDOG_INIT +#if defined(CONFIG_MISC_INIT_F) + misc_init_f, +#endif + INIT_FUNC_WATCHDOG_RESET +#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C) + init_func_i2c, +#endif +#if defined(CONFIG_HARD_SPI) + init_func_spi, +#endif +#ifdef CONFIG_X86 + dram_init_f, /* configure available RAM banks */ +#endif announce_dram_init, + /* TODO: unify all these dram functions? */ +#ifdef CONFIG_ARM + dram_init, /* configure available RAM banks */ + setup_dram_config, +#endif +#ifdef CONFIG_PPC + init_func_ram, +#endif show_dram_config, #ifdef CONFIG_POST + post_init_f, +#endif + INIT_FUNC_WATCHDOG_RESET +#if defined(CONFIG_SYS_DRAM_TEST) + testdram, +#endif /* CONFIG_SYS_DRAM_TEST */ + INIT_FUNC_WATCHDOG_RESET + +#ifdef CONFIG_POST init_post, #endif + INIT_FUNC_WATCHDOG_RESET setup_dram_config, + /* * Now that we have DRAM mapped and working, we can * relocate the code and continue running from DRAM.
@@ -552,6 +881,11 @@ static init_fnc_t init_sequence_f[] = {#ifdef CONFIG_LCD reserve_lcd,#endif +/* TODO: Why the dependency on CONFIG_8xx? */ +#if defined(CONFIG_VIDEO ) && (!defined(CONFIG_PPC ) || defined(CONFIG_8xx)) \ + && !defined(CONFIG_ARM ) + reserve_video, +#endif reserve_uboot,#ifndef CONFIG_SPL_BUILD reserve_malloc,
@@ -565,8 +899,17 @@ static init_fnc_t init_sequence_f[] = {#else reserve_stacks,#endif +#ifdef CONFIG_PPC + setup_board_part1, + INIT_FUNC_WATCHDOG_RESET + setup_board_part2, +#endif setup_baud_rate, display_new_sp, +#ifdef CONFIG_SYS_EXTBDINFO + setup_board_extra, +#endif + INIT_FUNC_WATCHDOG_RESET reloc_fdt, setup_reloc, #ifndef CONFIG_ARM
Signature · 1 line
1.8.1
PATCH v5 16/23 Adjust board_f.c for ppc
Quoted 12 lines · Simon Glass
#ifndef
CONFIG_SPL_BUILD
static intreserve_stacks(void)
{common/board_f.c +4
-0+#ifdef CONFIG_PPC +ulong *s; +#endif +/* setup stack pointer for exceptions */ gd->dest_addr_sp -=16 ; gd->dest_addr_sp &= ~0xf ;@@ -398,6 +532,14 @@ static int reserve_stacks(void)/* leave 3 words for abort-stack, plus 1 for alignment */
common/board_f.c static int reserve_stacks(void) · line 542
Quoted 10 lines
common/board_f.c +8
-0gd->dest_addr_sp -=16 ; +#ifdef CONFIG_PPC +/* Clear initial stack frame */ + s = (ulong *) gd->dest_addr_sp; + *s =0 ;/* Terminate back chain */ + *++s =0 ;/* NULL return address */ + gd->dest_addr_sp = (ulong ) s; +#endif +
PPC ABI requires 16-byte stack alignment, which would be broken by the CONFIG_USE_IRQ section (which even still has an "ARM ABI" comment).
I think this entire function should be kept in arch code. Stack layout is inherently architecture/ABI specific. Some architectures even have a stack that grows upward (not sure if any such are supported by U-Boot).
-Scott
PATCH v5 16/23 Adjust board_f.c for ppc
Hi Scott,
Quoted 29 lines · Scott Wood
Quoted 13 lines · Simon Glass
#ifndef
CONFIG_SPL_BUILD
static intreserve_stacks(void)
{common/board_f.c +4
-0+#ifdef CONFIG_PPC +ulong *s; +#endif +/* setup stack pointer for exceptions */ gd->dest_addr_sp -=16 ; gd->dest_addr_sp &= ~0xf ;@@ -398,6 +532,14 @@ static int reserve_stacks(void)/* leave 3 words for abort-stack, plus 1 for alignment */ common/board_f.c static int reserve_stacks(void) · line 542
Quoted 10 lines
common/board_f.c +8
-0gd->dest_addr_sp -=16 ; +#ifdef CONFIG_PPC +/* Clear initial stack frame */ + s = (ulong *) gd->dest_addr_sp; + *s =0 ;/* Terminate back chain */ + *++s =0 ;/* NULL return address */ + gd->dest_addr_sp = (ulong ) s; +#endif +PPC ABI requires 16-byte stack alignment, which would be broken by the
CONFIG_USE_IRQsection (which even still has an "ARM ABI" comment).
Quoted 3 lines
I think this entire function should be kept in arch code. Stack layout is inherently architecture/ABI specific. Some architectures even have a stack that grows upward (not sure if any such are supported by U-Boot).
Thanks for reviewing all this.
While I am working to avoid it, one option is to create a weak function which archs can override. The reason I am keen to avoid it, at least for a first implementation, is that it obscures the similarities. In this case we could just just force 16-byte alignment, and make the PPC code unconditional. It shouldn't hurt anything.
Regards,
Simon
Quoted 2 lines
-Scott
PATCH v5 16/23 Adjust board_f.c for ppc
Quoted 38 lines · Simon Glass
Hi Scott,
Quoted 16 lines · Scott Wood
Quoted 15 lines · Simon Glass
#ifndef
CONFIG_SPL_BUILD
static intreserve_stacks(void)
{common/board_f.c +4
-0+#ifdef CONFIG_PPC +ulong *s; +#endif +/* setup stack pointer for exceptions */ gd->dest_addr_sp -=16 ; gd->dest_addr_sp &= ~0xf ;@@ -398,6 +532,14 @@ static int reserve_stacks(void)/* leave 3 words for abort-stack, plus 1 for alignment */ gd->dest_addr_sp -=16 ;Quoted 11 lines
common/board_f.c static int reserve_stacks(void) · line 542
Quoted 8 lines
common/board_f.c +8
-0+#ifdef CONFIG_PPC +/* Clear initial stack frame */ + s = (ulong *) gd->dest_addr_sp; + *s =0 ;/* Terminate back chain */ + *++s =0 ;/* NULL return address */ + gd->dest_addr_sp = (ulong ) s; +#endif +PPC ABI requires 16-byte stack alignment, which would be broken by
the
Quoted 3 lines
CONFIG_USE_IRQsection (which even still has an "ARM ABI" comment).I think this entire function should be kept in arch code. Stack
layout is
Quoted 1 line
inherently architecture/ABI specific. Some architectures even have
a stack
Quoted 8 lines
Quoted 1 line
that grows upward (not sure if any such are supported by U-Boot).
Thanks for reviewing all this.
While I am working to avoid it, one option is to create a weak function which archs can override. The reason I am keen to avoid it, at least for a first implementation, is that it obscures the similarities.
That's fine for most of the file, but I think there's not much that's truly generic when it comes to setting up the stack. It's not as if this is a huge function (at least before it grows a bunch of ifdefs).
Quoted 2 lines
In this case we could just just force 16-byte alignment, and make the PPC code unconditional. It shouldn't hurt anything.
The CONFIG_USE_IRQ section also has references to FIQs... if it's meant to be an ARM-specific CONFIG, perhaps it should be renamed (and definitely it should be documented).
-Scott
PATCH v5 17/23 Adjust board_r.c for ppc
In reply to Simon GlassThis adds ppc features to the generic post-relocation board init.
---
Changes in v5:
- Add prototype for update_flash_size() to include/common.h
- Updates in board_r.c to make ppc build correctly
- Add prototype for board_start_ide() to include/ide.h
- Bring in new ppc features since this patch was first created
Changes in v4:
- Updates to sit on top of earlier patches
Changes in v3: None
Changes in v2: None
common/board_r.c | 477 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- include/common.h | 1 + include/ide.h | 7 + 3 files changed, 482 insertions(+), 3 deletions(-)
common/board_r.c +474 -3
@@ -27,25 +27,81 @@*/ #include <common.h> +/* TODO: can we just include all these headers whether needed or not? */ +#if defined(CONFIG_CMD_BEDBUG ) +#include <bedbug/type.h> +#endif #ifdef CONFIG_HAS_DATAFLASH #include <dataflash.h> #endif #include <environment.h> #include <fdtdec.h> +#if defined(CONFIG_CMD_IDE ) +#include <ide.h> +#endif #include <initcall.h> +#ifdef CONFIG_PS2KBD +#include <keyboard.h> +#endif +#if defined(CONFIG_CMD_KGDB ) +#include <kgdb.h> +#endif #include <logbuff.h> #include <malloc.h> +#ifdef CONFIG_BITBANGMII +#include <miiphy.h> +#endif #include <mmc.h> #include <nand.h> #include <onenand_uboot.h> +#include <scsi.h> #include <serial.h> +#include <spi.h> #include <stdio_dev.h> +#include <watchdog.h> +#ifdef CONFIG_ADDR_MAP +#include <asm/mmu.h> +#endif #include <asm/sections.h> +#include <linux/compiler.h> DECLARE_GLOBAL_DATA_PTR ;ulong monitor_flash_len; +int __board_flash_wp_on (void ) +{ +/* +* Most flashes can't be detected when write protection is enabled, +* so provide a way to let U-Boot gracefully ignore write protected +* devices. +*/ +return 0 ; +} + +int board_flash_wp_on (void ) + __attribute__ ((weak,alias ("__board_flash_wp_on" ))); + +void __cpu_secondary_init_r (void ) +{ +} + +void cpu_secondary_init_r (void ) + __attribute__ ((weak,alias ("__cpu_secondary_init_r" ))); + +static int initr_secondary_cpu (void ) +{ +/* +* after non-volatile devices & environment is setup and cpu code have +* another round to deal with any initialization that might require +* full access to the environment or loading of some image (firmware) +* from a non-volatile device +*/ +/* TODO: maybe define this for all archs? */ +cpu_secondary_init_r (); + +return 0 ; +}static int initr_reloc (void ) {
@@ -68,6 +124,11 @@ static int initr_caches(void) }#endif +__weak int fixup_cpu (void ) +{ +return 0 ; +} +static int initr_reloc_global_data (void ) {#ifdef CONFIG_SYS_SYM_OFFSETS
@@ -75,6 +136,31 @@ static int initr_reloc_global_data(void)#else monitor_flash_len = (ulong )&__init_end - gd->dest_addr;#endif +#if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) +/* +* The gd->cpu pointer is set to an address in flash before relocation. +* We need to update it to point to the same CPU entry in RAM. +* TODO: why not just add gd->reloc_ofs? +*/ + gd->arch.cpu += gd->dest_addr -CONFIG_SYS_MONITOR_BASE ; + +/* +* If we didn't know the cpu mask & # cores, we can save them of +* now rather than 'computing' them constantly +*/ +fixup_cpu (); +#endif +#ifdef CONFIG_SYS_EXTRA_ENV_RELOC +/* +* Some systems need to relocate the env_addr pointer early because the +* location it points to will get invalidated before env_relocate is +* called. One example is on systems that might use a L2 or L3 cache +* in SRAM mode and initialize that cache from SRAM mode back to being +* a cache in cpu_init_r. +*/ + gd->env_addr += gd->dest_addr -CONFIG_SYS_MONITOR_BASE ; +#endif +return 0 ; }static int initr_serial (void )
@@ -83,6 +169,27 @@ static int initr_serial(void)return 0 ; } +#ifdef CONFIG_PPC +static int initr_trap (void ) +{ +/* +* Setup trap handlers +*/ +trap_init (gd->dest_addr); + +return 0 ; +} +#endif + +#ifdef CONFIG_ADDR_MAP +static int initr_addr_map (void ) +{ +init_addr_map (); + +return 0 ; +} +#endif +#ifdef CONFIG_LOGBUFFER unsigned long logbuffer_base (void ) {
@@ -104,6 +211,50 @@ static int initr_post_backlog(void) }#endif +#ifdef CONFIG_SYS_DELAYED_ICACHE +static int initr_icache_enable (void ) +{ +return 0 ; +} +#endif + +#if defined(CONFIG_SYS_INIT_RAM_LOCK ) && defined(CONFIG_E500 ) +static int initr_unlock_ram_in_cache (void ) +{ +unlock_ram_in_cache ();/* it's time to unlock D-cache in e500 */ +return 0 ; +} +#endif + +#ifdef CONFIG_PCI +static int initr_pci (void ) +{ +pci_init (); + +return 0 ; +} +#endif + +#ifdef CONFIG_WINBOND_83C553 +static int initr_w83c553f (void ) +{ +/* +* Initialise the ISA bridge +*/ +initialise_w83c553f (); +return 0 ; +} +#endif + +static int initr_barrier (void ) +{ +#ifdef CONFIG_PPC +/* TODO: Can we not use dmb() macros for this? */ + asm("sync ; isync" ); +#endif +return 0 ; +} +static int initr_malloc (void ) {ulong malloc_start;
@@ -128,13 +279,26 @@ static int initr_announce(void)#if !defined(CONFIG_SYS_NO_FLASH )static int initr_flash (void ) { -ulong flash_size; +ulong flash_size =0 ; +bd_t *bd = gd->bd; +int ok;puts ("Flash: " ); - flash_size =flash_init (); -if (flash_size <=0 ) { +if (board_flash_wp_on ()) { +printf ("Uninitialized - Write Protect On\n" ); +/* Since WP is on, we can't find real size. Set to 0 */ + ok =1 ; + }else { + flash_size =flash_init (); + ok = flash_size >0 ; + } +if (!ok) {puts ("*** failed ***\n" ); +#ifdef CONFIG_PPC +/* Why does PPC do this? */ +hang (); +#endif return -1 ; }print_size (flash_size,"" );
@@ -154,6 +318,39 @@ static int initr_flash(void)print_size (flash_size,"\n" );#endif /* CONFIG_SYS_FLASH_CHECKSUM */ +/* update start of FLASH memory */ +#ifdef CONFIG_SYS_FLASH_BASE + bd->bi_flashstart =CONFIG_SYS_FLASH_BASE ; +#endif +/* size of FLASH memory (final value) */ + bd->bi_flashsize = flash_size; + +#if defined(CONFIG_SYS_UPDATE_FLASH_SIZE ) +/* Make a update of the Memctrl. */ +update_flash_size (flash_size); +#endif + + +#if defined(CONFIG_OXC ) || defined(CONFIG_RMU ) +/* flash mapped at end of memory map */ + bd->bi_flashoffset =CONFIG_SYS_TEXT_BASE + flash_size; +#elif CONFIG_SYS_MONITOR_BASE ==CONFIG_SYS_FLASH_BASE + bd->bi_flashoffset = monitor_flash_len;/* reserved area for monitor */ +#endif + return 0; +} +#endif + +#ifdef CONFIG_PPC +static int initr_spi (void ) +{ +/* PPC does this here */ +#ifdef CONFIG_SPI +#if !defined(CONFIG_ENV_IS_IN_EEPROM ) +spi_init_f (); +#endif +spi_init_r (); +#endif return 0 ; }#endif
@@ -228,9 +425,56 @@ static int initr_env(void)/* Initialize from environment */ load_addr =getenv_ulong ("loadaddr" ,16 , load_addr); +#if defined(CONFIG_SYS_EXTBDINFO ) +#if defined(CONFIG_405GP ) || defined(CONFIG_405EP ) +#if defined(CONFIG_I2CFAST ) +/* +* set bi_iic_fast for linux taking environment variable +* "i2cfast" into account +*/ + { +char *s =getenv ("i2cfast" ); + +if (s && ((*s =='y' ) || (*s =='Y' ))) { + gd->bd->bi_iic_fast[0 ] =1 ; + gd->bd->bi_iic_fast[1 ] =1 ; + } + } +#endif /* CONFIG_I2CFAST */ +#endif /* CONFIG_405GP, CONFIG_405EP */ +#endif /* CONFIG_SYS_EXTBDINFO */ +return 0 ; +} + +#ifdef CONFIG_HERMES +static int initr_hermes (void ) +{ +if ((gd->board_type >>16 ) ==2 ) + gd->bd->bi_ethspeed = gd->board_type &0xFFFF ; +else + gd->bd->bi_ethspeed =0xFFFF ;return 0 ; } +static int initr_hermes_start (void ) +{ +if (gd->bd->bi_ethspeed !=0xFFFF ) +hermes_start_lxt980 ((int ) gd->bd->bi_ethspeed); +return 0 ; +} +#endif + +#ifdef CONFIG_SC3 +/* TODO: with new initcalls, move this into the driver */ +extern void sc3_read_eeprom (void ); + +static int initr_sc3_read_eeprom (void ) +{ +sc3_read_eeprom (); +return 0 ; +} +#endif +static int initr_jumptable (void ) {jumptable_init ();
@@ -271,11 +515,65 @@ static int initr_enable_interrupts(void)#ifdef CONFIG_CMD_NET static int initr_ethaddr (void ) { +bd_t *bd = gd->bd; + +/* kept around for legacy kernels only ... ignore the next section */ +eth_getenv_enetaddr ("ethaddr" , bd->bi_enetaddr); +#ifdef CONFIG_HAS_ETH1 +eth_getenv_enetaddr ("eth1addr" , bd->bi_enet1addr); +#endif +#ifdef CONFIG_HAS_ETH2 +eth_getenv_enetaddr ("eth2addr" , bd->bi_enet2addr); +#endif +#ifdef CONFIG_HAS_ETH3 +eth_getenv_enetaddr ("eth3addr" , bd->bi_enet3addr); +#endif +#ifdef CONFIG_HAS_ETH4 +eth_getenv_enetaddr ("eth4addr" , bd->bi_enet4addr); +#endif +#ifdef CONFIG_HAS_ETH5 +eth_getenv_enetaddr ("eth5addr" , bd->bi_enet5addr); +#endif +return 0 ; +} +#endif /* CONFIG_CMD_NET */ + +#ifdef CONFIG_CMD_KGDB +static int initr_kgdb (void ) +{ +puts ("KGDB: " ); +kgdb_init (); +return 0 ; +} +#endif + +#if defined(CONFIG_STATUS_LED ) && defined(STATUS_LED_BOOT ) +static int initr_status_led (void ) +{ +status_led_set (STATUS_LED_BOOT ,STATUS_LED_BLINKING ); + +return 0 ; +} +#endif + +#if defined(CONFIG_CMD_SCSI ) +static int initr_scsi (void ) +{ +puts ("SCSI: " ); +scsi_init ();return 0 ; }#endif /* CONFIG_CMD_NET */ +#if defined(CONFIG_CMD_DOC ) +static int initr_doc (void ) +{ +puts ("DOC: " ); +doc_init (); +} +#endif +#ifdef CONFIG_BITBANGMII static int initr_bbmii (void ) {
@@ -305,6 +603,33 @@ static int initr_post(void) }#endif +#if defined(CONFIG_CMD_PCMCIA ) && !defined(CONFIG_CMD_IDE ) +static int initr_pcmcia (void ) +{ +puts ("PCMCIA:" ); +pcmcia_init (); +return 0 ; +} +#endif + +#if defined(CONFIG_CMD_IDE ) +static int initr_ide (void ) +{ +#ifdef CONFIG_IDE_8xx_PCCARD +puts ("PCMCIA:" ); +#else +puts ("IDE: " ); +#endif +#if defined(CONFIG_START_IDE ) +if (board_start_ide ()) +ide_init (); +#else +ide_init (); +#endif +return 0 ; +} +#endif +#if defined(CONFIG_PRAM ) || defined(CONFIG_LOGBUFFER )/* * Export available size of memory for Linux, taking into account the
@@ -324,6 +649,37 @@ int initr_mem(void)# endif sprintf (memsz,"%ldk" , (gd->ram_size /1024 ) - pram);setenv ("mem" , memsz); + + return 0; +} +#endif + +#ifdef CONFIG_CMD_BEDBUG +static int initr_bedbug (void ) +{ +bedbug_init (); + +return 0 ; +} +#endif + +#ifdef CONFIG_PS2KBD +static int initr_kbd (void ) +{ +puts ("PS/2: " ); +kbd_init (); +return 0 ; +} +#endif + +#ifdef CONFIG_MODEM_SUPPORT +static int initr_modem (void ) +{ +/* TODO: with new initcalls, move this into the driver */ +extern int do_mdm_init; + + do_mdm_init = gd->do_mdm_init; +return 0 ; }#endif
@@ -341,22 +697,63 @@ static int run_main_loop(void)* * We also hope to remove most of the driver-related init and do it if/when * the driver is later used. +* +* TODO: perhaps reset the watchdog in the initcall function after each call? */ init_fnc_t init_sequence_r[] = { initr_reloc, +/* TODO: could x86/PPC have this also perhaps? */ #ifdef CONFIG_ARM initr_caches, board_init,/* Setup chipselects */ #endif + /* + * TODO: printing of the clock inforamtion of the board is now + * implemented as part of bdinfo command. Currently only support for + * davinci SOC's is added. Remove this check once all the board + * implement this. + */ +#ifdef CONFIG_CLOCKS + set_cpu_clk_info,/* Setup clock information */ +#endif initr_reloc_global_data, initr_serial, initr_announce, +INIT_FUNC_WATCHDOG_RESET +#ifdef CONFIG_PPC + initr_trap, +#endif +#ifdef CONFIG_ADDR_MAP + initr_addr_map, +#endif +#if defined(CONFIG_BOARD_EARLY_INIT_R) + board_early_init_r, +#endif + INIT_FUNC_WATCHDOG_RESET #ifdef CONFIG_LOGBUFFER initr_logbuffer, #endif #ifdef CONFIG_POST initr_post_backlog, #endif + INIT_FUNC_WATCHDOG_RESET +#ifdef CONFIG_SYS_DELAYED_ICACHE + initr_icache_enable, +#endif +#if defined(CONFIG_SYS_INIT_RAM_LOCK) && defined(CONFIG_E500) + initr_unlock_ram_in_cache, +#endif +#if defined(CONFIG_PCI) && defined(CONFIG_SYS_EARLY_PCI_INIT) +/* +* Do early PCI configuration _before_ the flash gets initialised, +* because PCU ressources are crucial for flash access on some boards. +*/ + initr_pci, +#endif +#ifdef CONFIG_WINBOND_83C553 + initr_w83c553f, +#endif + initr_barrier, initr_malloc, #ifdef CONFIG_ARCH_EARLY_INIT_R arch_early_init_r,
@@ -365,6 +762,12 @@ init_fnc_t init_sequence_r[] = {#ifndef CONFIG_SYS_NO_FLASH initr_flash, #endif + INIT_FUNC_WATCHDOG_RESET +#ifdef CONFIG_PPC +/* initialize higher level parts of CPU like time base and timers */ + cpu_init_r, + initr_spi, +#endif #ifdef CONFIG_CMD_NAND initr_nand,#endif
@@ -378,6 +781,24 @@ init_fnc_t init_sequence_r[] = { initr_dataflash, #endif initr_env, + INIT_FUNC_WATCHDOG_RESET + initr_secondary_cpu, +#ifdef CONFIG_SC3 + initr_sc3_read_eeprom, +#endif +#ifdef CONFIG_HERMES + initr_hermes, +#endif +#if defined(CONFIG_ID_EEPROM) || defined(CONFIG_SYS_I2C_MAC_OFFSET) + mac_read_from_eeprom, +#endif + INIT_FUNC_WATCHDOG_RESET +#if defined(CONFIG_PCI) && !defined(CONFIG_SYS_EARLY_PCI_INIT) + /* + * Do pci configuration + */ + initr_pci, +#endif stdio_init, initr_jumptable, #ifdef CONFIG_API
@@ -393,23 +814,73 @@ init_fnc_t init_sequence_r[] = {#ifdef CONFIG_MISC_INIT_R misc_init_r, /* miscellaneous platform-dependent init */#endif +#ifdef CONFIG_HERMES + initr_hermes_start, +#endif + INIT_FUNC_WATCHDOG_RESET +#ifdef CONFIG_CMD_KGDB + initr_kgdb, +#endif interrupt_init, +#ifdef CONFIG_ARM initr_enable_interrupts, +#endif +#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT) + initr_status_led, +#endif + /* PPC has a udelay(20) here dating from 2002. Why? */ #ifdef CONFIG_CMD_NET initr_ethaddr, #endif #ifdef CONFIG_BOARD_LATE_INIT board_late_init, #endif +#ifdef CONFIG_CMD_SCSI + INIT_FUNC_WATCHDOG_RESET + initr_scsi, +#endif +#ifdef CONFIG_CMD_DOC + INIT_FUNC_WATCHDOG_RESET + initr_doc, +#endif #ifdef CONFIG_BITBANGMII initr_bbmii, #endif #ifdef CONFIG_CMD_NET + INIT_FUNC_WATCHDOG_RESET initr_net, #endif #ifdef CONFIG_POST initr_post, #endif +#if defined(CONFIG_CMD_PCMCIA) && !defined(CONFIG_CMD_IDE) + initr_pcmcia, +#endif +#if defined(CONFIG_CMD_IDE) + initr_ide, +#endif +#ifdef CONFIG_LAST_STAGE_INIT + INIT_FUNC_WATCHDOG_RESET + /* + * Some parts can be only initialized if all others (like + * Interrupts) are up and running (i.e. the PC-style ISA + * keyboard). + */ + last_stage_init, +#endif +#ifdef CONFIG_CMD_BEDBUG + INIT_FUNC_WATCHDOG_RESET + initr_bedbug, +#endif +#if defined(CONFIG_PRAM) || defined(CONFIG_LOGBUFFER) + initr_mem, +#endif +#ifdef CONFIG_PS2KBD + initr_kbd, +#endif +#ifdef CONFIG_MODEM_SUPPORT + initr_modem, +#endif run_main_loop, };
include/common.h +1 -0
@@ -311,6 +311,7 @@ int mac_read_from_eeprom(void);extern u8 _binary_dt_dtb_start[];/* embedded device tree blob */ int set_cpu_clk_info (void );int print_cpuinfo (void ); +int update_flash_size (int flash_size);/** * Show the DRAM size in a board-specific way
include/ide.h +7 -0
@@ -85,4 +85,11 @@ void ide_output_data(int dev, const ulong *sect_buf, int words);void ide_input_data_shorts (int dev,ushort *sect_buf,int shorts);void ide_output_data_shorts (int dev,ushort *sect_buf,int shorts); +/** +* board_start_ide() - Start up the board IDE interfac +* +* @return 0 if ok +*/ +int board_start_ide (void ); +#endif /* _IDE_H */
Signature · 1 line
1.8.1
PATCH v5 18/23 ppc: Enable generic board support
In reply to Simon GlassThis enables generic board support so that ppc boards can define CONFIG_SYS_GENERIC_BOARD.
---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None
arch/powerpc/config.mk | 3 --- arch/powerpc/include/asm/u-boot.h | 7 +++++++ arch/powerpc/lib/Makefile | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-)
arch/powerpc/config.mk +0 -3
@@ -29,9 +29,6 @@ PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__ PLATFORM_LDFLAGS += -n -# Move to unified board system later -CONFIG_SYS_LEGACY_BOARD := y - # # When cross-compiling on NetBSD, we have to define __PPC__ or else we # will pick up a va_list declaration that is incompatible with the
arch/powerpc/include/asm/u-boot.h +7 -0
@@ -34,6 +34,11 @@* include/asm-ppc/u-boot.h */ +#ifdef CONFIG_SYS_GENERIC_BOARD +/* Use the generic board which requires a unified bd_info */ +#include <asm-generic/u-boot.h> +#else + #ifndef __ASSEMBLY__ typedef struct bd_info {
@@ -144,6 +149,8 @@ typedef struct bd_info {#endif /* __ASSEMBLY__ */ +#endif /* nCONFIG_SYS_GENERIC_BOARD */ +/* For image.h:image_check_target_arch() */ #define IH_ARCH_DEFAULT IH_ARCH_PPC
arch/powerpc/lib/Makefile +2 -0
@@ -59,8 +59,10 @@ SOBJS-y += reloc.o COBJS-$(CONFIG_BAT_RW) += bat_rw.o ifndef CONFIG_SPL_BUILD +ifndef CONFIG_SYS_GENERIC_BOARD COBJS-y += board.o endif +endif COBJS-y += bootm.o COBJS-y += cache.o COBJS-y += extable.o
Signature · 1 line
1.8.1
PATCH v5 18/23 ppc: Enable generic board support
Quoted 37 lines · Simon Glass
This enables generic board support so that ppc boards can define
CONFIG_SYS_GENERIC_BOARD.Signed-off-by Simon Glass <[email protected]>---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: Nonearch/powerpc/config.mk | 3 --- arch/powerpc/include/asm/u-boot.h | 7 +++++++ arch/powerpc/lib/Makefile | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-)arch/powerpc/config.mk +0
-4@@ -29,9 +29,6 @@ PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__ PLATFORM_LDFLAGS += -n -# Move to unified board system later -CONFIG_SYS_LEGACY_BOARD := y - # # When cross-compiling on NetBSD, we have to define __PPC__ or elsewe
# will pick up a va_list declaration that is incompatible with thearch/powerpc/include/asm/u-boot.h +0
-0
arch/powerpc/include/asm/u-boot.h line 40
Quoted 7 lines
arch/powerpc/include/asm/u-boot.h +4
-0@@ -34,6 +34,11 @@* include/asm-ppc/u-boot.h */ +#ifdef CONFIG_SYS_GENERIC_BOARD +/* Use the generic board which requires a unified bd_info */ +#include <asm-generic/u-boot.h> +#else
Note that a unified bd_info means you're breaking compatibility with old, pre-device-tree kernels (including possibly some non-Linux OSes that still don't use the device tree) -- in which case why keep it around at all?
If you meant for the unified bd_info to be backwards compatible, it's missing bi_ip_addr.
-Scott
PATCH v5 18/23 ppc: Enable generic board support
Hi Scott,
Quoted 41 lines · Scott Wood
Quoted 40 lines · Simon Glass
This enables generic board support so that ppc boards can define
CONFIG_SYS_GENERIC_BOARD.Signed-off-by Simon Glass <[email protected]>---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: Nonearch/powerpc/config.mk | 3 --- arch/powerpc/include/asm/u-boot.h | 7 +++++++ arch/powerpc/lib/Makefile | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-)arch/powerpc/config.mk +0
-4@@ -29,9 +29,6 @@ PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__ PLATFORM_LDFLAGS += -n -# Move to unified board system later -CONFIG_SYS_LEGACY_BOARD := y - # # When cross-compiling on NetBSD, we have to define __PPC__ or else we # will pick up a va_list declaration that is incompatible with thearch/powerpc/include/asm/u-boot.h +0
-0@@ -34,6 +34,11 @@* include/asm-ppc/u-boot.h */
Quoted 9 lines
arch/powerpc/include/asm/u-boot.h line 40
Quoted 4 lines
arch/powerpc/include/asm/u-boot.h +4
-0+#ifdef CONFIG_SYS_GENERIC_BOARD +/* Use the generic board which requires a unified bd_info */ +#include <asm-generic/u-boot.h> +#else Note that a unified
bd_infomeans you're breaking compatibility with old, pre-device-tree kernels (including possibly some non-Linux OSes that still don't use the device tree) -- in which case why keep it around at all?
It's not intended to break things - are you saying that every arch is defined to use a different variant of bd_t in these OSes, or are you just referring to PPC?
Quoted 3 lines
If you meant for the unified
bd_infoto be backwards compatible, it's missingbi_ip_addr.
OK, I see. I saw a commit that punted it, so I punted it. I didn't notice the re-add later. I will put it back.
Regards,
Simon
Quoted 2 lines
-Scott
PATCH v5 18/23 ppc: Enable generic board support
Quoted 54 lines · Simon Glass
Hi Scott,
Quoted 26 lines · Scott Wood
Quoted 25 lines · Simon Glass
This enables generic board support so that ppc boards can define
CONFIG_SYS_GENERIC_BOARD.Signed-off-by Simon Glass <[email protected]>---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: Nonearch/powerpc/config.mk | 3 --- arch/powerpc/include/asm/u-boot.h | 7 +++++++ arch/powerpc/lib/Makefile | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-)arch/powerpc/config.mk +0
-1@@ -29,9 +29,6 @@ PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__ PLATFORM_LDFLAGS += -nQuoted 5 lines
arch/powerpc/config.mk PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections
Quoted 5 lines
arch/powerpc/config.mk +0
-3-# Move to unified board system later -CONFIG_SYS_LEGACY_BOARD := y - # # When cross-compiling on NetBSD, we have to define __PPC__ orelse we
Quoted 10 lines
Quoted 10 lines
arch/powerpc/config.mk +0
-0# will pick up a va_list declaration that is incompatible with thearch/powerpc/include/asm/u-boot.h +0
-0@@ -34,6 +34,11 @@* include/asm-ppc/u-boot.h */ Quoted 7 lines
arch/powerpc/include/asm/u-boot.h line 40
Quoted 4 lines
arch/powerpc/include/asm/u-boot.h +4
-0+#ifdef CONFIG_SYS_GENERIC_BOARD +/* Use the generic board which requires a unified bd_info */ +#include <asm-generic/u-boot.h> +#else Note that a unified
bd_infomeans you're breaking compatibilitywith old,
Quoted 8 lines
Quoted 1 line
pre-device-tree kernels (including possibly some non-Linux OSes
that still
Quoted 1 line
don't use the device tree) -- in which case why keep it around at
all?
It's not intended to break things - are you saying that every arch is defined to use a different variant of
bd_tin these OSes, or are you just referring to PPC?
Any OS that uses bd_info is going to rely on things not changing (other than additions to the end) from whatever was used for that particular platform at the time the OS copied the struct definition.
-Scott
PATCH v5 19/23 x86: Adjust board_f.c for x86
In reply to Simon GlassFor x86, things have adjusted somewhat since this series was originally written. It has its own way of running through initcalls which is actually nicer than others archs.
Unfortunately this does introduce exceptions. We will soon require use of generic board on x86, but until then we need to fit in with what is there, and treat x86 as a special case.
---
Changes in v5:
- Add new patch to adjust board_f.c for x86
Changes in v4: None
Changes in v3: None
Changes in v2: None
common/board_f.c | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 81 insertions(+), 2 deletions(-)
common/board_f.c +81 -2
@@ -57,6 +57,10 @@#include <asm/mp.h> #endif #include <asm/sections.h> +#ifdef CONFIG_X86 +#include <asm/init_helpers.h> +#include <asm/relocate.h> +#endif #include <linux/compiler.h> /*
@@ -423,7 +427,7 @@ static int reserve_lcd(void)#endif /* CONFIG_LCD */ #if defined(CONFIG_VIDEO ) && (!defined(CONFIG_PPC ) || defined(CONFIG_8xx)) \ - && !defined(CONFIG_ARM ) + && !defined(CONFIG_ARM ) && !defined(CONFIG_X86 )static int reserve_video (void ) {/* reserve memory for video display (always full pages) */
@@ -716,7 +720,25 @@ static int setup_reloc(void)static int jump_to_copy (void ) { +/* +* x86 is special, but in a nice way. It uses a trampoline which +* enables the dcache if possible. +* +* For now, other archs use relocate_code(), which is implemented +* similarly for all archs. When we do generic relocation, hopefully +* we can make all archs enable the dcache prior to relocation. +*/ +#ifdef CONFIG_X86 +/* +* SDRAM and console are now initialised. The final stack can now +* be setup in SDRAM. Code execution will continue in Flash, but +* with the stack in SDRAM and Global Data in temporary memory +* (CPU cache) +*/ +board_init_f_r_trampoline (gd->start_addr_sp); +#else relocate_code (gd->dest_addr_sp, gd->new_gd, gd->dest_addr); +#endif return 0 ; }
@@ -743,6 +765,12 @@ static init_fnc_t init_sequence_f[] = { probecpu, #endif arch_cpu_init, /* basic arch cpu dependent setup */ +#ifdef CONFIG_X86 + cpu_init_f, /* TODO(sjg at chromium.org): remove */ +# ifdef CONFIG_OF_CONTROL + find_fdt, /* TODO(sjg at chromium.org): remove */ +# endif +#endif mark_bootstage,#ifdef CONFIG_OF_CONTROL fdtdec_check_fdt,
@@ -791,6 +819,9 @@ static init_fnc_t init_sequence_f[] = { init_baud_rate, /* initialze baudrate settings */ serial_init,/* serial communications setup */ console_init_f,/* stage 1 init of console */ +#if defined(CONFIG_X86) && defined(CONFIG_OF_CONTROL) + prepare_fdt,/* TODO(sjg at chromium.org): remove */ +#endif display_options,/* say that we are here */ display_text_info,/* show debugging info if required */ #if defined(CONFIG_8260)
@@ -828,6 +859,8 @@ static init_fnc_t init_sequence_f[] = {#endif #ifdef CONFIG_X86 dram_init_f,/* configure available RAM banks */ +/* x86 would prefer that this happens after relocation */ + dram_init, #endif announce_dram_init,/* TODO: unify all these dram functions? */
@@ -883,7 +916,7 @@ static init_fnc_t init_sequence_f[] = {#endif /* TODO: Why the dependency on CONFIG_8xx? */ #if defined(CONFIG_VIDEO ) && (!defined(CONFIG_PPC ) || defined(CONFIG_8xx)) \ - && !defined(CONFIG_ARM ) + && !defined(CONFIG_ARM ) && !defined(CONFIG_X86 ) reserve_video, #endif reserve_uboot,
@@ -920,9 +953,11 @@ static init_fnc_t init_sequence_f[] = {void board_init_f (ulong boot_flags) { +#ifndef CONFIG_X86 gd_t data; gd = &data; +#endif gd->flags = boot_flags;
@@ -935,6 +970,50 @@ void board_init_f(ulong boot_flags)#endif } +#ifdef CONFIG_X86 +/* +* For now this code is only used on x86. +* +* init_sequence_f_r is the list of init functions which are run when +* U-Boot is executing from Flash with a semi-limited 'C' environment. +* The following limitations must be considered when implementing an +* '_f_r' function: +* - 'static' variables are read-only +* - Global Data (gd->xxx) is read/write +* +* The '_f_r' sequence must, as a minimum, copy U-Boot to RAM (if +* supported). It _should_, if possible, copy global data to RAM and +* initialise the CPU caches (to speed up the relocation process) +* +* NOTE: At present only x86 uses this route, but it is intended that +* all archs will move to this when generic relocation is implemented. +*/ +static init_fnc_t init_sequence_f_r[] = { + init_cache_f_r, + copy_uboot_to_ram, + clear_bss, + do_elf_reloc_fixups, + +NULL , +}; + +void board_init_f_r (void ) +{ +if (initcall_run_list (init_sequence_f_r)) +hang (); + +/* +* U-Boot has been copied into SDRAM, the BSS has been cleared etc. +* Transfer execution from Flash to RAM by calculating the address +* of the in-RAM copy of board_init_r() and calling it +*/ + (board_init_r + gd->reloc_off)(gd, gd->relocaddr); + +/* NOTREACHED - board_init_r() does not return */ +hang (); +} +#endif /* CONFIG_X86 */ +void hang (void ) {puts ("### ERROR ### Please RESET the board ###\n" );
Signature · 1 line
1.8.1
PATCH v5 20/23 x86: Adjust board_r.c for x86
In reply to Simon GlassFor x86 the global_data is managed entirely by the start.S code so we do not need to touch it. However, we do have some more initcalls to add.
---
Changes in v5:
- Add new patch to adjust board_r.c for x86
Changes in v4: None
Changes in v3: None
Changes in v2: None
common/board_r.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-)
common/board_r.c +21 -2
@@ -63,6 +63,9 @@#include <asm/mmu.h> #endif #include <asm/sections.h> +#ifdef CONFIG_X86 +#include <asm/init_helpers.h> +#endif #include <linux/compiler.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -716,6 +719,9 @@ init_fnc_t init_sequence_r[] = {#ifdef CONFIG_CLOCKS set_cpu_clk_info, /* Setup clock information */#endif +#ifdef CONFIG_X86 + init_bd_struct_r, +#endif initr_reloc_global_data, initr_serial, initr_announce,
@@ -763,11 +769,16 @@ init_fnc_t init_sequence_r[] = { initr_flash, #endif INIT_FUNC_WATCHDOG_RESET -#ifdef CONFIG_PPC +#if defined(CONFIG_PPC ) || defined(CONFIG_X86 )/* initialize higher level parts of CPU like time base and timers */ cpu_init_r, +#endif +#ifdef CONFIG_PPC initr_spi,#endif +#if defined(CONFIG_X86 ) && defined(CONFIG_SPI ) + init_func_spi, +#endif #ifdef CONFIG_CMD_NAND initr_nand,#endif
@@ -821,10 +832,16 @@ init_fnc_t init_sequence_r[] = {#ifdef CONFIG_CMD_KGDB initr_kgdb,#endif +#ifdef CONFIG_X86 + board_early_init_r, +#endif interrupt_init, -#ifdef CONFIG_ARM +#if defined(CONFIG_ARM ) || defined(CONFIG_x86) initr_enable_interrupts,#endif +#ifdef CONFIG_X86 + timer_init, /* initialize timer */ +#endif #if defined(CONFIG_STATUS_LED ) && defined(STATUS_LED_BOOT ) initr_status_led,#endif
@@ -886,7 +903,9 @@ init_fnc_t init_sequence_r[] = {void board_init_r (gd_t *new_gd,ulong dest_addr) { +#ifndef CONFIG_X86 gd = new_gd; +#endif if (initcall_run_list (init_sequence_r))hang ();
Signature · 1 line
1.8.1
PATCH v5 21/23 x86: Use sections header to obtain link symbols
In reply to Simon GlassThese are defined in asm-generic/sections.h, so remove them from architecture-specific files.
---
Changes in v5:
- Include asm/sections.h in x86 sdram code
- Define _end instead of __end for x86
Changes in v4:
- Use asm/sections.h instead of asm-generic/sections.h
Changes in v3:
- Add header to new x86 relocate.c and init_helpers.c
Changes in v2: None
arch/x86/cpu/coreboot/sdram.c | 1 + arch/x86/cpu/u-boot.lds | 4 +--- arch/x86/include/asm/u-boot-x86.h | 9 --------- arch/x86/lib/board.c | 1 + arch/x86/lib/init_helpers.c | 1 + arch/x86/lib/relocate.c | 1 + 6 files changed, 5 insertions(+), 12 deletions(-)
arch/x86/cpu/coreboot/sdram.c +1 -0
@@ -28,6 +28,7 @@#include <asm/u-boot-x86.h> #include <asm/global_data.h> #include <asm/processor.h> +#include <asm/sections.h> #include <asm/arch/sysinfo.h> #include <asm/arch/tables.h>
arch/x86/cpu/u-boot.lds +1 -3
@@ -53,6 +53,7 @@ SECTIONS . = ALIGN(4); __data_end = .; + __init_end = .; . = ALIGN(4); .dynsym : { *(.dynsym*) }
@@ -64,9 +65,6 @@ SECTIONS . = ALIGN(4); _end = .; - . = ALIGN(4); - - __end = .; .bss __rel_dyn_start (OVERLAY) : { __bss_start = .; *(.bss)
arch/x86/include/asm/u-boot-x86.h +0 -9
@@ -24,15 +24,6 @@#ifndef _U_BOOT_I386_H_#define _U_BOOT_I386_H_ 1 -/* Exports from the Linker Script */ -extern char __text_start[]; -extern ulong __data_end; -extern ulong __rel_dyn_start; -extern ulong __rel_dyn_end; -extern char __bss_start[]; -extern ulong __bss_end; -extern char _end[]; -/* cpu/.../cpu.c */ int x86_cpu_init_r (void );int cpu_init_r (void );
arch/x86/lib/board.c +1 -0
@@ -38,6 +38,7 @@#include <asm/u-boot-x86.h> #include <asm/relocate.h> #include <asm/processor.h> +#include <asm/sections.h> #include <asm/init_helpers.h> #include <asm/init_wrappers.h>
arch/x86/lib/init_helpers.c +1 -0
@@ -32,6 +32,7 @@#include <spi.h> #include <status_led.h> #include <asm/processor.h> +#include <asm/sections.h> #include <asm/u-boot-x86.h> #include <linux/compiler.h>
arch/x86/lib/relocate.c +1 -0
@@ -36,6 +36,7 @@#include <malloc.h> #include <asm/u-boot-x86.h> #include <asm/relocate.h> +#include <asm/sections.h> #include <elf.h> int copy_uboot_to_ram (void )
Signature · 1 line
1.8.1
PATCH v5 22/23 x86: Enable generic board support
In reply to Simon GlassThis enables generic board support so that x86 boards can define CONFIG_SYS_GENERIC_BOARD.
---
Changes in v5:
- Avoid setting up gd on x86 as it is already done
Changes in v4: None
Changes in v3: None
Changes in v2: None
arch/x86/config.mk | 3 --- arch/x86/include/asm/u-boot.h | 11 +++++++++++ arch/x86/lib/Makefile | 3 +++ common/board_r.c | 2 ++ 4 files changed, 16 insertions(+), 3 deletions(-)
arch/x86/config.mk +0 -3
@@ -48,6 +48,3 @@ NORMAL_LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) PREFIXED_LIBGCC = $(OBJTREE)/arch/$(ARCH)/lib/$(shell basename $(NORMAL_LIBGCC)) export USE_PRIVATE_LIBGCC=$(shell dirname $(PREFIXED_LIBGCC)) - -# Move to unified board system later -CONFIG_SYS_LEGACY_BOARD := y
arch/x86/include/asm/u-boot.h +11 -0
@@ -39,6 +39,13 @@#include <config.h> #include <compiler.h> +#ifdef CONFIG_SYS_GENERIC_BOARD +/* Use the generic board which requires a unified bd_info */ +#include <asm-generic/u-boot.h> +#else + +#ifndef __ASSEMBLY__ + typedef struct bd_info { unsigned long bi_memstart; /* start of DRAM memory */ phys_size_t bi_memsize; /* size of DRAM memory in bytes */
@@ -60,6 +67,10 @@ typedef struct bd_info { }bi_dram[CONFIG_NR_DRAM_BANKS]; } bd_t; +#endif /* __ASSEMBLY__ */ + +#endif /* nCONFIG_SYS_GENERIC_BOARD */ +/* For image.h:image_check_target_arch() */ #define IH_ARCH_DEFAULT IH_ARCH_I386
arch/x86/lib/Makefile +3 -0
@@ -35,7 +35,10 @@ COBJS-$(CONFIG_SYS_PC_BIOS) += bios_setup.o COBJS-$(CONFIG_VIDEO_VGA) += video_bios.o endif +ifeq ($(CONFIG_SYS_GENERIC_BOARD),) COBJS-y += board.o +endif + COBJS-y += bootm.o COBJS-y += cmd_boot.o COBJS-y += gcc.o
common/board_r.c +2 -0
@@ -509,11 +509,13 @@ static int show_model_r(void)#endif /* enable exceptions */ +#ifdef CONFIG_ARM static int initr_enable_interrupts (void ) {enable_interrupts ();return 0 ; } +#endif #ifdef CONFIG_CMD_NET static int initr_ethaddr (void )
Signature · 1 line
1.8.1
PATCH v5 23/23 tegra: Enable generic board for Seaboard.
In reply to Simon GlassEnable CONFIG_SYS_GENERIC_BOARD for Tegra 2 Seaboard.
---
Changes in v5: None
Changes in v4:
- Rebase to master
- Drop sc520_timer.c patch (warning already fixed by previous patch)
Changes in v3:
- Rebase to master
- Rebase on top of x86/master (which has not yet been pulled to master)
Changes in v2:
- Change generic board to an opt-in system on a per-board basic
- Add CONFIG_SYS_GENERIC_BOARD to allow board to select generic board
- Add PowerPC support
- Rebase to master
include/configs/seaboard.h | 2 ++ 1 file changed, 2 insertions(+)
include/configs/seaboard.h +2 -0
@@ -40,6 +40,8 @@#define CONFIG_OF_CONTROL #define CONFIG_OF_SEPARATE +#define CONFIG_SYS_GENERIC_BOARD +/* High-level configuration options */ #define V_PROMPT "Tegra20 (SeaBoard) # "#define CONFIG_TEGRA_BOARD_STRING "NVIDIA Seaboard"
Signature · 1 line
1.8.1
PATCH v5 23/23 tegra: Enable generic board for Seaboard.
Quoted 1 line · Simon Glass
Enable
CONFIG_SYS_GENERIC_BOARDfor Tegra 2 Seaboard.
Shouldn't this be enabled for Tegra generically, rather than for just one Tegra board? I haven't looked at the rest of the series yet, but it sure seems better if all Tegra boards always work the same way.
PATCH v5 23/23 tegra: Enable generic board for Seaboard.
Hi Stephen
Quoted 6 lines · Stephen Warren
Quoted 1 line · Simon Glass
Enable
CONFIG_SYS_GENERIC_BOARDfor Tegra 2 Seaboard.Shouldn't this be enabled for Tegra generically, rather than for just one Tegra board? I haven't looked at the rest of the series yet, but it sure seems better if all Tegra boards always work the same way.
Yes but I can only test on that board. I suspect it should be OK with others but I've taken a fairly conservative approach as I don't want to break things.
If you have a board about, please try putting it in tegra-common.h or similar and see what happens.
BTW it would be nice to have a tegra20-dt.h config. Then I would just test that one board and know that other changes can only be FDT-related. But I think due to pinmux that isn't possible right now, as previously discussed.
Regards,
Simon
PATCH v5 23/23 tegra: Enable generic board for Seaboard.
Quoted 10 lines · Simon Glass
Hi Stephen
Quoted 6 lines · Stephen Warren
Quoted 1 line · Simon Glass
Enable
CONFIG_SYS_GENERIC_BOARDfor Tegra 2 Seaboard.Shouldn't this be enabled for Tegra generically, rather than for just one Tegra board? I haven't looked at the rest of the series yet, but it sure seems better if all Tegra boards always work the same way.
Quoted 6 lines
Yes but I can only test on that board. I suspect it should be OK with others but I've taken a fairly conservative approach as I don't want to break things.
If you have a board about, please try putting it in
tegra-common.hor similar and see what happens.
This is something Tom should drive.
Quoted 4 lines
BTW it would be nice to have a
tegra20-dt.hconfig. Then I would just test that one board and know that other changes can only be FDT-related. But I think due to pinmux that isn't possible right now, as previously discussed.
Well, there are quite a few peripherals which are only initialized/instantiated from board files too, so a generic DT config wouldn't be very useful yet, although Tom and Allen are in the process of converting things as they add Tegra114 support.