Linux physical memory and virtual memory settings (zt)

Source: Internet
Author: User

  1. Use the definition in the kernel source code
    Phys_offset: The physical starting address of the system memory, which is board-level. In include/ASM-arm/arch-xxx/memory. H
    Page_offset: the virtual starting address of the system memory. The system structure is related to 0xc0000000. In include/ASM-arm/memory. H
    Mem_size: system memory size, if the board level (include/ASM-arm/arch-xxx/xxx. h) if not specified, the default value of the architecture is 16 m (ARCH/ARM/kernel/setup. c)
    If there is no memory command passed in from the kernel command line, setup_arch () function (ARCH/ARM/kernel/setup. in file c) phys_offset and mem_size are used to specify the system memory and map it to page_offset.
  2. Set Through fixup Function
    Use the fixup_xxx () function (ARCH/ARM/Mach-xxx/arch. c) to set the starting address and size of the memory and map it to page_offset. This setting overwrites the setting of (1 ).
  3. Pass in through the kernel command line
    If the kernel command line contains a system memory-related command (MEM = xxxm [@ YYY]), it overwrites (1), (2) the ing described in uses XXX as the memory size, and YYY as the physical starting address of the memory (if any) is mapped to page_offset.
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: 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.