Masao Uebayashi | 21 Jul 2006 05:33
Picon

Interrupt level in system call

Hi!

A co-worker found a problem that system calls in kernel mode are
running in the highest interrupt level (SR:I[3-0] == 1111).  Can't
they safely run in the lowest interrupt level?

Masao

Index: arch/sh3/sh3/exception_vector.S
===================================================================
RCS file: /cvsroot/src/sys/arch/sh3/sh3/exception_vector.S,v
retrieving revision 1.18
diff -u -r1.18 exception_vector.S
--- arch/sh3/sh3/exception_vector.S	8 Feb 2006 02:19:57 -0000	1.18
+++ arch/sh3/sh3/exception_vector.S	21 Jul 2006 03:23:31 -0000
 <at>  <at>  -104,6 +104,7  <at>  <at> 
 	mov.l	r2,	 <at> (TF_UBC, r14)	/* clear trapframe->tf_ubc */
 #endif /* DDB */
 	__EXCEPTION_UNBLOCK(r0, r1)
+	__INTR_UNMASK(r0, r1)
 	mov.l	_L.general, r0
 	jsr	 <at> r0
 	 mov	r14,	r5	/* 2nd arg */

Valeriy E. Ushakov | 22 Jul 2006 04:53
Picon

Re: Interrupt level in system call

On Fri, Jul 21, 2006 at 12:33:15 +0900, Masao Uebayashi wrote:

> A co-worker found a problem that system calls in kernel mode are
> running in the highest interrupt level (SR:I[3-0] == 1111).

Oops.

> Can't they safely run in the lowest interrupt level?

They should.

> Index: arch/sh3/sh3/exception_vector.S
> ===================================================================
> RCS file: /cvsroot/src/sys/arch/sh3/sh3/exception_vector.S,v
> retrieving revision 1.18
> diff -u -r1.18 exception_vector.S
> --- arch/sh3/sh3/exception_vector.S	8 Feb 2006 02:19:57 -0000	1.18
> +++ arch/sh3/sh3/exception_vector.S	21 Jul 2006 03:23:31 -0000
>  <at>  <at>  -104,6 +104,7  <at>  <at> 
>  	mov.l	r2,	 <at> (TF_UBC, r14)	/* clear trapframe->tf_ubc */
>  #endif /* DDB */
>  	__EXCEPTION_UNBLOCK(r0, r1)
> +	__INTR_UNMASK(r0, r1)
>  	mov.l	_L.general, r0
>  	jsr	 <at> r0
>  	 mov	r14,	r5	/* 2nd arg */

I think that's not a correct fix.  We can hit general_excepion() from
kernel code, so we cannot set sr.imask to zero in that place.

(Continue reading)

RENATA MANSO | 24 Jul 2006 14:19

todos os prograsm para sua empresa ouku

==============================================================
   INFORMATIZE SUA EMPRESA COM SOFTWARES INTEGRADOS AO SITE
==============================================================

BAIXE AGORA MESMO UMA DEMONSTRAO PARA:

SALO DE BELEZA
ACADEMIA
PIZZARIA
DISK ENTREGA
LOJA DE CONFECO
REVENDA DE VECULO
IMOBILIRIA
REPRESENTANTE
OFICINA
MERCADO
INFORMTICA
PETSHOP
PORTARIA
CELULAR
COMRCIO E SERVIO
CLINICA
CURSOS
E MUITO MAIS...

LIGUE PARA NOSSO TELE-VENDAS:

(11)4063-3059 So Paulo
(61)4063-8149 Braslia
(31)4062-7169 Belo Horizonte
(Continue reading)

Valeriy E. Ushakov | 25 Jul 2006 02:03
Picon

sh3 ports switched to gcc4

sh3 ports have been switched to use gcc4.

I've tested hpcsh (sh3el) and compile-tested mmeye (sh3eb).

It would be great if people with the hardware could test dreamcast and
evbsh3 ports.

Send-pr any problems.

PS: I'm pondering if the old -O1 default from the gcc 2.95 times (when
compiler was buggy as hell) is still appropirate.  I'm inclined to
switch sh3 to use -O2, so it would be nice if people could also test
-O2 builds.

SY, Uwe
--

-- 
uwe <at> ptc.spbu.ru                         |       Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/          |       Ist zu Grunde gehen

Kristoffer Ericson | 25 Jul 2006 02:10
Picon
Favicon

RE: sh3 ports switched to gcc4

Greetings,

Welcome to gcc4 land. Im not a regular netbsd user but can give some info on 
the linux side of things as they should be similiar. My target is sh3 little 
endian.
4.1.1 is the best gcc currently, havent tried 4.2.x yet. 4.0.x had lots of 
issues and regulary experienced compiler errors.
I used 4.1.1 with -O2 set and it worked mostly well, Only had issues with 
one or two packages. I moved over to -O1 just to be on the safe side (errors 
went away).

Best wishes
Kristoffer

>From: "Valeriy E. Ushakov" <uwe <at> ptc.spbu.ru>
>To: port-sh3 <at> NetBSD.org
>CC: port-hpcsh <at> NetBSD.org, port-dreamcast <at> NetBSD.org
>Subject: sh3 ports switched to gcc4
>Date: Tue, 25 Jul 2006 04:03:46 +0400
>
>sh3 ports have been switched to use gcc4.
>
>I've tested hpcsh (sh3el) and compile-tested mmeye (sh3eb).
>
>It would be great if people with the hardware could test dreamcast and
>evbsh3 ports.
>
>Send-pr any problems.
>
>PS: I'm pondering if the old -O1 default from the gcc 2.95 times (when
(Continue reading)

Adam Wysocki via ArcaBit | 25 Jul 2006 17:10
Picon

Ericsson MC16 (HP 360LX) endianness

Hi there,

I own an Ericsson MC16 (HP 360LX clone) handheld PC, which is based 
on SH3 architecture, and want to run NetBSD on it (any other Unix-like 
system will do, but NetBSD seems to be the best choice). Do you know 
the endianness of this computer?

Greetings.

--

-- 
[ Adam Wysocki :: www.chmurka.net :: +48 514 710 213 ]
[ Software Development Department, ArcaBit Sp. z o.o ]
[ Ul. Fortuny 9 :: 01-339 Warszawa :: www.arcabit.pl ]

Valeriy E. Ushakov | 25 Jul 2006 18:41
Picon

Re: Ericsson MC16 (HP 360LX) endianness

[Redirected to port-hpcsh]

On Tue, Jul 25, 2006 at 17:10:19 +0200, Adam Wysocki via ArcaBit wrote:

> I own an Ericsson MC16 (HP 360LX clone) handheld PC, which is based 
> on SH3 architecture, and want to run NetBSD on it (any other Unix-like 
> system will do, but NetBSD seems to be the best choice). Do you know 
> the endianness of this computer?

All WinCE machines use little-endian sh3.

360LX is reported to work.  Actually that reminds me that I need to

1) integrate memory detection patches from Christer.

2) arrange for a new hpcboot.exe for wince 2.0 to get built (I don't
   have WinCE 2.0 tools myself).

SY, Uwe
--

-- 
uwe <at> ptc.spbu.ru                         |       Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/          |       Ist zu Grunde gehen

Christer O. Andersson | 25 Jul 2006 21:23

Re: Ericsson MC16 (HP 360LX) endianness

On Tue, Jul 25, 2006 at 08:41:27PM +0400, Valeriy E. Ushakov wrote:
> 
> 360LX is reported to work.  Actually that reminds me that I need to

Well, kind of, that is. It boots a kernel with miniroot, but it
has problems with the pcmcia controller, that differs from Jornada
and 620LX. It uses a processor, or asic, that incorporates the
pcmcia controller, so there is no companion chip. It uses some more
interrupts, that causes trouble, and I am of the impression it
cannot switch voltage for pcmcia cards.

I haven't had much time lately to proceed with my attempts to get
it working in full, but I think it's mostly the pcmcia controller
that needs to be sorted out.

> 
> 1) integrate memory detection patches from Christer.
> 
> 2) arrange for a new hpcboot.exe for wince 2.0 to get built (I don't
>    have WinCE 2.0 tools myself).

Memory detection patches are a must, but I think the existing
hpcboot.exe is usable, although a new one with the latest bug fixes
would still be welcome.

--

-- 
Christer O. Andersson
Odensbacken

(Continue reading)


Gmane