* Re: [parisc-linux] commit FP coproc enable code?
1999-10-01 19:12 [parisc-linux] [grundler@puffin.external.hp.com: commit FP coproc enable code?] Phil Schwan
@ 1999-10-01 18:56 ` Philipp Rumpf
1999-10-01 20:52 ` Grant Grundler
0 siblings, 1 reply; 4+ messages in thread
From: Philipp Rumpf @ 1999-10-01 18:56 UTC (permalink / raw)
To: Grant Grundler; +Cc: parisc-linux
> o FP enable via writing cr10 (CCR) register. Not doing this the "right"
> way - which is to use PDC_COPROC but it will work for all PA1.1
> platforms.
Why is not using PDC_COPROC not the right way ? It should do exactly the same
thing, modulo machines without FPU (for which we do not provide emulation
anyway) and firmware bugs ...
> ===================================================================
> RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/head.S,v
> retrieving revision 1.32
> diff -u -r1.32 head.S
> --- head.S 1999/08/31 19:25:23 1.32
> +++ head.S 1999/09/30 22:43:03
I would prefer to do this somewhere after the kernel is loaded, in C, surrounded
by a pair of printks, so we know whether it is this that hangs the machine.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [parisc-linux] [grundler@puffin.external.hp.com: commit FP coproc enable code?]
@ 1999-10-01 19:12 Phil Schwan
1999-10-01 18:56 ` [parisc-linux] commit FP coproc enable code? Philipp Rumpf
0 siblings, 1 reply; 4+ messages in thread
From: Phil Schwan @ 1999-10-01 19:12 UTC (permalink / raw)
To: parisc-linux
[-- Attachment #1: Type: text/plain, Size: 99 bytes --]
[ I think I've fixed the mailing list; here's the mails from Grant
that it was dropping --phil ]
[-- Attachment #2: Forwarded message from grundler@puffin.external.hp.com --]
[-- Type: message/rfc822, Size: 7101 bytes --]
From: grundler@puffin.external.hp.com
To: parisc-linux@thepuffingroup.com
Subject: commit FP coproc enable code?
Date: Fri, 1 Oct 1999 11:25:50 -0600
Message-ID: <199910011724.LAA09983@puffin.external.hp.com>
[ 4th try...I'm not getting a copy back from the reflector...]
Hi all,
I'd like to commit changes to enable FP coproc for PA 1.1 arch.
Any objections?
o FP enable via writing cr10 (CCR) register. Not doing this the "right"
way - which is to use PDC_COPROC but it will work for all PA1.1
platforms.
o remove extraneous console output. I want to post console output
for my next problem: kernel panic when trying to kill idle_task.
thanks,
grant
Index: linux/arch/parisc/kernel/head.S
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/head.S,v
retrieving revision 1.32
diff -u -r1.32 head.S
--- head.S 1999/08/31 19:25:23 1.32
+++ head.S 1999/09/30 22:43:03
@@ -295,9 +295,20 @@
ldil L%KERNEL_PSW,%r10
ldo R%KERNEL_PSW(%r10),%r10
mtctl %r10,%ipsw
-
- mtctl %r0,%cr17 ; Clear two-level IIA Space Queue
- mtctl %r0,%cr17 ; effectively setting kernel space.
+
+ ; Just assume we have an FP coprocessor and assume firmware
+ ; did not enable it.
+ ; Pass what firmware set CCR (cr10) to start_parisc() and print it.
+ mfctl %cr10, %arg2
+
+#define FP_COPROC_ENABLE 0xc0
+ ldil L%FP_COPROC_ENABLE,%r10
+ ldo R%FP_COPROC_ENABLE(%r10),%r10
+ mtctl %r10,%cr10 ; CCR
+
+
+ mtctl %r0,%cr17 ; Clear two-level IIA Space Queue
+ mtctl %r0,%cr17 ; effectively setting kernel space.
ldil L%start_parisc,%r10
ldo R%start_parisc(%r10),%r10
Index: linux/arch/parisc/kernel/setup.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/setup.c,v
retrieving revision 1.59
diff -u -r1.59 setup.c
--- setup.c 1999/09/28 22:34:57 1.59
+++ setup.c 1999/09/30 22:43:15
@@ -587,13 +587,16 @@
#define PA(x) (void *)((unsigned long)(x)&~0xc0000000)
extern int pdc_call_x(void *,...);
+#if 0
static char iodc_tbuf[4096] __attribute__((aligned(4096))) = "Hallo\n";
static char iodc_rbuf[4096] __attribute__((aligned(4096))) = "Hallo\n";
+#endif
__initfunc(void start_parisc(unsigned long new_memory_start,
- char *bootloader_command_line))
+ char *bootloader_command_line,
+ unsigned long ccr))
{
-#if 1
+#if 0
pdc_call_x(
(void *)PAGE0->mem_cons.hpa, ENTRY_IO_COUT,
PAGE0->mem_cons.spa, PAGE0->mem_cons.dp.layers,
@@ -613,28 +616,24 @@
pdc_console_init();
printk("The Kernel has started...\n");
+#if 0
printk("Hmm\n");
printk("%d\n", 7);
printk("%d\n", *(unsigned *)0xc0000000);
-
+#endif
printk("%p\n", bootloader_command_line);
printk("You are running a %dMHz PA-RISC-Machine with %dMB of RAM.\n",
((int)PAGE0->mem_10msec/10000), PAGE0->imm_max_mem>>20);
+ printk("FP CCR was set to: 0x%x\n", (int) ccr);
parisc_memstart = new_memory_start;
pdc = PAGE0->mem_pdc;
- printk("You are running a %dMHz PA-RISC-Machine with %dMB of RAM.\n",
- ((int)PAGE0->mem_10msec/10000), PAGE0->imm_max_mem>>20);
-
if (bootloader_command_line)
strcpy(saved_command_line,__va(bootloader_command_line));
else
saved_command_line[0] = 0;
- printk("You are running a %dMHz PA-RISC-Machine with %dMB of RAM.\n",
- ((int)PAGE0->mem_10msec/10000), PAGE0->imm_max_mem>>20);
-
printk("Free memory was at 0x%08lX (=stackbase, stacksize=0x%08lX).\n",
new_memory_start,(unsigned long)KERNEL_STACKSIZE );
@@ -659,7 +658,7 @@
#endif
initrd_below_start_ok = 1;
- printk("initrd: %08x-%08x\n", initrd_start, initrd_end);
+ printk("initrd: %08x-%08x\n", (int) initrd_start, (int) initrd_end);
*memory_start_p = parisc_memstart;
*memory_end_p = 0xc2000000;
Index: linux/drivers/block/rd.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/block/rd.c,v
retrieving revision 1.3
diff -u -r1.3 rd.c
--- rd.c 1999/09/22 18:10:17 1.3
+++ rd.c 1999/09/30 22:43:26
@@ -219,7 +219,6 @@
{
int left;
- printk("initrd_read\n");
left = initrd_end - initrd_start - *ppos;
if (count > left) count = left;
if (count == 0) return 0;
Index: linux/fs/buffer.c
===================================================================
RCS file: /home/cvs/parisc/linux/fs/buffer.c,v
retrieving revision 1.3
diff -u -r1.3 buffer.c
--- buffer.c 1999/09/22 18:10:35 1.3
+++ buffer.c 1999/09/30 22:44:21
@@ -840,8 +840,6 @@
struct buffer_head * bh;
- printk("bread bh=%08x\n", bh);
-// printk("%08x\n", &buffer_page(bh)->flags);
bh = getblk(dev, block, size);
if (buffer_uptodate(bh))
return bh;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [parisc-linux] commit FP coproc enable code?
1999-10-01 18:56 ` [parisc-linux] commit FP coproc enable code? Philipp Rumpf
@ 1999-10-01 20:52 ` Grant Grundler
1999-10-02 6:03 ` Jeffrey A Law
0 siblings, 1 reply; 4+ messages in thread
From: Grant Grundler @ 1999-10-01 20:52 UTC (permalink / raw)
To: parisc-linux
Philipp Rumpf wrote:
> > o FP enable via writing cr10 (CCR) register. Not doing this the "right"
> > way - which is to use PDC_COPROC but it will work for all PA1.1
> > platforms.
>
> Why is not using PDC_COPROC not the right way ?
> It should do exactly the same
> thing, modulo machines without FPU (for which we do not provide emulation
> anyway) and firmware bugs ...
You are right.
But I'm lazy and I don't care right now about machines older than PA 1.1.
Someone who cares about PA 1.0 can implement that.
>
> > ===================================================================
> > RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/head.S,v
> > retrieving revision 1.32
> > diff -u -r1.32 head.S
> > --- head.S 1999/08/31 19:25:23 1.32
> > +++ head.S 1999/09/30 22:43:03
>
> I would prefer to do this somewhere after the kernel is loaded, in C,
> surrounded
> by a pair of printks, so we know whether it is this that hangs the machine.
Agreed...I'll do that....thanks!
grant
Grant Grundler
Communications Infrastructure Computer Operations
+1.408.447.7253
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [parisc-linux] commit FP coproc enable code?
1999-10-01 20:52 ` Grant Grundler
@ 1999-10-02 6:03 ` Jeffrey A Law
0 siblings, 0 replies; 4+ messages in thread
From: Jeffrey A Law @ 1999-10-02 6:03 UTC (permalink / raw)
To: Grant Grundler; +Cc: parisc-linux
In message <199910012052.NAA13364@milano.cup.hp.com>you write:
> > Why is not using PDC_COPROC not the right way ?
> > It should do exactly the same
> > thing, modulo machines without FPU (for which we do not provide emulation
> > anyway) and firmware bugs ...
>
> You are right.
> But I'm lazy and I don't care right now about machines older than PA 1.1.
> Someone who cares about PA 1.0 can implement that.
I would recommend ignoring PA1.0 -- the only machines with PA1.0 processors
are radically different than the machines y'all are targeting. The effort
would be spent on PA2.0 :-)
jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1999-10-02 6:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-10-01 19:12 [parisc-linux] [grundler@puffin.external.hp.com: commit FP coproc enable code?] Phil Schwan
1999-10-01 18:56 ` [parisc-linux] commit FP coproc enable code? Philipp Rumpf
1999-10-01 20:52 ` Grant Grundler
1999-10-02 6:03 ` Jeffrey A Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox