fixmap.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * OpenRISC Linux
  4. *
  5. * Linux architectural port borrowing liberally from similar works of
  6. * others. All original copyrights apply as per the original source
  7. * declaration.
  8. *
  9. * OpenRISC implementation:
  10. * Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com>
  11. * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
  12. * et al.
  13. */
  14. #ifndef __ASM_OPENRISC_FIXMAP_H
  15. #define __ASM_OPENRISC_FIXMAP_H
  16. /* Why exactly do we need 2 empty pages between the top of the fixed
  17. * addresses and the top of virtual memory? Something is using that
  18. * memory space but not sure what right now... If you find it, leave
  19. * a comment here.
  20. */
  21. #define FIXADDR_TOP ((unsigned long) (-2*PAGE_SIZE))
  22. #include <linux/kernel.h>
  23. #include <linux/bug.h>
  24. #include <asm/page.h>
  25. enum fixed_addresses {
  26. FIX_EARLYCON_MEM_BASE,
  27. FIX_TEXT_POKE0,
  28. __end_of_fixed_addresses
  29. };
  30. #define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT)
  31. /* FIXADDR_BOTTOM might be a better name here... */
  32. #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
  33. #define FIXMAP_PAGE_IO PAGE_KERNEL_NOCACHE
  34. extern void __set_fixmap(enum fixed_addresses idx,
  35. phys_addr_t phys, pgprot_t flags);
  36. #include <asm-generic/fixmap.h>
  37. #endif