vaddrs.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _SPARC_VADDRS_H
  3. #define _SPARC_VADDRS_H
  4. #include <asm/head.h>
  5. /*
  6. * asm/vaddrs.h: Here we define the virtual addresses at
  7. * which important things will be mapped.
  8. *
  9. * Copyright (C) 1995 David S. Miller ([email protected])
  10. * Copyright (C) 2000 Anton Blanchard ([email protected])
  11. */
  12. #define SRMMU_MAXMEM 0x0c000000
  13. #define SRMMU_NOCACHE_VADDR (KERNBASE + SRMMU_MAXMEM)
  14. /* = 0x0fc000000 */
  15. /* XXX Empiricals - this needs to go away - KMW */
  16. #define SRMMU_MIN_NOCACHE_PAGES (550)
  17. #define SRMMU_MAX_NOCACHE_PAGES (1280)
  18. /* The following constant is used in mm/srmmu.c::srmmu_nocache_calcsize()
  19. * to determine the amount of memory that will be reserved as nocache:
  20. *
  21. * 256 pages will be taken as nocache per each
  22. * SRMMU_NOCACHE_ALCRATIO MB of system memory.
  23. *
  24. * limits enforced: nocache minimum = 256 pages
  25. * nocache maximum = 1280 pages
  26. */
  27. #define SRMMU_NOCACHE_ALCRATIO 64 /* 256 pages per 64MB of system RAM */
  28. #ifndef __ASSEMBLY__
  29. #include <asm/kmap_size.h>
  30. enum fixed_addresses {
  31. FIX_HOLE,
  32. #ifdef CONFIG_HIGHMEM
  33. FIX_KMAP_BEGIN,
  34. FIX_KMAP_END = (KM_MAX_IDX * NR_CPUS),
  35. #endif
  36. __end_of_fixed_addresses
  37. };
  38. #endif
  39. /* Leave one empty page between IO pages at 0xfd000000 and
  40. * the top of the fixmap.
  41. */
  42. #define FIXADDR_TOP (0xfcfff000UL)
  43. #define FIXADDR_SIZE ((FIX_KMAP_END + 1) << PAGE_SHIFT)
  44. #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
  45. #define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))
  46. #define SUN4M_IOBASE_VADDR 0xfd000000 /* Base for mapping pages */
  47. #define IOBASE_VADDR 0xfe000000
  48. #define IOBASE_END 0xfe600000
  49. #define KADB_DEBUGGER_BEGVM 0xffc00000 /* Where kern debugger is in virt-mem */
  50. #define KADB_DEBUGGER_ENDVM 0xffd00000
  51. #define DEBUG_FIRSTVADDR KADB_DEBUGGER_BEGVM
  52. #define DEBUG_LASTVADDR KADB_DEBUGGER_ENDVM
  53. #define LINUX_OPPROM_BEGVM 0xffd00000
  54. #define LINUX_OPPROM_ENDVM 0xfff00000
  55. #define DVMA_VADDR 0xfff00000 /* Base area of the DVMA on suns */
  56. #define DVMA_END 0xfffc0000
  57. #endif /* !(_SPARC_VADDRS_H) */