public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Faraz Shahbazker <fshahbazker@wavecomp.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	Chao-ying Fu <cfu@wavecomp.com>
Subject: Re: [EXTERNAL]Re: [PATCH] sim: mips: Add handlers to simulator monitor for unlink, lseek and stat
Date: Tue, 30 Mar 2021 22:17:14 -0400	[thread overview]
Message-ID: <YGPbqg02p6EfdDLd@vapier> (raw)
In-Reply-To: <MW3PR22MB22994D00370149D91FCEFE05D07D9@MW3PR22MB2299.namprd22.prod.outlook.com>

On 30 Mar 2021 21:20, Faraz Shahbazker wrote:
> On 3/28/21 8:24 PM, Mike Frysinger wrote:
> > On 28 Mar 2021 02:32, Faraz Shahbazker wrote:
> >> sim/mips/ChangeLog * interp.c (sim_monitor): Add switch entries
> >> for unlink (13), lseek (14), and stat (15).
> > 
> > what ABI is sim_monitor supposed to be supporting ?  it seems to be 
> > confused between IDT monitor & PMON, or at least out of sync with
> > the libgloss code.
> 
> Its a mixed bag but it seems to be in-sync with libgloss, as far as I understand.

the IDT & PMON syscalls in libgloss conflict:
idtmon.S:INDIRECT(open,6)
idtmon.S:INDIRECT(read,7)
idtmon.S:INDIRECT(write,8)
idtmon.S:INDIRECT(close,10)
pmon.S:INDIRECT(read,0)
pmon.S:INDIRECT(write,1)
pmon.S:INDIRECT(open,2)
pmon.S:INDIRECT(close,3)
pmon.S:INDIRECT(mon_ioctl,4)
pmon.S:INDIRECT(mon_printf,5)
pmon.S:INDIRECT(mon_vsprintf,6)
pmon.S:INDIRECT(mon_ttctl,7)
pmon.S:INDIRECT(mon_cliexit,8)

so normally it'd be impossible to support both

> PMON is partially re-mapped to IDT in interp.c:sim_open. MIPS moved sharply
> to its own Unified Hosting Interface Layer in the recent years and this particular
> patch arises out of the desire to maintain feature parity with UHI. 

i guess this is the trick that i missed: the PMON syscalls get hot patched
to reroute to the IDT syscall table.  thanks for the pointer.
-mike

  reply	other threads:[~2021-03-31  2:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-28  9:32 Faraz Shahbazker
2021-03-28 14:20 ` Faraz Shahbazker
2021-03-28 14:54 ` Mike Frysinger
2021-03-30 21:20   ` [EXTERNAL]Re: " Faraz Shahbazker
2021-03-31  2:17     ` Mike Frysinger [this message]
2021-03-30 21:21 ` [PATCH v1] " Faraz Shahbazker
2021-03-31  2:19   ` Mike Frysinger
2021-03-31  7:10     ` [PATCH v3] " Faraz Shahbazker
2021-04-01  2:33       ` Mike Frysinger
2021-04-02 20:36         ` Maciej W. Rozycki
2021-03-30 21:40 ` [PATCH v2] " Faraz Shahbazker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YGPbqg02p6EfdDLd@vapier \
    --to=vapier@gentoo.org \
    --cc=cfu@wavecomp.com \
    --cc=fshahbazker@wavecomp.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).