[okl4-developer] Question about the init_memory() function for ARM side

Sean sean0920 at gmail.com
Thu Nov 27 22:29:27 EST 2008


Dear all

Currently, I have studied the design issue of address space of OKL4
2.1.1-patch9.
During tracing the booting sequence, the function init_memory() uses a lot
of defined value from linker script.

in the file /arch/arm/pistachio/include/memory.h

 68 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L68>
*/**
 69 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L69>
* * Symbols defined by linker script.*
 70 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L70>
* */*
 71 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L71>
 72 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L72>
*/* Kernel code and data */*
 73 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L73>
extern *"C"* {
 74 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L74>
extern char _start_rom[];
 75 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L75>
extern char _end_rom[];
 76 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L76>
extern char _start_ram[];
 77 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L77>
extern char _end_ram[];
 78 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L78>
extern char _start_init
<http://192.168.100.128/lxr/http/ident?v=OKL4-2.1.1-patch7;i=_start_init>[];
 79 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L79>
extern char _end_init
<http://192.168.100.128/lxr/http/ident?v=OKL4-2.1.1-patch7;i=_end_init>[];
 80 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L80>
extern char _end
<http://192.168.100.128/lxr/http/ident?v=OKL4-2.1.1-patch7;i=_end>[];
 81 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L81>
}
 82 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L82>
 83 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L83>
*/**
 84 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L84>
* * Wrapper macros to access linker symbols.*
 85 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L85>
* */*
 86 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L86>
 87 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L87>
#define start_rom
<http://192.168.100.128/lxr/http/ident?v=OKL4-2.1.1-patch7;i=start_rom>
((addr_t <http://192.168.100.128/lxr/http/ident?v=OKL4-2.1.1-patch7;i=addr_t>)
_start_rom)
 88 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L88>
#define start_ram
<http://192.168.100.128/lxr/http/ident?v=OKL4-2.1.1-patch7;i=start_ram>
((addr_t <http://192.168.100.128/lxr/http/ident?v=OKL4-2.1.1-patch7;i=addr_t>)
_start_ram)
 89 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L89>
#define end_rom
<http://192.168.100.128/lxr/http/ident?v=OKL4-2.1.1-patch7;i=end_rom>
((addr_t <http://192.168.100.128/lxr/http/ident?v=OKL4-2.1.1-patch7;i=addr_t>)
_end_rom)
 90 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L90>
#define end_ram
<http://192.168.100.128/lxr/http/ident?v=OKL4-2.1.1-patch7;i=end_ram>
((addr_t <http://192.168.100.128/lxr/http/ident?v=OKL4-2.1.1-patch7;i=addr_t>)
_end_ram)
 91 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L91>
#define start_init
<http://192.168.100.128/lxr/http/ident?v=OKL4-2.1.1-patch7;i=start_init>
((addr_t <http://192.168.100.128/lxr/http/ident?v=OKL4-2.1.1-patch7;i=addr_t>)
_start_init <http://192.168.100.128/lxr/http/ident?v=OKL4-2.1.1-patch7;i=_start_init>)
 92 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L92>
#define end_init
<http://192.168.100.128/lxr/http/ident?v=OKL4-2.1.1-patch7;i=end_init>
((addr_t <http://192.168.100.128/lxr/http/ident?v=OKL4-2.1.1-patch7;i=addr_t>)
_end_init <http://192.168.100.128/lxr/http/ident?v=OKL4-2.1.1-patch7;i=_end_init>)
 93 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L93>
#define end_kernel
<http://192.168.100.128/lxr/http/ident?v=OKL4-2.1.1-patch7;i=end_kernel>
((addr_t <http://192.168.100.128/lxr/http/ident?v=OKL4-2.1.1-patch7;i=addr_t>)
_end <http://192.168.100.128/lxr/http/ident?v=OKL4-2.1.1-patch7;i=_end>)
 94 <http://192.168.100.128/lxr/http/source/arch/arm/pistachio/include/memory.h?v=OKL4-2.1.1-patch7#L94>


I want to know the meaning of these variables. Especially _start_init,
_end_init, _end.
What's the difference between theses variables?

Thanks a lot!

Best Regards,
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.okl4.org/pipermail/developer/attachments/20081127/aee57300/attachment.htm 


More information about the Developer mailing list