Valeriy E. Ushakov | 2 Jun 16:59 2005
Picon

hpckbd vs. -Wcast-qual and kernel memory protection

Now that -Wcast-qual hit current, it uncovered an interesting issue.
hpckbd(4) uses pckbd_keydesctab as a based table, patching KB_MACHDEP
entries with information from hpckbdkeymap.h

pckbd_keydesctab is "const" and is placed in the .text - yet hpckbd(4)
patches it successfully. So we have kernel .text kernel-writable.  I
verified it with ddb on hpcsh.  I gather the same is true on other
hpc* ports, or hpckbd(4) would caused access fault.

This looks like something we should fix.

SY, Uwe
--

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

KIYOHARA Takashi | 16 Jun 10:52 2005
Picon

Re: touch-panel driver and manpage for PERSONA SH3 mahicne

I apologize for the slow response... ;-<

Subject: Re: touch-panel driver and manpage for PERSONA SH3 mahicne
From: Valeriy E. Ushakov <uwe <at> ptc.spbu.ru>
Date: 05/21/2005 04:18:28

> > Index: sys/arch/hpcsh/conf/files.hpcsh

 ... snip ...

> > +device	h50lcd
> > +attach	h50lcd at shb
> > +file		arch/hpcsh/dev/h50lcd.c			h50lcd
> > +
>
> Make sure you don't commit this hunk yet :).
>
> Also, may be think about consistent naming convention for the future
> drivers?  Why the lcd driver is h50lcd and touch-panel driver is
> psh3tp?

I was writing first by the name of h50XX.  I can have done the chance
to borrow 30PA and 200JC one day.  And, it worked. They were all SH3
machines. I changed the name to psh3XX.

I have already written psh3pwr(4) and psh3lcd(4).  ;-)
comming soon.

Thanks.
--
(Continue reading)

Valeriy E. Ushakov | 19 Jun 00:27 2005
Picon

Re: touch-panel driver and manpage for PERSONA SH3 mahicne

On Thu, Jun 16, 2005 at 17:52:11 +0900, KIYOHARA Takashi wrote:

> > Also, may be think about consistent naming convention for the future
> > drivers?  Why the lcd driver is h50lcd and touch-panel driver is
> > psh3tp?
> 
> I was writing first by the name of h50XX.  I can have done the chance
> to borrow 30PA and 200JC one day.  And, it worked. They were all SH3
> machines. I changed the name to psh3XX.
> 
> I have already written psh3pwr(4) and psh3lcd(4).  ;-)
> comming soon.

This is great news.  May be we should look into merging jornada and
persona drivers.  I've looked at the touch-panel code, and a lot of
code can be factored out, they only differ in the bits to pull and ADC
channels to read.

BTW, what does persona use for audio, sh7709 onboard DAC or a real
audio chip?  Jornada uses DAC, but I cannot make a driver that uses
DMAC/CMT to feed DAC to work - the machine locks up.  I wonder if
that's a hw design flaw or something.  WinCE on jornada does not use
DMAC at all.

Thanks.

SY, Uwe
--

-- 
uwe <at> ptc.spbu.ru                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen
(Continue reading)

KIYOHARA Takashi | 19 Jun 04:06 2005
Picon

Re: touch-panel driver and manpage for PERSONA SH3 mahicne

Hi,

From: "Valeriy E. Ushakov" <uwe <at> ptc.spbu.ru>
Date: Sun, 19 Jun 2005 02:27:49 +0400

> This is great news.  May be we should look into merging jornada and
> persona drivers.  I've looked at the touch-panel code, and a lot of
> code can be factored out, they only differ in the bits to pull and ADC
> channels to read.

That. I think it is possible.  ;-)

psh3pwr uses interrupt for in/out of plug.  And POWER button not uses
interrupt.
psh3lcd can control contrast, power by GPIO.  brightness controled by
HG71C105FE.  It is custom IC.  I don't know spec.

> BTW, what does persona use for audio, sh7709 onboard DAC or a real
> audio chip?  Jornada uses DAC, but I cannot make a driver that uses
> DMAC/CMT to feed DAC to work - the machine locks up.  I wonder if
> that's a hw design flaw or something.  WinCE on jornada does not use
> DMAC at all.

It is not interpretable. The mike is connected with ADC4 via BA3410AF.
However, where the speaker is connected has not been understood. 

  BA3410AF is 3V recoding / playback system preamplifier IC.

--
kiyohara
(Continue reading)

KIYOHARA Takashi | 19 Jun 04:22 2005
Picon

Re: touch-panel driver and manpage for PERSONA SH3 mahicne


From: KIYOHARA Takashi <kiyohara <at> kk.iij4u.or.jp>
Date: Sun, 19 Jun 2005 11:06:14 +0900 (JST)

> psh3pwr uses interrupt for in/out of plug.  And POWER button not uses
> interrupt.
> psh3lcd can control contrast, power by GPIO.  brightness controled by
> HG71C105FE.  It is custom IC.  I don't know spec.

I put sources. 

  http://www.kk.iij4u.or.jp/~kiyohara/hpcsh/

     psh3lcd.{4,c,diff}	: psh3lcd driver, diff and manpage.
     psh3pwr.{c,diff}	: psh3pwr driver and diff.
     hpckbdkeymap.h.diff: Remove define Rec button.
     GENERIC.diff	: Reorder
     DEVNAMES.diff	: Add j6x0lcd   ;-)
     pmem.c		: Read driver at Physical memory.
			  I used test, read from AREA2 (HG71C105FE).  ;-)

--
kiyohara

Michael Wileman | 25 Jun 22:42 2005
Picon

Jornada 680 asks for "root device"

I'm trying to install hpcsh on my Jornada 680e. This is the Dutch 
Railway version available cheaply right now. It has a qwerty keyboard 
with accented characters superimposed on the keys, accessible using 
the alt-gr key.

I followed the instructions i Valeriy Ushakov's "NetBSD and handheld 
platforms" document, and creaded a FAT and an FFS partition on a 512MB 
CF card using an i386 laptop booted using a NetBSD live CD. Everything 
seemed to work fine. I extracted the kernel tarfile into the FAT 
partition, and the rest of the binary sets into the FFS partition.

When I boot using hpcboot, the booting process starts, until I get

wskbd2 at hpckbd0: console keyboard, using wsdisplay0
boot device: <unknown>
root device:

It doesn't seem to find my wd0a root setup. If I try typing in wd0a OR 
wd0 or wd1a or anything else, it just responds with

use one of: ddb halt reboot
root device:

I had assumed the kernel binary would automatically look for wd0. Can 
someone tell me what I'm doing wrong? Do I have to recompile the 
kernel to recognize my CF card. Did anyone else here have this problem 
trying to install 2.0 on a Jornada?

Thanks,
Mike
(Continue reading)

Stefan Schumacher | 26 Jun 01:04 2005
Picon

Re: Jornada 680 asks for "root device"

Also sprach Michael Wileman (jwileman <at> panix.com)

> When I boot using hpcboot, the booting process starts, until I get
> 
> wskbd2 at hpckbd0: console keyboard, using wsdisplay0
> boot device: <unknown>
> root device:
> 
> It doesn't seem to find my wd0a root setup. If I try typing in wd0a OR 
> wd0 or wd1a or anything else, it just responds with
> 
> use one of: ddb halt reboot
> root device:
> 
> I had assumed the kernel binary would automatically look for wd0. Can 
> someone tell me what I'm doing wrong? Do I have to recompile the 
> kernel to recognize my CF card. Did anyone else here have this problem 
> trying to install 2.0 on a Jornada?

Did you define the root device in hpcboot.exe, before starting the
booting of NetBSD?

-- 
PGP FPR: CF74 D5F2 4871 3E5C FFFE 0130 11F4 C41E B3FB AE33
--

-- 
Jeder, der Gewalt zu seiner Methode gemacht hat, muß zwangsläufig die
Lüge zu seinem Prinzip erwählen.

Alexander Solschenizyn
(Continue reading)

Michael Wileman | 25 Jun 23:10 2005
Picon

Re: Jornada 680 asks for "root device"

On Sun, 26 Jun 2005, Stefan Schumacher wrote:

> Also sprach Michael Wileman (jwileman <at> panix.com)
>
>> When I boot using hpcboot, the booting process starts, until I get
>>
>> wskbd2 at hpckbd0: console keyboard, using wsdisplay0
>> boot device: <unknown>
>> root device:
>>
>> It doesn't seem to find my wd0a root setup. If I try typing in wd0a OR
>> wd0 or wd1a or anything else, it just responds with
>>
>> use one of: ddb halt reboot
>> root device:
>>
>> I had assumed the kernel binary would automatically look for wd0. Can
>> someone tell me what I'm doing wrong? Do I have to recompile the
>> kernel to recognize my CF card. Did anyone else here have this problem
>> trying to install 2.0 on a Jornada?
>
> Did you define the root device in hpcboot.exe, before starting the
> booting of NetBSD?

Yes, I checked the "wd" box. "miniroot.fs" is grayed out in the text 
field below that, but I presume that only applies to the "md" option, 
as it is only when checking that one that the text can be modified.

Mike

(Continue reading)

Nikos Ntarmos | 26 Jun 00:08 2005
Picon

Re: Jornada 680 asks for "root device"


Hi there.

On Sat, Jun 25, 2005 at 04:42:50PM -0400, Michael Wileman wrote:
> When I boot using hpcboot, the booting process starts, until I get
> 
> wskbd2 at hpckbd0: console keyboard, using wsdisplay0
> boot device: <unknown>
> root device:
> 
> It doesn't seem to find my wd0a root setup.

Can you provide the output of disklabel and fdisk and the dmesg
information for your cf card? There may be something wrong with your
partitioning.

> I had assumed the kernel binary would automatically look for wd0. 

It does...

> Do I have to recompile the kernel to recognize my CF card.

Look at the boot messages. If you see something like:
wd0 at atabus drive 0: <your cf disk model here>
then your kernel does recognize your cf card.

Hmmm... Now that I'm looking at my nada's dmesg, I see the wd0-related
lines coming after wskbd-blah and before boot-device-blah, so you may
actually have a problem with your CF, although rather improbable. BTW
which cf card do you use?
(Continue reading)

Michael Wileman | 26 Jun 00:16 2005
Picon

Re: Jornada 680 asks for "root device"

> On Sat, Jun 25, 2005 at 04:42:50PM -0400, Michael Wileman wrote:
>> When I boot using hpcboot, the booting process starts, until I get
>>
>> wskbd2 at hpckbd0: console keyboard, using wsdisplay0
>> boot device: <unknown>
>> root device:
>>
>> It doesn't seem to find my wd0a root setup.
>
> Can you provide the output of disklabel and fdisk and the dmesg 
> information for your cf card? There may be something wrong with your 
> partitioning.

I'm pretty sure the partitioning is correct, but I'll provide these 
later, just in case. They looked pretty much like the examples in the 
document, except for the sizes of the partitions. It's a pain to 
reboot my laptop with the netbsd-live CD, and I am just on my way out 
the door.

Is there a way to save the dmesg if the boot does not complete. I get 
stuck at that "root device" prompt, and the only way out gives me a 
hard reset, so everything is lost. I do not see any wd? messages in 
the startup, though.

>> I had assumed the kernel binary would automatically look for wd0.
>
> It does...
>
>> Do I have to recompile the kernel to recognize my CF card.
>
(Continue reading)


Gmane