[hppa-linux] Gateway instructions

Mike Shaver shaver@netscape.com
Thu, 18 Mar 1999 16:51:09 -0500

Cary Coutant wrote:
> When a page's access rights are 4, 5, 6, or 7, a gateway instruction on
> that page causes the privilege promotion. Most HP-UX system calls are
> branches to a common gateway instruction on a gateway page in the fourth
> quadrant. This gateway instruction then branches to a common syscall
> entry sequence that ultimately switches on the syscall number passed in a
> GR. Some "lightweight" syscalls may be implemented with their own
> gateways.

OK, so you don't have a spot on the page for each syscall?  I was
thinking that we'd want to do that, since we're going to use the whole
page anyway and it would make things a little quicker by eliminating the
later dispatch-by-syscall step.

I presume that the syscall gateway page layout is part of the HP-UX
kernel/user ABI though, so we'll be following your lead for SOM/HP-ELF
binaries anyway.

> The B bit is not a problem as long as the delay slot of the branch to the
> gateway is either nullified or filled in with a non-branch instruction.
> For example,
>     LDIL L'GATEWAY,%r1
>     BLE  R'GATEWAY(%sr7,%r1)
>     LDO  sycallnum,%r22

Someday (maybe today, if I get all my work done =) ), I'll learn to read


368177.00 314980.91