memory.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:1k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /*
  2.  * linux/include/asm-arm/arch-shark/memory.h
  3.  *
  4.  * by Alexander Schulz
  5.  *
  6.  * derived from:
  7.  * linux/include/asm-arm/arch-ebsa110/memory.h
  8.  * Copyright (c) 1996-1999 Russell King.
  9.  */
  10. #ifndef __ASM_ARCH_MEMORY_H
  11. #define __ASM_ARCH_MEMORY_H
  12. /*
  13.  * Task size: 3GB
  14.  */
  15. #define TASK_SIZE (0xc0000000UL)
  16. #define TASK_SIZE_26 (0x04000000UL)
  17. /*
  18.  * This decides where the kernel will search for a free chunk of vm
  19.  * space during mmap's.
  20.  */
  21. #define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
  22. /*
  23.  * Page offset: = 3GB
  24.  */
  25. #define PAGE_OFFSET (0xC0000000UL)
  26. #define PHYS_OFFSET     (0x08000000UL)
  27. #define __virt_to_phys__is_a_macro
  28. #define __phys_to_virt__is_a_macro
  29. #define __virt_to_phys(vpage) (vpage - PAGE_OFFSET + PHYS_OFFSET)
  30. #define __phys_to_virt(ppage) (ppage - PHYS_OFFSET + PAGE_OFFSET)
  31. #define __virt_to_bus__is_a_macro
  32. #define __virt_to_bus(x) __virt_to_phys(x)
  33. #define __bus_to_virt__is_a_macro
  34. #define __bus_to_virt(x) __phys_to_virt(x)
  35. #define PHYS_TO_NID(addr) (0)
  36. #endif