spaces.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 1994 - 1999, 2000, 03, 04 Ralf Baechle
  7. * Copyright (C) 2000, 2002 Maciej W. Rozycki
  8. * Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc.
  9. */
  10. #ifndef _ASM_MACH_GENERIC_SPACES_H
  11. #define _ASM_MACH_GENERIC_SPACES_H
  12. #ifdef CONFIG_32BIT
  13. #define CAC_BASE 0x80000000
  14. #define IO_BASE 0xa0000000
  15. #define UNCAC_BASE 0xa0000000
  16. #ifndef MAP_BASE
  17. #define MAP_BASE 0xc0000000
  18. #endif
  19. /*
  20. * This handles the memory map.
  21. * We handle pages at KSEG0 for kernels with 32 bit address space.
  22. */
  23. #ifndef PAGE_OFFSET
  24. #define PAGE_OFFSET 0x80000000UL
  25. #endif
  26. /*
  27. * Memory above this physical address will be considered highmem.
  28. */
  29. #ifndef HIGHMEM_START
  30. #define HIGHMEM_START 0x20000000UL
  31. #endif
  32. #endif /* CONFIG_32BIT */
  33. #ifdef CONFIG_64BIT
  34. /*
  35. * This handles the memory map.
  36. */
  37. #ifndef PAGE_OFFSET
  38. #ifdef CONFIG_DMA_NONCOHERENT
  39. #define PAGE_OFFSET 0x9800000000000000UL
  40. #else
  41. #define PAGE_OFFSET 0xa800000000000000UL
  42. #endif
  43. #endif
  44. /*
  45. * Memory above this physical address will be considered highmem.
  46. * Fixme: 59 bits is a fictive number and makes assumptions about processors
  47. * in the distant future. Nobody will care for a few years :-)
  48. */
  49. #ifndef HIGHMEM_START
  50. #define HIGHMEM_START (1UL << 59UL)
  51. #endif
  52. #ifndef CAC_BASE
  53. #ifdef CONFIG_DMA_NONCOHERENT
  54. #define CAC_BASE 0x9800000000000000UL
  55. #else
  56. #define CAC_BASE 0xa800000000000000UL
  57. #endif
  58. #endif
  59. #ifndef IO_BASE
  60. #define IO_BASE 0x9000000000000000UL
  61. #endif
  62. #ifndef UNCAC_BASE
  63. #define UNCAC_BASE 0x9000000000000000UL
  64. #endif
  65. #ifndef MAP_BASE
  66. #define MAP_BASE 0xc000000000000000UL
  67. #endif
  68. #define TO_PHYS(x) ( ((x) & TO_PHYS_MASK))
  69. #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK))
  70. #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK))
  71. #endif /* CONFIG_64BIT */
  72. #endif /* __ASM_MACH_GENERIC_SPACES_H */