ptdump.h 969 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* Copyright (C) 2014 ARM Ltd. */
  3. #ifndef __ASM_PTDUMP_H
  4. #define __ASM_PTDUMP_H
  5. #ifdef CONFIG_ARM_PTDUMP_CORE
  6. #include <linux/mm_types.h>
  7. #include <linux/seq_file.h>
  8. struct addr_marker {
  9. unsigned long start_address;
  10. char *name;
  11. };
  12. struct ptdump_info {
  13. struct mm_struct *mm;
  14. const struct addr_marker *markers;
  15. unsigned long base_addr;
  16. };
  17. void ptdump_walk_pgd(struct seq_file *s, struct ptdump_info *info);
  18. #ifdef CONFIG_ARM_PTDUMP_DEBUGFS
  19. #define EFI_RUNTIME_MAP_END SZ_1G
  20. void ptdump_debugfs_register(struct ptdump_info *info, const char *name);
  21. #else
  22. static inline void ptdump_debugfs_register(struct ptdump_info *info,
  23. const char *name) { }
  24. #endif /* CONFIG_ARM_PTDUMP_DEBUGFS */
  25. void ptdump_check_wx(void);
  26. #endif /* CONFIG_ARM_PTDUMP_CORE */
  27. #ifdef CONFIG_ARM_DEBUG_WX
  28. #define arm_debug_checkwx() ptdump_check_wx()
  29. #else
  30. #define arm_debug_checkwx() do { } while (0)
  31. #endif
  32. #endif /* __ASM_PTDUMP_H */