http://marc.info/?l=openbsd-cvs&m=141199909120631&w=2
>> Use raster(logic) operation, or ROP, function on LUNA frame buffer.
>> It makes 4bpp wscons putchar ~20% faster.
This Makes 4bpp wscons putchar ~30% on LUNA-II.
Also use the similar ROP in 1bpp putchar and cursor functions
and the 1bpp putchar is also ~5% faster.
While here, reduce diffs from OpenBSD a bit.
Tested on all 1bpp/4bpp/8bpp framebuffers.
- prepare and use unpack_attr() function to get fg and bg from attribute
- use proper variable names to clarify meanings
Tested on LUNA-II with 8bpp framebuffer.
- allow mmap framebuffer memories only in WSDISPLAYIO_DUMBFB
- initialize palette for ANSI text colors on back to WSDISPLAYIO_MODE_EMUL
Tested on LUNA with 4bpp framebuffer.
- split keyboard mapping definitions to new files, omkbdmap.[ch]
- add WSDISPLAY_COMPAT_RAWKBD support
(actually the name is wrong; it doesn't emit raw keycode but
converts MD code into PS/2 one as "raw keycode on x86" for Xorg server)
- allow to enter into ddb by CTRL+ALT(zenmen)+ESC
- remove unnecessary return values
Now LUNA's keyboard works on Xorg server without tweaks by xmodmap(1) etc.
Mostly taken from OpenBSD/luna88k. Also sync some comments.
Tested on LUNA-II, and mlterm-fb with 8bpp wallpaper also works fine.
Thanks to Kenji Aoyama (OpenBSD/luna88k maintainer) for providing
his spare 8bpp board.
designated initializers.
I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
- register softc of child devices as an argument of the sio interrupt
handler to avoid device_lookup_private() calls on every interrupt
- change type of sc_reg from (void *) to (struct sioreg *)
to avoid weird address offset calculations with redundant casts
- rename struct sio_softc members for consistency
- use a channel number passed via sio_attach_args in lunaws_attach()
No functional chnages. Tested on LUNA.
It could cause possible locking issue to call tty(4) layer functions
from IPL_SERIAL interrupt handlers.
Changes details (mostly similar to com(4) and z8530tty(4)):
- allocate RX buffer and put data and status into it in the interrupt handler
- call t_linesw->l_rint from the software interrupt handler
- set the only first byte in siottystart() and use t_outq buffer to send
multiple TX data
- call the next t_linesw->l_start on TX complete in the software interrupt
handler
Also put more changes:
- handle cnmagic(9) properly (now entering ddb(4) by console BREAK works)
- allocate tty in the attach function as other drivers rather than first open
- use proper variable types
http://marc.info/?l=openbsd-cvs&m=138838884202196
>> Correct initialization of Bt458, used in LUNA's 8bpp frame buffer.
>>
>> According to the manual, the address register does not automatically
>> increment when we access to the control registers. Also we disable
>> overlay planes, because we do not use them.
Changes details:
- prepare and switch 4bpp rasops functions that read/write all 4 planes
and also handle both fg and bg colors
- make 1bpp ops use first plane on write rather than common bitmap plane
(which is prepared for multiple plane write with raster ops)
- prepare 4bpp allocattr function to handle ANSI 16 color text
- split omrasops_init() function for each bpp
- move struct hwcmap from softc to hwdevconfig to sync palette values
on initialization
- allow mmap(2) against all available planes
Now we can use ANSI 16 color text console and also can
demonstrate mlterm-fb with color sixel graphics and wallpaper.
XXX: Xserver needs much more work.
This means command line editing works properly in any cases.
The bitcopy strategies for 1bpp copycols() op are taken from
recently fixed MI sys/dev/rasops/rasops_bitops.h.
GETBITS() and PUTBITS() m68k asm macro are taken from hp300.
Tested on both 1bpp (on LUNA-II) and 4bpp (on LUNA) framebuffers.
It looks the boot firmware doesn't initialize the control registers
of DS1287A (while it resets NVRAM settings) and RTC oscillator is not
started properly after replacement.
Now my LUNA-II can keep RTC properly even after reboot.
deprecated rcons(4). This allows "options FONT_foo" in kernel config files.
Mostly taken from OpenBSD/luna88k, but unnecessary MI rasops(9) stuff is
omitted since omrasops.c has own raster wsdisplay_emulops functions.
Tested on LUNA with 4bpp fb and LUNA-II with 1bpp fb.
initial import of NetBSD/luna68k.
Note a working LUNA-II machine was found and provided by OMRON guys
after LUNA demonstration at Open Source Conference 2011 Kansai @ Kyoto:
http://mail-index.NetBSD.org/source-changes/2011/07/16/msg024675.html
and this resurrected LUNA-II which runs NetBSD/luna68k -current with Xserver
was also demonstrated on the NetBSD booth at Kansai Open Source 2011:
http://www.NetBSD.org/gallery/events.html#kansai-os-jp-2011
It's really pleasure to meet many OMRON LUNA developers and LUNA users
at the NetBSD booth. Thank you everyone!
Changes details:
luna68k/luna68k/locore.s
- don't use 68030 specific pflusha instruction in 68040 initialization path
- use TBIA() to invalidate TLB instead of 68030's pflusha
after MMU is turned on (as hp300 does)
(these two bugs are fatal at early bootstrap)
- pull loadustp() fixes from hp300/locore.s rev 1.82
(more flush ops are required in it otherwise causes random coredumps)
- specify correct %tt1 mask value
(the mask value means actually bit mask, not transparent range)
luna68k/luna68k/machdep.c
- use proper delay_divisor for 68040 25MHz LUNA-II
luna68k/luna68k/mainbus.c
- prepare and use per-model mainbus device lists for mainbus_attach_args
luna68k/conf/GENERIC
luna68k/conf/INSTALL
- enable options M68040 and FPSP
- enable secondary spc(4) on LUNA-II
luna68k/conf/Makefile.luna68k
- include arch/m68k/fpsp/Makefile.inc for FPSP
luna68k/dev/lcd.c
- promote LUNA-II model on LCD
XXX: old and slow SCSI-1 drives like Hitachi DK312 seems to have
XXX: some problem with spc(4) driver, even on the original LUNA
- sprinkle volatile around register access
- initialize pallete for WHITE on BLACK text
- add WSDISPLAYIO_LINEBYTES ioctl(2)
- fix index count in omsetcmap()
- make omfbmmap() return cookie for OMFB_FB_RADDR to make
X.Org wsfb driver work on 1bpp framebuffer memory
(XXX: should revisit later)
- make WSDISPLAYIO_GINFO always return 1bpp to avoid pallete mangled
by X.Org server initialization
(XXX: should revisit later)
Even after almost a lost decade since NetBSD/luna68k was
switched to using ELF format by default back in 2001,
actually only one fix (bus.h) is required for a GENERIC kernel itself
to get multiuser login: prompt on a real hardware. Hurrahhh!!!
Demonstrated with a working Xorg mono server on the NetBSD booth
at Open Source Conference 2011 Kansai @ Kyoto:
http://www.ospn.jp/osc2011-kyoto/
"Very impressed," commented by Tomoko YOSHIDA,
Program Committee Chair of the Conference,
and some other OMRON guys.
Special Thanks to Tadashi Okamura, for providing
a working SX-9100/DT "LUNA" for this mission.
Changes details:
sys/arch/luna68k/include/bus.h
- handle stride properly even on multi and region ops for MI spc(4)
- also fix stride handling of (currently unused) 2 and 4 byte ops
sys/arch/luna68k/conf/Makefile.luna68k
sys/arch/luna68k/conf/kern.ldscript.head
sys/arch/luna68k/conf/kern.ldscript.tail
- build a faked a.out kernel using elf2aout(8) tool
and a linker script derived from cats and shark
for the LUNA firmware that loads a.out binary directly
via network or from a UNIOS partition on a local disk
sys/arch/luna68k/dev/omrasops.c
sys/arch/luna68k/dev/omron_rfont.h
- use the original OMRON font derived from 4.4BSD-Lite/luna68k
rather than gallant19 which is used on Sun workstations
(XXX omrasops.c should be rewritten to use generic wsfont(4))
distrib/luna68k/*
distrib/utils/sysinst/arch/luna68k/*
etc/etc.luna68k/MAKEDEV.conf
etc/etc.luna68k/Makefile.inc
sys/arch/luna68k/conf/INSTALL
- build a ramdisk based INSTALL kernel with sysinst(8) for luna68k
- also build an installation iso image for luna68k
sys/arch/luna68k/conf/GENERIC
- enable SYSVSHM (and other SYSV*) options for Xorg server
More Xorg changes (which need some more cleanup) and
isiboot.c fixes will come soon.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.
Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff. ... and I'm not going to ponder the depths of unload
here.
Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.