This is the mail archive of the
sid@sourceware.org
mailing list for the SID project.
[commit] Syscall number for SYS_reconfig
- From: Dave Brolley <brolley at redhat dot com>
- To: sid at sources dot redhat dot com
- Date: Tue, 06 Nov 2007 16:15:14 -0500
- Subject: [commit] Syscall number for SYS_reconfig
I've comitted the attached patch.
The syscall number for SYS_reconfig in libgloss/syscall.h is changing,
since it was not appropriate for it to be zero. However, legacy MeP code
expects it to be zero.
This patch allows zero to be recognized as SYS_reconfig for MeP as well
as whatever number has been assigned to it in libgloss/syscall.h.
Dave
sid/component/gloss/ChangeLog:
2007-11-06 Dave Brolley <brolley@redhat.com>
* gloss.cxx (target_to_host_syscall): Map syscall 0 to SYS_reconfig for
MeP.
sid/main/dynamic/ChangeLog
2007-11-06 Dave Brolley <brolley@redhat.com>
* mepCfg.cxx (MepBoardCfg): Set the gloss component's
syscall-numbering-scheme attribute to "mep".
Index: sid/component/gloss/gloss.cxx
===================================================================
RCS file: /cvs/src/src/sid/component/gloss/gloss.cxx,v
retrieving revision 1.22
diff -c -p -r1.22 gloss.cxx
*** sid/component/gloss/gloss.cxx 18 Oct 2006 18:38:26 -0000 1.22
--- sid/component/gloss/gloss.cxx 6 Nov 2007 21:02:00 -0000
*************** gloss32::target_to_host_syscall (int32 t
*** 771,776 ****
--- 771,783 ----
{
return target_syscall;
}
+ else if (syscall_numbering_scheme == "mep")
+ {
+ // syscall 0 is an alternate for SYS_reconfig on MeP
+ if (target_syscall == 0)
+ return libgloss::SYS_reconfig;
+ return target_syscall;
+ }
else if (syscall_numbering_scheme == "sh-compact")
{
switch(target_syscall)
Index: sid/main/dynamic/mepCfg.cxx
===================================================================
RCS file: /cvs/src/src/sid/main/dynamic/mepCfg.cxx,v
retrieving revision 1.2
diff -c -p -r1.2 mepCfg.cxx
*** sid/main/dynamic/mepCfg.cxx 19 Feb 2007 17:00:54 -0000 1.2
--- sid/main/dynamic/mepCfg.cxx 6 Nov 2007 21:02:00 -0000
*************** MepBoardCfg::MepBoardCfg (const string n
*** 1270,1275 ****
--- 1270,1276 ----
assert (cpu);
assert (sess);
gloss = new GlossCfg ("gloss", cpu, sess);
+ set (gloss, "syscall-numbering-scheme", "mep");
assert (gloss);
// control bus for peripheral items