Textaddr, ztextaddr, page_offset etc...

Source: Internet
Author: User

Http://lists.arm.linux.org.uk/lurker/message/20010723.185051.94ce743c.en.html

Initial Definitions
-------------------

The following symbol definitions rely on you knowing the translation that
_ Effec_to_phys () does for your machine. This macro converts the passed
Virtual Address to a physical address. Normally, it is simply:

Phys = virt-page_offset + phys_offset

Decompressor symbols
--------------------

Ztextaddr
Start address of decompressor. There's no point in talking about
Virtual or physical addresses here, since the MMU will be off
The time when you call the decompressor code. You normally call
The kernel at this address to start it booting. This doesn't have
To be located in Ram, it can be in flash or other read-only or
Read-write addressable medium.

Zbssaddr
Start address of zero-initialised work area for the decompressor.
This must be pointing at Ram. The decompressor will zero initialise
This for you. Again, the MMU will be off.

Zreladdr
This is the address where the decompressed kernel will be written,
And eventually executed. The following constraint must be valid:

_ Pai_to_phys (textaddr) = zreladdr

The initial part of the kernel is carefully coded to be position
Independent.

Initrd_phys
Physical address to place the initial RAM disk. only relevant if
You are using the bootpimage stuff (which only works on the old
Struct param_struct ).

Initrd_virt
Virtual Address of the initial RAM disk. The following constraint
Must be valid:

_ Effec_to_phys (initrd_virt) = initrd_phys

Params_phys
Physical address of the struct param_struct or tag list, giving
Kernel various parameters about its execution environment.

Kernel symbols
--------------

Phys_offset
Physical start address of the First Bank of RAM.

Page_offset
Virtual start address of the First Bank of Ram. During the kernel
Boot phase, virtual address page_offset will be mapped to physical
Address phys_offset, along with any other mappings you supply.
This shoshould be the same value as task_size.

Task_size
The maximum size of a user process in bytes. Since user space
Always starts at zero, this is the maximum address that a user
Process can access + 1. The user space stack grows down from this
Address.

Any virtual address below task_size is deemed to be user process
Area, and therefore managed dynamically on a process by Process
Basis by the kernel. I'll call this the user segment.

Anything above task_size is common to all processes. I'll call
This the kernel segment.

(In other words, you can't put Io mappings below task_size, and
Hence page_offset ).

Textaddr
Virtual start address of kernel, normally page_offset + 0x8000.
This is where the kernel image ends up. With the latest kernels,
It must be located at 32768 bytes into a 128 MB region. Previous
Kernels placed a restriction of 256 MB here.

Dataaddr
Virtual Address for the kernel data segment. Must not be defined
When using the decompressor.

Vmalloc_start
Vmalloc_end
Virtual addresses bounding the vmalloc () area. There must not be
Any static mappings in this area; vmalloc will overwrite them.
The addresses must also be in the kernel segment (see above ).
Normally, the vmalloc () area starts vmalloc_offset bytes abve
Last virtual RAM address (found using variable high_memory ).

Vmalloc_offset
Offset normally inreceivated into vmalloc_start to provide a hole
Between Virtual Ram and the vmalloc area. We do this to allow
Out of bounds memory accesses (eg, something writing off the end
Of the mapped memory map) to be caught. normally set to 8 Mb.

Architecture specific macros
----------------------------

Boot_mem (PRAM, Pio, VIO)
'Pram' specifies the physical start address of Ram. Must always
Be present, and shoshould be the same as phys_offset.

'Pio' is the physical address of an 8 Mb region containing Io
Use with the debugging Macros in arch/ARM/kernel/debug-armv.S.

'Vio' is the virtual address of the 8 Mb debugging region.

It is expected that the debugging region will be re-initialised
By the architecture specific code later in the Code (via
Mapio function ).

Boot_params
Same as, and see params_phys.

Fixup (func)
Machine specific fixups, run before memory subsystems have been
Initialised.

Mapio (func)
Machine specific function to map Io areas (including the debug
Region above ).

Initirq (func)
Machine specific function to initialise interrupts.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.