Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Jurij Smakov <jurij@lokmail.net>
To: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] 720 - some progress
Date: Thu, 27 Sep 2001 10:42:25 -0400	[thread overview]
Message-ID: <200109271442.KAA14125@mail.lokmail.net> (raw)

Hi!

I hope I've got it right. It only emulates MFCTL and only when the
source control register is 27. It turns out, that pt_regs does not
have a member for cr26 and adding one does not look like an easy
task. 

Jurij.

--- linux-2.4.9-pa24/arch/parisc/kernel/traps.c Wed Sep 19 12:02:30 2001
+++ linux/arch/parisc/kernel/traps.c    Thu Sep 27 16:16:54 2001
@@ -273,6 +273,7 @@
 {
        unsigned long fault_address = 0;
        unsigned long fault_space = 0;
+       int fromcr,togr;
        struct siginfo si;
 #ifdef CONFIG_KWDB
        struct save_state ssp;
@@ -363,6 +364,17 @@
                si.si_code = ILL_PRVOPC;
                goto give_sigill;
        case 11:
+               if(!(regs->iir & 0xfc000000) && (((regs->iir & 0x1fe0)>>5) == 0x45)) {
+                 /* This is MFCTL instruction */
+                 fromcr = (regs->iir & 0x03e00000)>>21;
+                 togr = (regs->iir & 0x1f);
+                 /* Emulate the instruction if the read is from cr27 */
+                 if(fromcr == 27) {
+                   regs->gr[togr] = regs->cr27;
+                   return;
+                 }
+               }
+               /* Something else is wrong */
                die_if_kernel("Privileged register - shouldn't happen!", regs, code);
                si.si_code = ILL_PRVREG;
        give_sigill:

             reply	other threads:[~2001-09-27 14:42 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-27 14:42 Jurij Smakov [this message]
2001-09-28  8:49 ` [parisc-linux] 720 - some progress Jochen Friedrich
2001-09-28  9:19   ` Matthew Wilcox
2001-09-28  8:54 ` Matthew Wilcox
2001-09-29  6:00   ` Albert Strasheim
2001-09-29  8:30     ` Albert Strasheim
2001-09-29 10:01       ` Albert Strasheim
2001-09-29 11:17     ` Jochen Friedrich
2001-09-29 11:45       ` Albert Strasheim
2001-09-29 13:23         ` Jochen Friedrich
2001-09-29 18:36     ` Michael S.Zick
2001-09-29 22:19       ` Michael S.Zick
  -- strict thread matches above, loose matches on Subject: below --
2001-10-01 16:06 Michael S. Zick
2001-09-30  7:12 John Marvin
     [not found] <200109280925.FAA18777@mail.lokmail.net>
2001-09-28 16:24 ` Albert Strasheim
2001-09-28 18:48   ` Jochen Friedrich
2001-09-29 17:48     ` Carlos O'Donell Jr.
2001-09-27 16:32 Jurij Smakov
2001-09-27 19:18 ` Albert Strasheim
2001-09-27 12:23 Jurij Smakov
2001-09-27 13:04 ` Albert Strasheim
2001-09-27 13:45 ` Matthew Wilcox
2001-09-27 10:03 Jurij Smakov
2001-09-27 11:15 ` Jochen Friedrich
2001-09-27  9:09 Jurij Smakov
2001-09-27 11:11 ` Jochen Friedrich
2001-09-26 22:26 Jochen Friedrich
2001-09-27  0:07 ` Albert Strasheim

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=200109271442.KAA14125@mail.lokmail.net \
    --to=jurij@lokmail.net \
    --cc=parisc-linux@lists.parisc-linux.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