1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2014 ARM Ltd.
8 #include <linux/ptdump.h>
10 #ifdef CONFIG_PTDUMP_CORE
12 #include <linux/mm_types.h>
13 #include <linux/seq_file.h>
16 unsigned long start_address;
22 const struct addr_marker *markers;
23 unsigned long base_addr;
26 struct ptdump_prot_bits {
33 struct ptdump_pg_level {
34 const struct ptdump_prot_bits *bits;
41 * The page dumper groups page table entries of the same type into a single
42 * description. It uses pg_state to track the range information while
43 * iterating over the pte entries. When the continuity is broken it then
44 * dumps out a description of the range.
46 struct ptdump_pg_state {
47 struct ptdump_state ptdump;
48 struct ptdump_pg_level *pg_level;
50 const struct addr_marker *marker;
51 const struct mm_struct *mm;
52 unsigned long start_address;
56 unsigned long wx_pages;
57 unsigned long uxn_pages;
60 void ptdump_walk(struct seq_file *s, struct ptdump_info *info);
61 void note_page(struct ptdump_state *pt_st, unsigned long addr, int level,
63 #ifdef CONFIG_PTDUMP_DEBUGFS
64 #define EFI_RUNTIME_MAP_END DEFAULT_MAP_WINDOW_64
65 void __init ptdump_debugfs_register(struct ptdump_info *info, const char *name);
67 static inline void ptdump_debugfs_register(struct ptdump_info *info,
69 #endif /* CONFIG_PTDUMP_DEBUGFS */
71 static inline void note_page(struct ptdump_state *pt_st, unsigned long addr,
72 int level, u64 val) { }
73 #endif /* CONFIG_PTDUMP_CORE */
75 #endif /* __ASM_PTDUMP_H */