Skip to contentSkip to conversation

barebox-data: add barebox-data sections

PATCH Sascha Hauer 1 participant 2 messages Aug 31, 2012 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 21 lines · Alexander Aring

Add barebox-data section in arm branch to get complete barebox regions in sdram regions tree.

---
 arch/arm/lib/barebox.lds.S                       |    6 +++++-
 arch/blackfin/boards/ipe337/barebox.lds.S        |    6 +++++-
 arch/mips/lib/barebox.lds.S                      |    5 ++++-
 arch/nios2/cpu/barebox.lds.S                     |    5 +++--
 arch/ppc/boards/freescale-p2020rdb/barebox.lds.S |    6 ++++--
 arch/ppc/boards/pcm030/barebox.lds.S             |    5 +++--
 arch/x86/lib/barebox.lds.S                       |    5 ++++-
 common/memory.c                                  |    4 ++++
 include/asm-generic/sections.h                   |    1 +
 9 files changed, 33 insertions(+), 10 deletions(-)
arch/arm/lib/barebox.lds.S +0 -0
index e0bae70..ae0b760 100644

arch/arm/lib/barebox.lds.S SECTIONS · line 73

Quoted 5 lines
arch/arm/lib/barebox.lds.S +1 -1
@@ -70,7 +70,9 @@ SECTIONS
 		__stop_unwind_tab = .;
 	}
 #endif
-	_etext = .;			/* End of text and rodata section */
+	_etext = . - 1;			/* End of text and rodata section */

I am not sure this is a good idea. Looking at it this indeed seems to be correct. Anyway, at least in the Linux kernel I can find things like:

	codesize = (unsigned long)_etext - (unsigned long)_text;

If we have _etext = . the above results in the correct codesize, but if we change this to _etext = . - 1 we would have to do

	codesize = (unsigned long)_etext - (unsigned long)_text + 1;

instead.

Everyone else including the kernel and the standard linker scripts from ld have _etext = .; so I vote for keeping it that way.

arch/arm/lib/barebox.lds.S SECTIONS · line 88

Quoted 5 lines
arch/arm/lib/barebox.lds.S +1 -0
@@ -83,6 +85,8 @@ SECTIONS
 	__usymtab : { BAREBOX_SYMS }
 	___usymtab_end = .;
 
+	_edata - . -1;

s/-/=/

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw

Re: [PATCH v3 0/5] rewritten memtest command

In reply to a message not in the archive

Hi Alexander,

Apart from the comment I made the series looks good to me.

Sascha

Quoted 41 lines · Alexander Aring

Rewritten memtest command.
Added new section data which is between text and bss. Only tested on arm architecture.

Alexander Aring (5):
mmu: make remap_range global accessable
memory: add function address_in_sdram_regions
barebox-data: add barebox-data sections
memtest: remove memtest command
memtest: add rewritten memtest command

 arch/arm/cpu/mmu.c                               |    4 +-
 arch/arm/include/asm/mmu.h                       |   13 +
 arch/arm/lib/barebox.lds.S                       |    6 +-
 arch/blackfin/boards/ipe337/barebox.lds.S        |    6 +-
 arch/blackfin/include/asm/mmu.h                  |   15 +
 arch/mips/include/asm/mmu.h                      |   15 +
 arch/mips/lib/barebox.lds.S                      |    5 +-
 arch/nios2/cpu/barebox.lds.S                     |    5 +-
 arch/nios2/include/asm/mmu.h                     |   15 +
 arch/openrisc/include/asm/mmu.h                  |   15 +
 arch/ppc/boards/freescale-p2020rdb/barebox.lds.S |    6 +-
 arch/ppc/boards/pcm030/barebox.lds.S             |    5 +-
 arch/ppc/include/asm/mmu.h                       |   10 +
 arch/x86/include/asm/mmu.h                       |   15 +
 arch/x86/lib/barebox.lds.S                       |    5 +-
 commands/Kconfig                                 |   11 +-
 commands/Makefile                                |    2 +-
 commands/memtest.c                               |  850 +++++++++++++++-------
 common/memory.c                                  |   17 +
 include/asm-generic/sections.h                   |    1 +
 include/common.h                                 |    3 +
 include/memory.h                                 |    6 +
 22 files changed, 732 insertions(+), 298 deletions(-)
 create mode 100644 arch/blackfin/include/asm/mmu.h
 create mode 100644 arch/mips/include/asm/mmu.h
 create mode 100644 arch/nios2/include/asm/mmu.h
 create mode 100644 arch/openrisc/include/asm/mmu.h
 create mode 100644 arch/x86/include/asm/mmu.h
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox