From: Sandipan Das Date: Thu, 7 Jun 2018 14:46:12 +0000 (+0530) Subject: arch-power: Update hello test program X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e52dbcb76a99411a02db151303ae59bbbcc4a302;p=gem5.git arch-power: Update hello test program This updates the hello test program binary to an equivalent 64-bit little endian executable. Since this binary is built with a recent toolchain, the kernel version provided by the uname system call is ramped up to be able to meet the minimum version required by glibc. This binary also uses the readlink system call and the Move From Time Base (mftb) instruction. So, placeholder code is added for these. Change-Id: I645b344e8582f938711b75488bd25899c374cca3 Signed-off-by: Sandipan Das --- diff --git a/src/arch/power/isa/decoder.isa b/src/arch/power/isa/decoder.isa index 6b2ebf4fe..cd18fa9b5 100644 --- a/src/arch/power/isa/decoder.isa +++ b/src/arch/power/isa/decoder.isa @@ -707,6 +707,7 @@ decode PO default Unknown::unknown() { 0x100: mflr({{ Rt = LR; }}); 0x120: mfctr({{ Rt = CTR; }}); 0x32f: mftar({{ Rt = TAR; }}); + 0x188: mftb({{ Rt = 0; }}); // FIXME } 467: decode SPR { 0x20: mtxer({{ XER = Rs; }}); diff --git a/src/arch/power/linux/process.cc b/src/arch/power/linux/process.cc index 801274969..0714c8752 100644 --- a/src/arch/power/linux/process.cc +++ b/src/arch/power/linux/process.cc @@ -57,7 +57,7 @@ unameFunc(SyscallDesc *desc, int callnum, Process *process, strcpy(name->sysname, "Linux"); strcpy(name->nodename, "sim.gem5.org"); - strcpy(name->release, "3.0.0"); + strcpy(name->release, "4.0.0"); strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003"); strcpy(name->machine, "power"); @@ -151,7 +151,7 @@ SyscallDesc PowerLinuxProcess::syscallDescs[] = { /* 82 */ SyscallDesc("reserved#82", unimplementedFunc), /* 83 */ SyscallDesc("symlink", unimplementedFunc), /* 84 */ SyscallDesc("unused#84", unimplementedFunc), - /* 85 */ SyscallDesc("readlink", unimplementedFunc), + /* 85 */ SyscallDesc("readlink", readlinkFunc), /* 86 */ SyscallDesc("uselib", unimplementedFunc), /* 87 */ SyscallDesc("swapon", gethostnameFunc), /* 88 */ SyscallDesc("reboot", unimplementedFunc), diff --git a/tests/test-progs/hello/bin/power/linux/hello b/tests/test-progs/hello/bin/power/linux/hello index 6619ae37f..8ab68ac04 100755 Binary files a/tests/test-progs/hello/bin/power/linux/hello and b/tests/test-progs/hello/bin/power/linux/hello differ