memory.h
上传用户:szlgq88
上传日期:2009-04-28
资源大小:48287k
文件大小:2k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. /*
  2.  *  linux/include/asm-arm/arch-ebsa285/memory.h
  3.  *
  4.  *  Copyright (C) 1996-1999 Russell King.
  5.  *
  6.  * This program is free software; you can redistribute it and/or modify
  7.  * it under the terms of the GNU General Public License version 2 as
  8.  * published by the Free Software Foundation.
  9.  *
  10.  *  Changelog:
  11.  *   20-Oct-1996 RMK Created
  12.  *   31-Dec-1997 RMK Fixed definitions to reduce warnings.
  13.  *   17-May-1998 DAG Added __virt_to_bus and __bus_to_virt functions.
  14.  *   21-Nov-1998 RMK Changed __virt_to_bus and __bus_to_virt to macros.
  15.  *   21-Mar-1999 RMK Added PAGE_OFFSET for co285 architecture.
  16.  * Renamed to memory.h
  17.  * Moved PAGE_OFFSET and TASK_SIZE here
  18.  */
  19. #ifndef __ASM_ARCH_MEMORY_H
  20. #define __ASM_ARCH_MEMORY_H
  21. #include <linux/config.h>
  22. #if defined(CONFIG_FOOTBRIDGE_ADDIN)
  23. /*
  24.  * If we may be using add-in footbridge mode, then we must
  25.  * use the out-of-line translation that makes use of the
  26.  * PCI BAR
  27.  */
  28. #ifndef __ASSEMBLY__
  29. extern unsigned long __virt_to_bus(unsigned long);
  30. extern unsigned long __bus_to_virt(unsigned long);
  31. #endif
  32. #elif defined(CONFIG_FOOTBRIDGE_HOST)
  33. #define __virt_to_bus(x) ((x) - 0xe0000000)
  34. #define __bus_to_virt(x) ((x) + 0xe0000000)
  35. #else
  36. #error "Undefined footbridge mode"
  37. #endif
  38. #if defined(CONFIG_ARCH_FOOTBRIDGE)
  39. /* Task size and page offset at 3GB */
  40. #define TASK_SIZE (0xbf000000UL)
  41. #define PAGE_OFFSET (0xc0000000UL)
  42. #elif defined(CONFIG_ARCH_CO285)
  43. /* Task size and page offset at 1.5GB */
  44. #define TASK_SIZE (0x5f000000UL)
  45. #define PAGE_OFFSET (0x60000000UL)
  46. #else
  47. #error "Undefined footbridge architecture"
  48. #endif
  49. /*
  50.  * Physical DRAM offset.
  51.  */
  52. #define PHYS_OFFSET (0x00000000UL)
  53. /*
  54.  * This decides where the kernel will search for a free chunk of vm
  55.  * space during mmap's.
  56.  */
  57. #define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3)
  58. #endif