CFG_MONITOR_BASE
Is the CFG_MONITOR_BASE the location where the processor reads the first instruction after reset ? is that right ?
any clarification would be appreciated.
thanks !
[U-Boot-Users] u-boot.bin
i'm working on taishan ppc440gx.
now here's what i noticed. snippet of u-boot.bin opened with a hex editor.
fffbffff : 27051956 552d426f 6f742031 2e322e30 '..VU-Boot 1.2.0fffc000f : 20284a75 6c203232 20323030 38202d20 (Jul 22 2008 -fffc001f : 31343a31 363a3037 29000000 00000000 14:16:07)....... fffc002f : 00000000 00000000 00000000 00000000 ................ fffc003f : 00000000 00000000 00000000 00000000 ................
and my u-boot.map
.text 0xfffc0000 0x2aa9c
cpu/ppc4xx/start.o(.text)
.text 0xfffc0000 0x2704 cpu/ppc4xx/start.o
0xfffc01bc _start_of_vectors
0xfffc0004 version_string
0xfffc2424 dcache_enable
0xfffc24dc relocate_code
0xfffc24b4 in32
0xfffc24ac in16r
0xfffc2474 in8
0xfffc24bc in32r
0xfffc2484 out16
0xfffc24a4 in16
0xfffc23ec icache_enable
0xfffc246c wr_tcr
0xfffc2100 transfer_to_handler
0xfffc24cc ppcDcbi
0xfffc0100 _startcouple of question.
1) this line ".text 0xfffc0000 0x2aa9c" from u-boot.map
which means .text starts at 0xfffc0000 and with length of 0x2aa9c. right ?
then looking at the hex dump of u-boot.bin looks like there's some data right after first word (U-Boot 1.2.0...) what am i missing ?
2) when ppc440gx reset it has 0xfffffffc in its program counter, the instr at this location is a branch instr. right ?
b) this branch should go to TEXT_BASE which is 0xfffc0000 in my case.
and that location contains 0x05195655. which looks like a "rlwimix" instr. (rotate left word immediate then mask insert). does this look start of monitor ?
Any insight on how the bootldr starts up would be appreciated too. thanks !
[U-Boot-Users] u-boot.bin
ok, looks like 0x27051956 is uboot magic number (from start.S) why is the CFG_MONITOR_BASE points to the magic number ?
Quoted 82 lines · Fundu
From: Fundu <[email protected]>
Subject: [U-Boot-Users] u-boot.bin
To: u-boot-users at lists.sourceforge.net
Date: Tuesday, July 22, 2008, 3:44 PM
i'm working on taishan ppc440gx.now here's what i noticed. snippet of u-boot.bin opened with a hex editor.
fffbffff : 27051956
552d426f6f7420312e322e30'..VU-Boot 1.2.0fffc000f:20284a756c2032322032303038202d20(Jul 22
2008 -fffc001f:31343a31363a303729000000 00000000 14:16:07).......fffc002f: 00000000 00000000 00000000 00000000
................fffc003f: 00000000 00000000 00000000 00000000
................and my u-boot.map
.text
0xfffc00000x2aa9c
cpu/ppc4xx/start.o(.text)
.text0xfffc00000x2704cpu/ppc4xx/start.o0xfffc01bc _start_of_vectors 0xfffc0004 version_string 0xfffc2424 dcache_enable 0xfffc24dc relocate_code 0xfffc24b4 in32 0xfffc24ac in16r 0xfffc2474 in8 0xfffc24bc in32r 0xfffc2484 out16 0xfffc24a4 in16 0xfffc23ec icache_enable 0xfffc246c wr_tcr 0xfffc2100 transfer_to_handler 0xfffc24cc ppcDcbi 0xfffc0100 _startcouple of question.
1) this line ".text0xfffc00000x2aa9c" from u-boot.map
which means .text starts at0xfffc0000and with length of0x2aa9c. right ?then looking at the hex dump of u-boot.bin looks like there's some data right after first word (U-Boot 1.2.0...)
what am i missing ?2) when ppc440gx reset it has
0xfffffffcin its program counter, the instr at this location is a branch instr. right ?
b) this branch should go toTEXT_BASEwhich is0xfffc0000in my case.
and that location contains0x05195655. which looks like a "rlwimix" instr. (rotate left word immediate then mask insert). does this look start of monitor ?Any insight on how the bootldr starts up would be appreciated too.
thanks !-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users
[U-Boot-Users] u-boot.bin
Quoted 2 lines · Fundu
ok, looks like
0x27051956is uboot magic number (fromstart.S) why is theCFG_MONITOR_BASEpoints to the magic number ?
Because that is the definition. From the file README:
- CFG_MONITOR_BASE:
Physical start address of boot monitor code (set by make config files to be same as the text base address (TEXT_BASE) used when linking) - same as CFG_FLASH_BASE when booting from flash.
Quoted 8 lines
Quoted 6 lines · Fundu
From: Fundu <[email protected]>
Subject: [U-Boot-Users] u-boot.bin
To: u-boot-users at lists.sourceforge.net
Date: Tuesday, July 22, 2008, 3:44 PM
i'm working on taishan ppc440gx.
Quoted 5 lines
Quoted 5 lines
now here's what i noticed. snippet of u-boot.bin opened with a hex editor.
fffbffff : 27051956
552d426f6f7420312e322e30
This is the start, it should be (and probably is) at fffc0000. Why does your dump start at fff*bffff* (one byte before where it should)?
Quoted 10 lines
Quoted 10 lines
'..VU-Boot 1.2.0
fffc000f:20284a756c2032322032303038202d20(Jul 22
2008 -fffc001f:31343a31363a303729000000 00000000 14:16:07).......fffc002f: 00000000 00000000 00000000 00000000
................fffc003f: 00000000 00000000 00000000 00000000
................
Quoted 5 lines
Quoted 5 lines
and my u-boot.map
.text
0xfffc00000x2aa9c
cpu/ppc4xx/start.o(.text)
.text0xfffc00000x2704cpu/ppc4xx/start.o
Note the start address is fffc0000, not fffbffff.
[snip]
Quoted 5 lines
Quoted 5 lines
couple of question.
1) this line ".text0xfffc00000x2aa9c" from u-boot.map
which means .text starts at0xfffc0000and with length of0x2aa9c. right ?
Yes.
Quoted 4 lines
Quoted 4 lines
then looking at the hex dump of u-boot.bin looks like there's some data right after first word (U-Boot 1.2.0...)
what am i missing ?
The first word is the u-boot magic number, followed by the u-boot build information (text).
Quoted 3 lines
Quoted 3 lines
2) when ppc440gx reset it has
0xfffffffcin its program counter, the instr at this location is a branch instr. right ?
Yes. See cpu/ppc4xx/start.S
Quoted 2 lines
Quoted 2 lines
b) this branch should go to
TEXT_BASEwhich is0xfffc0000in my case.
No, it jumps to the start of some CPU initialization code in the last 4K page (when released from reset, only the last 4K page is mapped). That code maps the rest of memory and jumps to the traditional PPC startup code. 0xfffc0000 isn't involved.
Quoted 3 lines
Quoted 3 lines
and that location contains
0x05195655. which looks like a "rlwimix" instr. (rotate left word immediate then mask insert). does this look start of monitor ?
No, it looks like operator error.
Quoted 3 lines
Quoted 3 lines
Any insight on how the bootldr starts up would be appreciated too.
thanks !
HTH,
gvb
[U-Boot-Users] u-boot.bin
Thanks gvb!
that definitely makes sense.
i see the u-boot.elf file is a lot bigger than the u-boot.bin. why is that ?
TIA !
Quoted 118 lines · Jerry Van Baren
From: Jerry Van Baren <[email protected]>
Subject: Re: [U-Boot-Users] u-boot.bin
To:fundu_1999at yahoo.com
Cc: u-boot-users at lists.sourceforge.net
Date: Wednesday, July 23, 2008, 6:24 AMQuoted 1 line · Fundu
ok, looks like
0x27051956is uboot magic number (from
start.S)Quoted 1 line
why is the
CFG_MONITOR_BASEpoints to the magic number?
Because that is the definition. From the file README:
-
CFG_MONITOR_BASE:
Physical start address of boot monitor
code (set by
make config files to be same as the text
base address
(TEXT_BASE) used when linking) - same asCFG_FLASH_BASEwhen booting from flash.Quoted 1 line
--- On Tue, 7/22/08, Fundu
Quoted 8 lines · <[email protected]> wrote:
Quoted 8 lines
From: Fundu <[email protected]>
Subject: [U-Boot-Users] u-boot.bin
To: u-boot-users at lists.sourceforge.net
Date: Tuesday, July 22, 2008, 3:44 PM
i'm working on taishan ppc440gx.now here's what i noticed. snippet of
u-boot.bin opened
Quoted 4 lines
Quoted 4 lines
with a hex editor.
fffbffff : 27051956
552d426f6f7420312e322e30This is the start, it should be (and probably is) at
fffc0000. Why does
your dump start at fff*bffff* (one byte before where it should)?Quoted 2 lines
Quoted 2 lines
'..VU-Boot 1.2.0
fffc000f:20284a756c2032322032303038202d20(Jul 22
Quoted 8 lines
Quoted 8 lines
2008 -
fffc001f:31343a31363a303729000000 00000000
14:16:07).......fffc002f: 00000000 00000000 00000000 00000000
................fffc003f: 00000000 00000000 00000000 00000000
................Quoted 5 lines
Quoted 5 lines
and my u-boot.map
.text
0xfffc00000x2aa9c
cpu/ppc4xx/start.o(.text)
.text0xfffc00000x2704
cpu/ppc4xx/start.oNote the start address is
fffc0000, not fffbffff.[snip]
Quoted 4 lines
Quoted 4 lines
couple of question.
1) this line ".text0xfffc00000x2aa9c" from u-boot.map
which means .text starts at0xfffc0000and withlength of
Quoted 1 line
Quoted 1 line
0x2aa9c. right ?Yes.
Quoted 1 line
Quoted 1 line
then looking at the hex dump of u-boot.bin looks
like
Quoted 1 line
Quoted 1 line
there's some data right after first word
(U-Boot
Quoted 2 lines
Quoted 2 lines
1.2.0...)
what am i missing ?The first word is the u-boot magic number, followed by the u-boot build
information (text).Quoted 1 line
Quoted 1 line
2) when ppc440gx reset it has
0xfffffffcin itsprogram
Quoted 1 line
Quoted 1 line
counter, the instr at this location is a branch
instr.
Quoted 1 line
Quoted 1 line
right ?
Yes. See
cpu/ppc4xx/start.SQuoted 1 line
Quoted 1 line
b) this branch should go to
TEXT_BASEwhich is
0xfffc0000Quoted 1 line
Quoted 1 line
in my case.
No, it jumps to the start of some CPU initialization code in the last 4K
page (when released from reset, only the last 4K page is mapped). That
code maps the rest of memory and jumps to the traditional PPC startup
code.0xfffc0000isn't involved.Quoted 1 line
Quoted 1 line
and that location contains
0x05195655. which lookslike a
Quoted 1 line
Quoted 1 line
"rlwimix" instr. (rotate left word
immediate then
Quoted 1 line
Quoted 1 line
mask insert). does this look start of monitor ?
No, it looks like operator error.
Quoted 3 lines
Quoted 3 lines
Any insight on how the bootldr starts up would be
appreciated too.
thanks !HTH,
gvb
[U-Boot-Users] u-boot.bin
Quoted 4 lines · Fundu
Thanks gvb!
that definitely makes sense.i see the u-boot.elf file is a lot bigger than the u-boot.bin. why is that ?
Hi Fundu,
Please bottom post.
Run "${CROSS_COMPILE}objdump -h u-boot" and you will see that there are lots of non-loaded segments (symbols, etc.) in there.
Run "${CROSS_COMPILE}strip -s u-boot -o=u-boot.strip" and you will see that u-boot.strip is approximately the same size as u-boot.bin. NOTE: I would *NOT* recommend stripping the ELF file unless you have a real need to do so.
gvb
[U-Boot-Users] u-boot.bin
Quoted 1 line
Please bottom post.
will do.
Quoted 6 lines
Run "${CROSS_COMPILE}strip -s u-boot -o=u-boot.strip" and you will see
that u-boot.strip is approximately the same size as u-boot.bin. NOTE: I
would *NOT* recommend stripping the ELF file unless you have a real need to do so.
that make it much clear thx. is the stripped out file of any use ? it won't work with gdb ? so then under what situation would you want to strip.
TIA.
[U-Boot-Users] u-boot.bin
Quoted 9 lines · Fundu
Quoted 1 line
Please bottom post.
will do.
Quoted 6 lines
Run "${CROSS_COMPILE}strip -s u-boot -o=u-boot.strip" and you will see
that u-boot.strip is approximately the same size as u-boot.bin. NOTE: I
would *NOT* recommend stripping the ELF file unless you have a real need to do so.
Quoted 3 lines
that make it much clear thx. is the stripped out file of any use ? it won't work with gdb ? so then under what situation would you want to strip.
TIA.
The two reasons I can think of for stripping elf files...
1) Make it smaller if you have to transport it on/over a size sensitive medium (floppy, modem). Maybe also to cram more on a limited size embedded file system.
2) Most proprietary packages strip their packages to try to prevent their "valuable intellectual property" from leaking out. (This has limited real value, but PHBs think it is a very valuable thing to do.)
To reiterate, there is almost no reason to strip elf files.
Best regards,
gvb
Quoted 1 line · In message <[email protected]> you wrote:
Is the
CFG_MONITOR_BASEthe location where the processor reads the first instruction after reset ? is that right ?
No. The processor starts the execution at the reset entry point. This may be 0x100 or 0xFFF00100 on some PowerPC processors or 0xFFFFFFFC on some others, or 0x00000000 on ARM, or ...
CFG_MONITOR_BASE is the start address of the U-Boot image in flash.
Best regards,
Wolfgang Denk
Signature · 7 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de You go slow, be gentle. It's no one-way street -- you know how you feel and that's all. It's how the girl feels too. Don't press. If the girl feels anything for you at all, you'll know. -- Kirk, "Charlie X", stardate 1535.8