From e7be3e9e898c04532a3e7fb1bfc49df63d32a4c0 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