, <port-arm@NetBSD.org>
From: None <Lin.Colin@iac.com.tw>
List: port-arm
Date: 04/30/2004 17:08:19
Hi there,
I tried to objdump my kernel and found that there are explicit LMAs in =
it, but ICE/CCS2 still can't load it onto the physical address =
0x10200000.
Is there any means to solve this problem? Without ICE, it's hard to =
debug my kernel before it can successful bring up com port driver.
Thanks and regards,
Colin
________________________________________________________________
> objdump --file-headers ./netbsd
=
=20
./netbsd: file format elf32-little
architecture: UNKNOWN!, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x10200000
> objdump --section-headers ./netbsd
=
=20
./netbsd: file format elf32-little
=
=20
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 0015c983 c0200000 10200000 00008000 2**5
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 link_set_sysctl_funcs 00000080 c035c984 1035c984 00164984 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 link_set_malloc_types 000000fc c035ca04 1035ca04 00164a04 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 link_set_evcnts 00000004 c035cb00 1035cb00 00164b00 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .start 00000000 10200000 10200000 0016c850 2**0
CONTENTS
5 .data 00004850 c0360000 10360000 00168000 2**2
CONTENTS, ALLOC, LOAD, DATA
6 .sbss 00000000 c0364850 c0364850 0016c850 2**0
CONTENTS
7 .bss 0003cf00 c0364850 c0364850 0016c850 2**2
ALLOC
8 .arm.atpcs 00000000 00000000 00000000 0016c850 2**0
CONTENTS, READONLY
9 .comment 00002f30 00000000 00000000 0016c850 2**0
CONTENTS, READONLY
10 .ident 00003ae7 00000000 00000000 0016f780 2**0
CONTENTS, READONLY
-----Original Message-----
From: Jason Thorpe [mailto:thorpej@wasabisystems.com]=20
Sent: Wednesday, April 28, 2004 4:53 AM
To: Lin, Colin(=D7=F9=CB=EF=E4=CC IAC)
Cc: port-arm@netbsd.org
Subject: Re: KERNEL_BASE_VIRT & KERNEL_BASE_PHYS
On Apr 26, 2004, at 6:55 PM, <Lin.Colin@iac.com.tw> wrote:
> When the compiled kernel, which is of ELF format, is loaded by ICE,=20
> ICE tries to put it to 0xc0200000 and then it produces an error=20
> because dram isn=A2=AE|t there.
>
> What=A2=AE|s wrong with my KERNEL_BASE_PHYS & KERNEL_BASE_VIRT =
setting?
Nothing is wrong with them. You need to adjust your linker script to=20
provide explicit LMAs so that the ICE will load them at the physical=20
address, rather than trying to load them at the VMA (virtual address).
-- Jason R. Thorpe <thorpej@wasabisystems.com>