List Info

Thread: Clio Patches...




Clio Patches...
user name
2006-03-26 03:04:36
On 2006-03-26 tsutsuiceres.dti.ne.jp wrote:

> >   Thanks for your recent PR commits.  Would you be
willing to commit the
> > diff at: http://www.city-net.com/~darkstar/netbsd/hpcmips2.diff
>
> Well, could you please split this patch for each fix?
> "Fixing all in one jumbo patch" might cause
some future
> problem (makes it harder to pullup or back out, etc.)
> and people might hesitate investigate/integrate such
one.

  The individual patches are at (also attached below):
http://www.city-net.com/~darkstar/netbsd/clio-kernel.di
ff
http://www.city-net.com/~darkstar/netbsd/clio-keymap.di
ff
h
ttp://www.city-net.com/~darkstar/netbsd/delay.diff
h
ttp://www.city-net.com/~darkstar/netbsd/dbsym.diff

> >   This will make the Clio C-1050 work without
pbsdboot changes (and still
> > work on the C-1000; this would close
port-hpcmips/28228, although I see I
> > never got that patch listed in the PR),
>
> I'm not sure which part of the diff affects this, but
> are you sure that it won't break existing SHARP_TRIPAD
support?
> How did you make this changes?

  This is the clio-kernel.diff that changes isaportoffset to
zero.  I
think the current value was copied from other machines that
need it and it
works on the C-1000 presumably due to limited address lines
being used. My
understanding is that the tripad hardware layout is
identical to the
C-1000 internally, however I don't have one.

  The patchs in the PR also change pbsdboot and hpcboot to
use the
correct id for the 1050 (currently all use the tripad) and
only applied
the change to the C-1050 since I didn't notice until later
that it worked
on the C-1000 also.  But this means that pbsdboot and
hpcboot must be
updated.

Index: sys/arch/hpcmips/conf/GENERIC
============================================================
=======
RCS file: /cvsroot/src/sys/arch/hpcmips/conf/GENERIC,v
retrieving revision 1.165.2.5
diff -u -p -r1.165.2.5 GENERIC
--- sys/arch/hpcmips/conf/GENERIC	14 Aug 2005 21:13:54
-0000	1.165.2.5
+++ sys/arch/hpcmips/conf/GENERIC	25 Feb 2006 07:14:17 -0000
 -323,8
+325,8  pcic0	at isa2 port 0x3e0 iomem 0x70000 i
 #
 # Vadem Clio and Sharp Tripad
 #
-vrisab3	at vrgiu? platform SHARP_TRIPAD isaportoffset
0x1000000
-vrisab3	at vrgiu? platform VADEM_CLIO_C isaportoffset
0x1000000
+vrisab3	at vrgiu? platform SHARP_TRIPAD isaportoffset 0x0
+vrisab3	at vrgiu? platform VADEM_CLIO_C isaportoffset 0x0
 isa3	at vrisab3
 pcic0	at isa3 port 0x3e0 iomem 0x70000 iosiz 0x4000 irq
0x000d0003

Index: sys/arch/hpcmips/conf/MPC303
============================================================
=======
RCS file: /cvsroot/src/sys/arch/hpcmips/conf/MPC303,v
retrieving revision 1.33.4.1
diff -u -p -r1.33.4.1 MPC303
--- sys/arch/hpcmips/conf/MPC303	18 Jul 2005 21:13:43
-0000	1.33.4.1
+++ sys/arch/hpcmips/conf/MPC303	25 Feb 2006 07:14:20 -0000
 -376,8
+376,8  pcic0	at isa2 port 0x3e0 iomem 0x70000 i
 #
 # Vadem Clio and Sharp Tripad
 #
-vrisab3	at vrgiu? platform SHARP_TRIPAD isaportoffset
0x1000000
-vrisab3	at vrgiu? platform VADEM_CLIO_C isaportoffset
0x1000000
+vrisab3	at vrgiu? platform SHARP_TRIPAD isaportoffset 0x0
+vrisab3	at vrgiu? platform VADEM_CLIO_C isaportoffset 0x0
 isa3	at vrisab3
 pcic0	at isa3 port 0x3e0 iomem 0x70000 iosiz 0x4000 irq
0x000d0003

Index: sys/arch/hpcmips/conf/VR41XX
============================================================
=======
RCS file: /cvsroot/src/sys/arch/hpcmips/conf/VR41XX,v
retrieving revision 1.24.4.2
diff -u -p -r1.24.4.2 VR41XX
--- sys/arch/hpcmips/conf/VR41XX	18 Jul 2005 21:14:39
-0000	1.24.4.2
+++ sys/arch/hpcmips/conf/VR41XX	25 Feb 2006 07:14:20 -0000
 -306,8
+306,8  pcic0	at isa2 port 0x3e0 iomem 0x70000 i
 #
 # Vadem Clio and Sharp Tripad
 #
-vrisab3	at vrgiu? platform SHARP_TRIPAD isaportoffset
0x1000000
-vrisab3	at vrgiu? platform VADEM_CLIO_C isaportoffset
0x1000000
+vrisab3	at vrgiu? platform SHARP_TRIPAD isaportoffset 0x0
+vrisab3	at vrgiu? platform VADEM_CLIO_C isaportoffset 0x0
 isa3	at vrisab3
 pcic0	at isa3 port 0x3e0 iomem 0x70000 iosiz 0x4000 irq
0x000d0003


> > allows use of dbsym,
>
> I'm not familiar with hpcmips, but doesn't pbsdboot
load
> symbol table? If so, shouldn't we check if bootinfo is
> processed properly first rather than just using
dbsym(8)?

  It doesn't work.  I don't have any way of building
pbsdboot so I didn't
look at why.  I sent port-hpcmips/26426 about this and
included this patch
as a workaround.  The patch uses the loaded symbols if
present (if
pbsdboot is set to load symbols then dbsym will not work and
the symbol
loading does not work either).  I didn't change anything to
run dbsym by
default, just to allow it to be used.

Index: sys/arch/hpcmips/hpcmips/machdep.c
============================================================
=======
RCS file: /cvsroot/src/sys/arch/hpcmips/hpcmips/machdep.c,v
retrieving revision 1.86
diff -u -p -r1.86 machdep.c
--- sys/arch/hpcmips/hpcmips/machdep.c	13 Feb 2004 11:36:13
-0000	1.86
+++ sys/arch/hpcmips/hpcmips/machdep.c	25 Feb 2006 07:14:21
-0000
 -452,6
+452,8  mach_init(int argc, char *argv[], struct
 	/* init symbols if present */
 	if (esym)
 		ksyms_init(symbolsz, &end, esym);
+	else /* try symbols via dbsym */
+		ksyms_init(0, NULL, NULL);
 #endif /* DDB */
 	/*
 	 * Alloc u pages for lwp0 stealing KSEG0 memory.

> > fixes delay
> > time on the VR4111,
>
> Do you have any article, errata or measurement for us
> to confirm this?

  I noticed it with cycle counter tests of delay time while
working on my
updated slhci driver, but I don't know any Nec
documentation mentioning
the correction.  Later VR series CPUs all are documented to
have two clock
branch delays.  Earlier VR series CPUs had a single clock
delay, so I
would guess it was just overlooked in creating the 4111
manual.  I don't
care much about this one, though, since my C-1000's display
is almost
dead anyway.

Index: sys/arch/hpcmips/vr/bcu_vrip.c
============================================================
=======
RCS file: /cvsroot/src/sys/arch/hpcmips/vr/bcu_vrip.c,v
retrieving revision 1.25
diff -u -p -r1.25 bcu_vrip.c
--- sys/arch/hpcmips/vr/bcu_vrip.c	13 Feb 2004 11:36:13
-0000	1.25
+++ sys/arch/hpcmips/vr/bcu_vrip.c	25 Feb 2006 07:14:23
-0000
 -442,8
+442,9  vrbcu_vrip_getcpuclock(void)
 		break;
 	case BCUREVID_RID_4111:
 		cpuclock = CLKX / clksp * 64;
-		/* branch delay is 1 clock; 2 clock/loop */
-		cpuspeed = (cpuclock / 2 + MHZ / 2) / MHZ;
+		/* branch delay is 2 clock; 3 clock/loop */
+		/* manual incorrectly says 1 clock delay */
+		cpuspeed = (cpuclock / 3 + MHZ / 2) / MHZ;
 		break;
 	case BCUREVID_RID_4121:
 		cpuclock = CLKX / clksp * 64;

> > and improves Clio keymaps (would close
> > port-hpcmips/28383).
>
> Hmm, maybe this is harmless for other machines,
> but still I'd like to see separate patch for this.

  Done.

Index: sys/dev/hpc/hpckbdkeymap.h
============================================================
=======
RCS file: /cvsroot/src/sys/dev/hpc/hpckbdkeymap.h,v
retrieving revision 1.34.6.2
diff -u -p -r1.34.6.2 hpckbdkeymap.h
--- sys/dev/hpc/hpckbdkeymap.h	4 Aug 2005 18:31:25
-0000	1.34.6.2
+++ sys/dev/hpc/hpckbdkeymap.h	25 Feb 2006 07:14:34 -0000
 -255,7
+255,7  static uint8_t tripad_keytrans[] = {
 /*10*/	 56,	 57,	 46,	 47,	 32,	 33,	 19,	  4,
 /*18*/	 48,	 49,	 34,	 35,	 20,	 21,	  5,	  6,
 /*20*/	 50,	 51,	 36,	 37,	 22,	 23,	  7,	  8,
-/*28*/	105,	 58,	 38,	 24,	 25,	  9,	 10,	 11,
+/*28*/	184,	 58,	 38,	 24,	 25,	  9,	 10,	 11,
 /*30*/	 26,	 27,	203,	 52,	 53,	 39,	 12,	 13,
 /*38*/	 54,	205,	200,	208,	 40,	 28,	 43,	 14,
 /*40*/	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,
 -264,6
+264,32  static uint8_t tripad_keytrans[] = {
 /*58*/	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,	IGN,
 };

+static const keysym_t tripad_cmdmap[] = {
+/*  pos      command		normal		shifted		fn    */
+KC(2),	 KS_Cmd_Screen0,	KS_1,		KS_exclam,	KS_f1,
+KC(3),	 KS_Cmd_Screen1,	KS_2,		KS_at,		KS_f2,
+KC(4),	 KS_Cmd_Screen2,	KS_3,		KS_numbersign,	KS_f3,
+KC(5),	 KS_Cmd_Screen3,	KS_4,		KS_dollar,	KS_f4,
+KC(6),	 KS_Cmd_Screen4,	KS_5,		KS_percent,	KS_f5,
+KC(7),	 KS_Cmd_Screen5,	KS_6,		KS_asciicircum,	KS_f6,
+KC(8),	 KS_Cmd_Screen6,	KS_7,		KS_ampersand,	KS_f7,
+KC(9),	 KS_Cmd_Screen7,	KS_8,		KS_asterisk,	KS_f8,
+KC(10),  KS_Cmd_Screen8,	KS_9,		KS_parenleft,	KS_f9,
+KC(11),  KS_Cmd_Screen9,	KS_0,		KS_parenright,	KS_f10,
+KC(12), 
KS_Cmd_BrightnessDown,	KS_minus,	KS_underscore,	KS_f11,
+KC(13),  KS_Cmd_BrightnessUp,	KS_equal,	KS_plus,	KS_f12,
+KC(20),  KS_Cmd_BacklightToggle, KS_t,
+KC(33),  KS_Cmd_BacklightOff,	KS_f,
+KC(49),  KS_Cmd_BacklightOn,	KS_n,
+KC(51),  KS_Cmd_ContrastDown,	KS_comma,	KS_less,
+KC(52),  KS_Cmd_ContrastUp,	KS_period,	KS_greater,
+KC(184), KS_Mode_switch,	KS_Multi_key,
+KC(200), KS_Cmd_ScrollSlowUp,	KS_Up,		KS_Up,		KS_Prior,
+KC(203), KS_Cmd_ScrollFastUp,	KS_Left,	KS_Left,	KS_Home,
+KC(205), KS_Cmd_ScrollFastDown,	KS_Right,	KS_Right,	KS_End,
+KC(208), KS_Cmd_ScrollSlowDown,	KS_Down,	KS_Down,	KS_Next,
+};
+
 /* NEC Mobile Gear MCCS series */
 static uint8_t mccs_keytrans[] = {
 /*00	caps	cr	rar	p	.	y	b	z	*/
 -977,12
+1003,12  const struct hpckbd_keymap_table {
 	{	&platid_mask_MACH_SHARP_TRIPAD,
 		tripad_keytrans,
 		NULL,
-		NULLCMDMAP,
+		CMDMAP(tripad_cmdmap),
 		KB_US },
 	{	&platid_mask_MACH_VADEM_CLIO_C,
 		tripad_keytrans,
 		NULL,
-		NULLCMDMAP,
+		CMDMAP(tripad_cmdmap),
 		KB_US },
 	{	&platid_mask_MACH_NEC_MCCS,
 		mccs_keytrans,

> >  Currently the C-1050 does not work without
building
> > a new kernel.  I can verify everything in the next
day or two from clean
> > sources if you commit it.
>
> Well, I may be able to fix mips generic one, but
> I'll subscribe port-hpcmips, so please post diffs
> for individual problems to the list again.
> (though I'm afraid currently hpcmips guys aren't so
active. sorry)

Matthew Orgass
darkstarcity-net.com

Clio Patches...
user name
2006-03-26 04:54:21
In article <Pine.BSF.4.51.0603251955370.34152vegeta.city-net.com>
darkstarcity-net.com wrote:

> My
> understanding is that the tripad hardware layout is
identical to the
> C-1000 internally, however I don't have one.

Could anyone confirm this?
If not, I'll change only lines for tripad for now.

> > > allows use of dbsym,
> >
> > I'm not familiar with hpcmips, but doesn't
pbsdboot load
> > symbol table? If so, shouldn't we check if
bootinfo is
> > processed properly first rather than just using
dbsym(8)?
> 
>   It doesn't work.  I don't have any way of building
pbsdboot so I didn't
> look at why.  I sent port-hpcmips/26426 about this and
included this patch
> as a workaround.  The patch uses the loaded symbols if
present (if
> pbsdboot is set to load symbols then dbsym will not
work and the symbol
> loading does not work either).

dbsym(8) is just a workaround for ports which don't have
native
bootloader that can load symbols. If it doens't work, why
don't
you try to fix it rather than hide it by ugly workaround?
;-p

At least you could confirm if bootinfo is passed correctly
or not
by options DEBUG, and maybe you should mention what version
of
pbsdboot or hpcboot you use. Even if you still want to use
dbsym(8),
it should be wrapped by #ifdef SYMTAB_SPACE.

> > > fixes delay
> > > time on the VR4111,
> >
> > Do you have any article, errata or measurement for
us
> > to confirm this?
> 
>   I noticed it with cycle counter tests of delay time
while working on my
> updated slhci driver, but I don't know any Nec
documentation mentioning
> the correction.  Later VR series CPUs all are
documented to have two clock
> branch delays.  Earlier VR series CPUs had a single
clock delay, so I
> would guess it was just overlooked in creating the 4111
manual.

According to VR4111 and VR4121 manuals, they have completely
differnt pipeline structures (see chapter 5 VR41[12]1
pipeline).
I don't think there is any possible overlooking around
figures of pipeline activities (figure 5-3 in VR4111 manual
and figure 5-5 in VR4121 one), so I'll leave this part.
---
Izumi Tsutsui
Clio Patches...
user name
2006-03-28 04:54:05
On 2006-03-26 tsutsuiceres.dti.ne.jp wrote:
> In article <Pine.BSF.4.51.0603251955370.34152vegeta.city-net.com>
> darkstarcity-net.com wrote:
> > My
> > understanding is that the tripad hardware layout
is identical to the
> > C-1000 internally, however I don't have one.
>
> Could anyone confirm this?
> If not, I'll change only lines for tripad for now.

  I found that revision 1.52 of GENERIC includes the comment
by takemura:
"Note: CLIO C-1000 is identical with SHARP Tripad
PV6000."

> > > > allows use of dbsym,
> > >
> > > I'm not familiar with hpcmips, but doesn't
pbsdboot load
> > > symbol table? If so, shouldn't we check if
bootinfo is
> > > processed properly first rather than just
using dbsym(8)?
> >
> >   It doesn't work.  I don't have any way of
building pbsdboot so I didn't
> > look at why.  I sent port-hpcmips/26426 about this
and included this patch
> > as a workaround.  The patch uses the loaded
symbols if present (if
> > pbsdboot is set to load symbols then dbsym will
not work and the symbol
> > loading does not work either).
>
> dbsym(8) is just a workaround for ports which don't
have native
> bootloader that can load symbols. If it doens't work,
why don't
> you try to fix it rather than hide it by ugly
workaround? ;-p
>
> At least you could confirm if bootinfo is passed
correctly or not
> by options DEBUG, and maybe you should mention what
version of
> pbsdboot or hpcboot you use. Even if you still want to
use dbsym(8),
> it should be wrapped by #ifdef SYMTAB_SPACE.

  RTC_OFFSET and boot -d work, so bootinfo is being passed
correctly.  I
can't find any version info in pbsdboot.exe, but I am
fairly sure I
updated it when I installed a new system two years ago and
the binary has
not changed in over four years.  The hpcboot I tried is most
likely not
the latest, although that binary is fairly old also.  Since
dbsym works
and I can't build pbsdboot I am not going to look into it
more.  I don't
care if it gets commited or not, although it seems
reasonable to me to
allow it.  The config changes and keymap are the important
ones.

> According to VR4111 and VR4121 manuals, they have
completely
> differnt pipeline structures (see chapter 5 VR41[12]1
pipeline).
> I don't think there is any possible overlooking around
> figures of pipeline activities (figure 5-3 in VR4111
manual
> and figure 5-5 in VR4121 one), so I'll leave this
part.

  Yeah, it was stupid of me to blame the manual.  The add
isn't available
right away for the test, so it slips.

Matthew Orgass
darkstarcity-net.com
Clio Patches...
user name
2006-03-28 12:32:31
In article <Pine.BSF.4.51.0603272128390.72758vegeta.city-net.com>
darkstarcity-net.com wrote:

>   I found that revision 1.52 of GENERIC includes the
comment by takemura:
> "Note: CLIO C-1000 is identical with SHARP Tripad
PV6000."

Okay, then it had been approved by the portmaster.

>   RTC_OFFSET and boot -d work, so bootinfo is being
passed correctly.

bootinfo is passed as a structure, so if some members were
added
at some point, some values (which had the same offset with
old ones)
could still be passed correctly, but others might not.
i.e. it smells version mismatch. (or your kernel is
stripped?)

> I
> can't find any version info in pbsdboot.exe, but I am
fairly sure I
> updated it when I installed a new system two years ago
and the binary has
> not changed in over four years.

Well, you should mention where you got your binary from
(or its size etc.) exactly, otherwise not all other people
can reproduce or confirm it.

> The config changes and keymap are the important ones.

Your keymap patch only contains diff against some map
values,
but PR port-hpcmips/28383 also contains other changes
(bare function key?).
I'll commit only keymap changes in your diff since
such structure changes should be approved by some
responsible people of this port.
---
Izumi Tsutsui
Clio Patches...
user name
2006-03-29 21:27:10
On 2006-03-28 tsutsuiceres.dti.ne.jp wrote:
> >   RTC_OFFSET and boot -d work, so bootinfo is
being passed correctly.
>
> bootinfo is passed as a structure, so if some members
were added
> at some point, some values (which had the same offset
with old ones)
> could still be passed correctly, but others might not.
> i.e. it smells version mismatch. (or your kernel is
stripped?)

  Bootinfo has not changed at all.  And I don't see how
bootinfo is used
for symbols at all.  The kernel is not stripped.

> > I
> > can't find any version info in pbsdboot.exe, but
I am fairly sure I
> > updated it when I installed a new system two years
ago and the binary has
> > not changed in over four years.
>
> Well, you should mention where you got your binary from
> (or its size etc.) exactly, otherwise not all other
people
> can reproduce or confirm it.

  The size is the same as the pbsdboot.exe in the 3.0
install directory.
I tried the hpcboot.exe in that directory with the C-1050
but it wouldn't
boot at all (framebuffer was 0).   I'll add this info to
the PR.

> I'll commit only keymap changes in your diff since

  Thanks.  I built all the kernels from fresh source and
booted GENERIC on
my C-1050 with pbsdboot.  I also verified that
port-mips/26410 is
corrected.

Matthew Orgass
darkstarcity-net.com

Clio Patches...
user name
2006-03-30 14:37:44
In article <Pine.BSF.4.51.0603281548410.84794vegeta.city-net.com>
darkstarcity-net.com wrote:q

>   Bootinfo has not changed at all.  And I don't see
how bootinfo is used
> for symbols at all.  The kernel is not stripped.

Ah, now I see hpcmips doesn't use bootinfo to pass symbol
info.
Since I don't have any hpcmips machines I don't know if
any hpcmips
machines can't use symble, but maybe we could see how
symbol table
is loaded in sys/arch/hpcmips/stand/pbsdboot/elf.c...

> I also verified that port-mips/26410 is
> corrected.

Okay, closed. Thanks.
---
Izumi Tsutsui
[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )