Chinaunix首页 | 论坛 | 博客
  • 博客访问: 607199
  • 博文数量: 197
  • 博客积分: 7001
  • 博客等级: 大校
  • 技术积分: 2155
  • 用 户 组: 普通用户
  • 注册时间: 2005-02-24 00:29
文章分类

全部博文(197)

文章存档

2022年(1)

2019年(2)

2015年(1)

2012年(100)

2011年(69)

2010年(14)

2007年(3)

2005年(7)

分类: LINUX

2010-05-15 18:15:20

 
__PAGE_OFFSET 早已经不是固定的0xC0000000了。
问题起源, 看lguest (2.6.23)发现要求page_offset的值,很是困惑,一查才发现。
 
 
2.6.34有如下
#define __PAGE_OFFSET  _AC(CONFIG_PAGE_OFFSET, UL)
 
查可知CONFIG_PAGE_OFFSET从2.6.16就有了。
 
 
 
2.6.34
 
arch/x86/Kconfig有如下内容
 
choice
 prompt "High Memory Support"
 default HIGHMEM4G if !X86_NUMAQ
 default HIGHMEM64G if X86_NUMAQ
 depends on X86_32
config NOHIGHMEM
 bool "off"
 depends on !X86_NUMAQ
 ---help---
   Linux can use up to 64 Gigabytes of physical memory on x86 systems.
   However, the address space of 32-bit x86 processors is only 4
   Gigabytes large. That means that, if you have a large amount of
   physical memory, not all of it can be "permanently mapped" by the
   kernel. The physical memory that's not permanently mapped is called
   "high memory".
   If you are compiling a kernel which will never run on a machine with
   more than 1 Gigabyte total physical RAM, answer "off" here (default
   choice and suitable for most users). This will result in a "3GB/1GB"
   split: 3GB are mapped so that each process sees a 3GB virtual memory
   space and the remaining part of the 4GB virtual memory space is used
   by the kernel to permanently map as much physical memory as
   possible.
   If the machine has between 1 and 4 Gigabytes physical RAM, then
   answer "4GB" here.
   If more than 4 Gigabytes is used then answer "64GB" here. This
   selection turns Intel PAE (Physical Address Extension) mode on.
   PAE implements 3-level paging on IA32 processors. PAE is fully
   supported by Linux, PAE mode is implemented on all recent Intel
   processors (Pentium Pro and better). NOTE: If you say "64GB" here,
   then the kernel will not boot on CPUs that don't support PAE!
   The actual amount of total physical memory will either be
   auto detected or can be forced by using a kernel command line option
   such as "mem=256M". (Try "man bootparam" or see the documentation of
   your boot loader (lilo or loadlin) about how to pass options to the
   kernel at boot time.)
   If unsure, say "off".
config HIGHMEM4G
 bool "4GB"
 depends on !X86_NUMAQ
 ---help---
   Select this if you have a 32-bit processor and between 1 and 4
   gigabytes of physical RAM.
config HIGHMEM64G
 bool "64GB"
 depends on !M386 && !M486
 select X86_PAE
 ---help---
   Select this if you have a 32-bit processor and more than 4
   gigabytes of physical RAM.
endchoice
choice
 depends on EXPERIMENTAL
 prompt "Memory split" if EMBEDDED
 default VMSPLIT_3G
 depends on X86_32
 ---help---
   Select the desired split between kernel and user memory.
   If the address range available to the kernel is less than the
   physical memory installed, the remaining memory will be available
   as "high memory". Accessing high memory is a little more costly
   than low memory, as it needs to be mapped into the kernel first.
   Note that increasing the kernel address space limits the range
   available to user programs, making the address space there
   tighter.  Selecting anything other than the default 3G/1G split
   will also likely make your kernel incompatible with binary-only
   kernel modules.
   If you are not absolutely sure what you are doing, leave this
   option alone!
 config VMSPLIT_3G
  bool "3G/1G user/kernel split"
 config VMSPLIT_3G_OPT
  depends on !X86_PAE
  bool "3G/1G user/kernel split (for full 1G low memory)"
 config VMSPLIT_2G
  bool "2G/2G user/kernel split"
 config VMSPLIT_2G_OPT
  depends on !X86_PAE
  bool "2G/2G user/kernel split (for full 2G low memory)"
 config VMSPLIT_1G
  bool "1G/3G user/kernel split"
endchoice
config PAGE_OFFSET
 hex
 default 0xB0000000 if VMSPLIT_3G_OPT
 default 0x80000000 if VMSPLIT_2G
 default 0x78000000 if VMSPLIT_2G_OPT
 default 0x40000000 if VMSPLIT_1G
 default 0xC0000000
 depends on X86_32
config HIGHMEM
 def_bool y
 depends on X86_32 && (HIGHMEM64G || HIGHMEM4G)
config X86_PAE
 bool "PAE (Physical Address Extension) Support"
 depends on X86_32 && !HIGHMEM4G
 ---help---
   PAE is required for NX support, and furthermore enables
   larger swapspace support for non-overcommit purposes. It
   has the cost of more pagetable lookup overhead, and also
   consumes more pagetable space per process.
阅读(1880) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~