Skip to content

Commit

Permalink
_drgn_util.platform: add finit_module to SYS
Browse files Browse the repository at this point in the history
This will be used by an upcoming helper.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
  • Loading branch information
osandov committed Sep 16, 2024
1 parent 4b17e28 commit a838853
Showing 1 changed file with 122 additions and 29 deletions.
151 changes: 122 additions & 29 deletions _drgn_util/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,127 @@
elif NORMALIZED_MACHINE_NAME == "sun4u":
NORMALIZED_MACHINE_NAME = "sparc64"


SYS = {
"aarch64": {"bpf": 280, "kexec_file_load": 294, "perf_event_open": 241},
"alpha": {"bpf": 515, "perf_event_open": 493},
"arc": {"bpf": 280, "kexec_file_load": 294, "perf_event_open": 241},
"arm": {"bpf": 386, "kexec_file_load": 401, "perf_event_open": 364},
"csky": {"bpf": 280, "kexec_file_load": 294, "perf_event_open": 241},
"hexagon": {"bpf": 280, "kexec_file_load": 294, "perf_event_open": 241},
"i386": {"bpf": 357, "perf_event_open": 336},
"loongarch": {"bpf": 280, "kexec_file_load": 294, "perf_event_open": 241},
"loongarch64": {"bpf": 280, "kexec_file_load": 294, "perf_event_open": 241},
"m68k": {"bpf": 354, "perf_event_open": 332},
"microblaze": {"bpf": 387, "perf_event_open": 366},
# TODO: mips is missing here because I don't know how to distinguish
# between the o32 and n32 ABIs.
"mips64": {"bpf": 315, "perf_event_open": 292},
"nios2": {"bpf": 280, "kexec_file_load": 294, "perf_event_open": 241},
"openrisc": {"bpf": 280, "kexec_file_load": 294, "perf_event_open": 241},
"parisc": {"bpf": 341, "kexec_file_load": 355, "perf_event_open": 318},
"parisc64": {"bpf": 341, "kexec_file_load": 355, "perf_event_open": 318},
"ppc": {"bpf": 361, "perf_event_open": 319},
"ppc64": {"bpf": 361, "perf_event_open": 319},
"riscv32": {"bpf": 280, "kexec_file_load": 294, "perf_event_open": 241},
"riscv64": {"bpf": 280, "kexec_file_load": 294, "perf_event_open": 241},
"s390": {"bpf": 351, "kexec_file_load": 381, "perf_event_open": 331},
"s390x": {"bpf": 351, "kexec_file_load": 381, "perf_event_open": 331},
"sh": {"bpf": 375, "perf_event_open": 336},
"sparc": {"bpf": 349, "perf_event_open": 327},
"sparc64": {"bpf": 349, "perf_event_open": 327},
"x86_64": {"bpf": 321, "kexec_file_load": 320, "perf_event_open": 298},
"xtensa": {"bpf": 340, "perf_event_open": 327},
"alpha": {
"bpf": 515,
"finit_module": 507,
"perf_event_open": 493,
},
"arc": {
"bpf": 280,
"finit_module": 273,
"kexec_file_load": 294,
"perf_event_open": 241,
},
"arm": {
"bpf": 386,
"finit_module": 379,
"kexec_file_load": 401,
"perf_event_open": 364,
},
"csky": {
"bpf": 280,
"finit_module": 273,
"kexec_file_load": 294,
"perf_event_open": 241,
},
"i386": {
"bpf": 357,
"finit_module": 350,
"perf_event_open": 336,
},
"m68k": {
"bpf": 354,
"finit_module": 348,
"perf_event_open": 332,
},
"microblaze": {
"bpf": 387,
"finit_module": 380,
"perf_event_open": 366,
},
"mips64": {
"bpf": 315,
"finit_module": 307,
"perf_event_open": 292,
},
"nios2": {
"bpf": 280,
"finit_module": 273,
"kexec_file_load": 294,
"perf_event_open": 241,
},
"parisc": {
"bpf": 341,
"finit_module": 333,
"kexec_file_load": 355,
"perf_event_open": 318,
},
"parisc64": {
"bpf": 341,
"finit_module": 333,
"kexec_file_load": 355,
"perf_event_open": 318,
},
"ppc": {
"bpf": 361,
"finit_module": 353,
"perf_event_open": 319,
},
"ppc64": {
"bpf": 361,
"finit_module": 353,
"perf_event_open": 319,
},
"riscv32": {
"bpf": 280,
"finit_module": 273,
"kexec_file_load": 294,
"perf_event_open": 241,
},
"riscv64": {
"bpf": 280,
"finit_module": 273,
"kexec_file_load": 294,
"perf_event_open": 241,
},
"s390": {
"bpf": 351,
"finit_module": 344,
"kexec_file_load": 381,
"perf_event_open": 331,
},
"s390x": {
"bpf": 351,
"finit_module": 344,
"kexec_file_load": 381,
"perf_event_open": 331,
},
"sh": {
"bpf": 375,
"finit_module": 368,
"perf_event_open": 336,
},
"sparc": {
"bpf": 349,
"finit_module": 342,
"perf_event_open": 327,
},
"sparc64": {
"bpf": 349,
"finit_module": 342,
"perf_event_open": 327,
},
"x86_64": {
"bpf": 321,
"finit_module": 313,
"kexec_file_load": 320,
"perf_event_open": 298,
},
"xtensa": {
"bpf": 340,
"finit_module": 332,
"perf_event_open": 327,
},
}.get(NORMALIZED_MACHINE_NAME, {})

0 comments on commit a838853

Please sign in to comment.