From 2b66648a58e9dec40813b6e6422e349f849595b1 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Mon, 23 Oct 2023 23:23:08 +0300 Subject: [PATCH] syscall: handle arm and aarch64 architectures --- src/openpower/syscalls/__init__.py | 8 ++++++++ src/openpower/syscalls/__main__.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/openpower/syscalls/__init__.py b/src/openpower/syscalls/__init__.py index 5b349ea9..a7676a20 100644 --- a/src/openpower/syscalls/__init__.py +++ b/src/openpower/syscalls/__init__.py @@ -97,6 +97,12 @@ class Dispatcher: yield from sysnums["x86-64"]["common"].items() yield from sysnums["x86-64"]["64"].items() + def arm(sysnums): + yield from sysnums["arm"]["common"].items() + + def aarch64(sysnums): + yield from sysnums["generic"]["arch64"].items() + def ppc(sysnums): yield from sysnums["ppc"]["nospu"].items() yield from sysnums["ppc"]["common"].items() @@ -116,6 +122,8 @@ class Dispatcher: arch = { "i386": i386, "amd64": amd64, + "arm": arm, + "aarch64": aarch64, "ppc": ppc, "ppc64": ppc64, "riscv32": riscv32, diff --git a/src/openpower/syscalls/__main__.py b/src/openpower/syscalls/__main__.py index 3fadc90a..7c6e2bdf 100644 --- a/src/openpower/syscalls/__main__.py +++ b/src/openpower/syscalls/__main__.py @@ -265,7 +265,7 @@ def main(): choices=("riscv64", "ppc", "ppc64")) ecall_parser.add_argument("host", help="amd64 architecture", - choices=("amd64",)) + choices=("amd64", "arm", "aarch64")) ecall_parser.set_defaults(generate=ECallGenerator()) arguments = dict(vars(main_parser.parse_args())) -- 2.30.2