arch-power: Update hello test program
authorSandipan Das <sandipan@linux.vnet.ibm.com>
Thu, 7 Jun 2018 14:46:12 +0000 (20:16 +0530)
committerSandipan Das <sandipan@linux.vnet.ibm.com>
Thu, 7 Jun 2018 14:46:12 +0000 (20:16 +0530)
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 <sandipan@linux.vnet.ibm.com>
src/arch/power/isa/decoder.isa
src/arch/power/linux/process.cc
tests/test-progs/hello/bin/power/linux/hello

index 6b2ebf4fe4d14873f9cca9c06bfbda84898d0923..cd18fa9b5aa50cead2a644f7ed8e9b65e06b1a9b 100644 (file)
@@ -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; }});
index 801274969ed0686a5e666d8fb8b483e9fd02108f..0714c8752de6469560e6905eb81040afd853b2f2 100644 (file)
@@ -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),
index 6619ae37f23220b26a5def757049f9d6ba67a516..8ab68ac04b674b19a6353a30ed9674366a3fa31e 100755 (executable)
Binary files a/tests/test-progs/hello/bin/power/linux/hello and b/tests/test-progs/hello/bin/power/linux/hello differ