CVS: cvs.openbsd.org: src

2024-06-20 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2024/06/20 04:46:11

Modified files:
sys/arch/m88k/include: cpu.h 

Log message:
Enable uvm percpu caches on luna88k.

It survives 3.5 days "make build" and makes about 1.5% faster on 3 CPU
machine:-)

ok miod@ phessler@ dlg@



CVS: cvs.openbsd.org: src

2024-05-31 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2024/05/31 18:48:16

Modified files:
sys/arch/luna88k/cbus: cbusvar.h i82365_cbus.c if_ne_cbus.c 
   necsb.c pcex.c 

Log message:
Move common definitions into the header file.

No binary change.



CVS: cvs.openbsd.org: src

2024-05-02 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2024/05/02 03:38:59

Modified files:
sys/arch/luna88k/cbus: i82365_cbus.c if_ne_cbus.c nec86hw.c 

Log message:
Delete extra spaces, change spaces to tab.

No binary change.



CVS: cvs.openbsd.org: src

2024-02-05 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2024/02/05 05:52:11

Modified files:
sys/net: route.h 
sys/netinet: in.h 

Log message:
Move route_cache() declaration from net/route.h to netinet/in.h.

This prevents gcc3's 'parameter has incomplete type' warning that
causes kernel build failure.

Suggested by claudio@, ok bluhm@



CVS: cvs.openbsd.org: src

2024-01-23 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2024/01/23 06:02:15

Modified files:
sys/arch/m88k/m88k: trap.c 

Log message:
Delete unused labels which cause error in making kernel.

ok miod@



CVS: cvs.openbsd.org: src

2023-12-15 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2023/12/15 23:42:38

Modified files:
libexec/ld.so/m88k: ld.script 

Log message:
Fix phdr name in ld.script.

ok deraadt@



CVS: cvs.openbsd.org: src

2023-10-08 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2023/10/08 04:40:23

Modified files:
sys/arch/luna88k/conf: files.luna88k 

Log message:
Add inclusion of "dev/hid/files.hid" and "dev/usb/files.usb".

Actually these devices are not supported on luna88k, but we need them
in order to create attribute header files (e.g. "ucom.h") required in
MI part recently.

Suggested by miod@, tested by me.



CVS: cvs.openbsd.org: src

2023-08-04 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2023/08/04 18:34:19

Modified files:
sys/arch/luna88k/dev: lunafb.c 

Log message:
Inform 8bpp capability on 8bpp framebuffer in
WSDISPLAYIO_GETSUPPORTEDDEPTH ioctl.

This is needed to use recent updated wsfb(4) driver in 8bpp mode.
We can use 1bpp X server on 8bpp framebuffer by 'startx -- -depth 1'.

Tested by me.



CVS: cvs.openbsd.org: xenocara

2023-08-04 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:xenocara
Changes by: aoy...@cvs.openbsd.org  2023/08/04 17:49:45

Modified files:
driver/xf86-video-wsfb/src: wsfb_driver.c 

Log message:
Support 8bpp X server on LUNA.

LUNA's frame buffer is 'planar' type, not packed pixel. So use
shadowUpdateAfb8 as shadow framebuffer procedure to work 8bpp X
server.

It took 10 years to make X server colored on LUNA.

Originally inspired by NetBSD/amiga.

ok miod@



CVS: cvs.openbsd.org: xenocara

2023-08-02 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:xenocara
Changes by: aoy...@cvs.openbsd.org  2023/08/02 07:57:24

Modified files:
lib/libXi/src  : XExtInt.c 

Log message:
Add pad_to_double() when the function allocates memories for 'double'
internally.

The functions wireToRawEvent() and copyRawEvent() get memories first,
then allocate memory blocks sequentially for several objects include
'double' from there.

On m88k, the memory area for 'double' should be 8-byte aligned, but
sizeof(XIRawEvent) is 60 and sizeof(out->valuators.mask_len) is 8.
In this case, allocated 'double' memory was not 8-byte aligned.

Because of this, 'xeyes' on luna88k was aborted with Bus Error right
after moving mouse for several years with sys/arch/m88k/m88k/trap.c
r.127.

Tested by me on luna88k, ok matthieu@



CVS: cvs.openbsd.org: xenocara

2023-08-01 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:xenocara
Changes by: aoy...@cvs.openbsd.org  2023/08/01 05:06:13

Modified files:
driver/xf86-video-wsfb/src: wsfb_driver.c 

Log message:
Fix mmap'ing size for LUNA framebuffer.

LUNA's video memory has 'linebytes * fPtr->info.height' bytes per 1
plane and the real visible area begins at 'offset' within that video
memory area, so it does not need to add 'offset' when mmap'ing video
memory.

Noticed by nono emulator.

ok miod@



CVS: cvs.openbsd.org: src

2023-06-18 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2023/06/18 07:13:00

Modified files:
sys/arch/luna88k/stand/boot: conf.c 

Log message:
Add fchmod() entry in luna88k bootloader.

Now 'chmod a-x /bsd.upgrade' works in order to prevent re-upgrade, like other 
architectures.

Tested by me on LUNA-88K2.



CVS: cvs.openbsd.org: src

2023-06-18 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2023/06/18 06:58:03

Modified files:
sys/arch/luna88k/stand/boot: sd.c 

Log message:
Fix SCSI CMD_WRITE_EXT command length to 10 bytes.

This is needed to work libsa's ufs_fchmod() on luna88k.

Tested by me on LUNA-88K2.



CVS: cvs.openbsd.org: src

2023-06-07 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2023/06/07 06:56:22

Modified files:
lib/libc/stdlib: malloc.c 

Log message:
Add portable version and m88k-specific version lb() function, because
unfortunately gcc3 does not have __builtin_clz().

ok miod@ otto@



CVS: cvs.openbsd.org: src

2023-03-13 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2023/03/13 05:59:39

Modified files:
sys/arch/luna88k/stand/boot: Makefile libsa.h 
Added files:
sys/arch/luna88k/stand/boot: cmd_luna88k.c 

Log message:
Add "machine poweroff" command on luna88k bootloader.

ok miod@



CVS: cvs.openbsd.org: src

2023-03-11 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2023/03/11 03:33:27

Modified files:
sys/arch/luna88k/luna88k: romcons.c 

Log message:
Add missing $OpenBSD$ tag.



CVS: cvs.openbsd.org: src

2023-02-24 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2023/02/24 16:36:11

Modified files:
sys/arch/luna88k/stand: Makefile.inc 
sys/arch/luna88k/stand/boot: Makefile 

Log message:
Change to use the default bsd.prog.mk "install" target.

This also brings to install boot.8 man page correctly.

ok miod@



CVS: cvs.openbsd.org: src

2023-02-23 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2023/02/23 06:28:38

Modified files:
sys/arch/luna88k/stand/boot: getsecs.c 

Log message:
Make bootloader 'time' command work correctly on luna88k.

Now the correct date is displayed instead of January 1, 1970.

Tested on LUNA-88K2 and nono emulator by me.

"make sense" miod@



CVS: cvs.openbsd.org: src

2023-02-15 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2023/02/15 05:43:32

Modified files:
sys/arch/luna88k/stand/boot: Makefile bmc.c bmd.c samachdep.h 
Added files:
sys/arch/luna88k/stand/boot: logo.c 

Log message:
Now Puffy comes on luna88k bootloader!

"Of course!" miod@



CVS: cvs.openbsd.org: src

2023-02-11 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2023/02/12 00:02:43

Modified files:
sys/arch/m88k/include: pmap.h 

Log message:
m88k also needs to define PMAP_CHECK_COPYIN as 1.

"this makes sense" miod@



CVS: cvs.openbsd.org: src

2023-02-10 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2023/02/10 21:35:34

Modified files:
sys/arch/luna88k/stand/boot: conf.c 

Log message:
Make 'ls' command in bootloader work correctly on luna88k.

Now 'ls' against directory works fine.

Tested on LUNA-88K2 and nono emulator by me.



CVS: cvs.openbsd.org: src

2023-02-10 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2023/02/10 04:25:31

Removed files:
sys/arch/luna88k/stand/boot: bcd.c 

Log message:
Delete no-longer-used file.



CVS: cvs.openbsd.org: src

2023-01-27 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2023/01/27 06:58:17

Modified files:
sys/arch/luna88k/stand/boot: init_main.c 

Log message:
Delete get_plane_numbers() function.

Different from original LUNA(68k), the number of planes is directly
stored as an integer value on LUNA-88K.

Tested on LUNA-88K2 by me.



CVS: cvs.openbsd.org: src

2023-01-19 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2023/01/19 03:59:25

Modified files:
lib/libcbor/src/cbor: common.h 

Log message:
Do not use unsupported __attribute__((warn_unused_result)) on gcc3.

This prevents building libfido2 stops with error on luna88k because it
is compiled with -Werror option.

ok, and better #if condition by miod@



CVS: cvs.openbsd.org: src

2022-12-30 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2022/12/30 19:42:01

Modified files:
sys/arch/luna88k/stand/boot: boot.c 

Log message:
Let luna88k's bootloader pass RB_GOODRANDOM to the kernel.

Current bootloader can pass boothowto information to the kernel.  It
also has the capability to load random seed data from /etc/random.seed
already.  So set RB_GOODRANDOM at the bootloader when loadrandom() has
been finished successfully.

Now the kernel says "random: good seed from bootblocks".

Tested by LUNA-88K2 and nono emulator, "Absolutely!" ok miod@



CVS: cvs.openbsd.org: src

2022-12-18 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2022/12/18 06:18:36

Modified files:
sys/arch/luna88k/luna88k: locore0.S 

Log message:
Do not save bootdev and boothowto when invalid value has passed.

This occurs the kernel has booted from old boot loader or directly
booted by command line parameter on emulator.

Tested by LUNA-88K2 and nono emulator.



CVS: cvs.openbsd.org: src

2022-12-09 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2022/12/09 19:41:56

Modified files:
sys/arch/luna88k/luna88k: autoconf.c machdep.c 

Log message:
Fix comments, no binary change.



CVS: cvs.openbsd.org: src

2022-11-06 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2022/11/06 06:01:22

Modified files:
sys/arch/luna88k/dev: lunafb.c omrasops.c 

Log message:
Change character drawing depth when 'pseudo' framebuffer depth is changed.

Tested on LUNA-88K2 with 4bpp/8bpp framebuffer by me.



CVS: cvs.openbsd.org: src

2022-10-25 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2022/10/25 05:39:33

Modified files:
sys/arch/luna88k/luna88k: machdep.c 

Log message:
Add more chance to process IPI in the interrupt service routine.

This prevents "luna88k_ext_int: cpu0 level 1 interrupt" message on
heavy load.

"This makes sense" miod@, tested by me.



CVS: cvs.openbsd.org: src

2022-10-14 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2022/10/14 14:53:19

Modified files:
sys/arch/luna88k/luna88k: autoconf.c locore0.S machdep.c 
sys/arch/luna88k/stand/boot: boot.c devopen.c init_main.c 
 locore.S samachdep.h 

Log message:
Pass boot device information from bootloader to kernel.

This brings the default root device is the same one of the kernel
specified by bootloader, rather than NVRAM setting, like other
architectures.

"looks good to me" miod@, tested on LUNA-88K2 and nono (LUNA-88K
capable emulator) by me.



CVS: cvs.openbsd.org: src

2022-09-22 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2022/09/22 20:35:46

Modified files:
sys/arch/luna88k/include: autoconf.h 
sys/arch/luna88k/luna88k: autoconf.c 

Log message:
Delete unused variables originally come from mvme88k.



CVS: cvs.openbsd.org: src

2022-08-23 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2022/08/23 07:18:59

Modified files:
sys/arch/luna88k/conf: RAMDISK 

Log message:
Added NFS client support to RAMDISK kernel as the same as other platforms.

Tested by me.



CVS: cvs.openbsd.org: src

2022-08-12 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2022/08/12 07:36:19

Modified files:
sys/arch/luna88k/dev: lunafb.c 

Log message:
Fix to work 1bpp Xorg server again on 1bpp framebuffer hardware.

Recent xenocara wsfb driver can treat LUNA's framebuffer "offset", but it
requires one more page by mmap() when we use offset.

Noticed and tested on nono emulator with 1bpp setting.



CVS: cvs.openbsd.org: src

2022-08-08 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2022/08/08 05:27:18

Modified files:
sys/arch/luna88k/luna88k: locore0.S 

Log message:
Change branch condition inverted to realize original intention in
comment.

Found by Tetsuya Isaki at NetBSD and nono project, during
investigating work-in-progress NetBSD/luna88k.
It originally comes from Mach luna88k port, more than 30 years ago:-)

Tested by me, "That's much better!" miod@



CVS: cvs.openbsd.org: src

2022-05-19 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2022/05/19 06:55:59

Modified files:
sys/arch/luna88k/luna88k: m8820x.c 

Log message:
Now MULTIPROCESSOR kernel boots with CPU modules installed in
arbitrary slots.

Plamen Mihaylov's LUNA-88K2 originally has 2 CPU modules in slot #0
and #2, but MULTIPROCESSOR kernel panics because they are not placed
in contiguous slots.  This diff fixes it.

Original diff from miod@, tested by Plamen Mihaylov and me.



CVS: cvs.openbsd.org: src

2022-03-05 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2022/03/05 04:03:30

Modified files:
sys/arch/luna88k/conf: files.luna88k 
sys/arch/luna88k/luna88k: machdep.c 
Added files:
sys/arch/luna88k/luna88k: romcons.c 

Log message:
Move initial ROM console related codes into separated luna88k/romcons.c
file.

No functional change, tested by me.



CVS: cvs.openbsd.org: src

2022-03-04 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2022/03/04 23:59:12

Modified files:
sys/arch/luna88k/luna88k: m8820x.c 

Log message:
Move CPU-CMMU association report into #ifdef DEBUG section.

This was useful in early days of porting OpenBSD to LUNA-88K, but now
more detailed information is shown in dmesg.

Tested by me.



CVS: cvs.openbsd.org: src

2022-02-14 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2022/02/14 06:03:52

Modified files:
sys/arch/luna88k/include: bus.h 

Log message:
Delete incomplete implementation of bus_space_{alloc,free} in bus.h.

This prevents errors on luna88k in src/usr.sbin/fw_update/pattern.c
which includes dev/pci/pcivar.h, which includes machine/bus.h.

Suggested by miod@



CVS: cvs.openbsd.org: src

2022-01-28 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2022/01/28 23:25:33

Modified files:
sys/uvm: uvm_page.h 

Log message:
Fix macro name in comment.

ok visa@



CVS: cvs.openbsd.org: src

2021-09-25 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2021/09/25 17:53:35

Modified files:
sys/arch/luna88k/dev: mb89352.c 

Log message:
Fix a possible race condition in spc_msgin().

This comes from NetBSD:sys/dev/ic/mb89352.c fix by tsutsui:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ic/mb89352.c.diff?r1=1.57&r2=1.58&f=h

Tested on LUNA-88K2 by me.



CVS: cvs.openbsd.org: src

2021-09-25 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2021/09/25 15:34:21

Modified files:
sys/arch/luna88k/dev: omrasops.h 

Log message:
Add $OpenBSD$ keyword and correct spelling.



CVS: cvs.openbsd.org: src

2021-09-24 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2021/09/24 08:37:56

Modified files:
sys/arch/m88k/m88k: fpu.c 

Log message:
Fix two bugs in m88k fcmp{,u} emulation.

- Use of goto will skip zeroing of 88110-specific comparison bits (bitn
12-17) in some cases. (Move their zeroing closer to the point of
their computation.)

- Computing of the "in interval" bits should not be performed when the
S2 operand is negative.

Spotted by Tetsuya Isaki (nono project), suggested diff and description
from Miod Vallat.  Tested on the real hardware by Isaki and me.



CVS: cvs.openbsd.org: src

2021-09-17 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2021/09/17 06:02:31

Modified files:
sys/arch/luna88k/dev: lunafb.c 

Log message:
Sync 1bpp initial palette setting with NetBSD/luna68k.

Tested by me on 1bpp framebuffer got recently.



CVS: cvs.openbsd.org: src

2021-07-30 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2021/07/30 23:22:36

Modified files:
sys/arch/luna88k/dev: omrasops.c omrasops.h omrasops1.c 

Log message:
Fix displaying incorrect patterns on LUNA's wscons with 1bpp
framebuffer when Backspace is typed.

Reading data from LUNA framebuffer's 'common write plane' is not
valid.  But on 1bpp framebuffer routine attempts to read from common
write plane in macro.  That causes displaying incorrect patterns.

This bug was found on nono's LUNA-88K emulation first, then inspected
on the real hardware after I fortunately got 1bpp framebuffer.

Spotted and investigated by Isaki and Sugahara of nono procject.
Tested on my LUNA-88K2.



CVS: cvs.openbsd.org: src

2021-07-25 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2021/07/25 01:12:51

Modified files:
sys/arch/luna88k/luna88k: locore0.S machdep.c 

Log message:
Force to use serial console when no graphic board is found.

If no graphic board is found, LUNA's ROM monitor forces to use serial
console even though DIP switch setting is 'use graphic console'.

For the consistency, change the the kernel behavior the same as ROM
monitor does.

Tested on my LUNA-88K2.



CVS: cvs.openbsd.org: src

2021-06-06 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2021/06/06 04:48:30

Modified files:
sys/dev/sdmmc  : if_bwfm_sdio.c 

Log message:
Add firmware selection for BRCM_CC_43241_CHIP_ID (0x4324).

According to NetBSD, this chip uses one of three firmwares depending
on its revision, but all of them are already included in the
bwfm-firmware package, so we can load one of them.

ok patrick@ sthen@



CVS: cvs.openbsd.org: src

2021-05-17 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2021/05/17 16:11:35

Modified files:
distrib/luna88k/ramdisk: Makefile 

Log message:
Make more free inodes on luna88k bsd.rd.

Free inodes of luna88k bsd.rd are insufficient when we want to install
sets from another disk of the root disk.  Make more inodes by specifying
density=4096.

Spotted by Anders Gavare, the author of GXemul.  Thanks!

ok deraadt@



CVS: cvs.openbsd.org: src

2021-05-04 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2021/05/04 08:05:12

Modified files:
sys/arch/m88k/include: atomic.h 

Log message:
Fix 2nd and 3rd arguments' cast in atomic_cas_ptr().

This fixes compile errors (actually warnings) on m88k in sys/net/pf.c
revision 1.1116 changes.

Diff from Miod Vallat, tested on GENERIC and GENERIC.MP by me.



CVS: cvs.openbsd.org: src

2021-04-16 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2021/04/16 06:05:32

Modified files:
gnu/usr.bin/perl: utf8.h 

Log message:
Add a workaround to avoid wrong code generated by m88k gcc.

NATIVE_TO_UNI is defined as follows in utf8.h:
--
#define NATIVE_TO_UNI(ch)   ((UV) ((ch) | 0))
--
and UV is 'unsigned long' on m88k.

Details are at:
https://github.com/Perl/perl5/issues/18655

help and ok afresh1@



CVS: cvs.openbsd.org: src

2021-02-23 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2021/02/23 04:48:21

Modified files:
sys/arch/luna88k/luna88k: machdep.c 

Log message:
Make more efficient clearing interrupts on all processors at boot time.

Without this modification, because of the volatile qualifier, the
compiler does not produce four `` = 0 '' assignments, but code
equivalent to:

*(volatile uint32_t *)INT_ST_MASK3 = 0;
*(volatile uint32_t *)INT_ST_MASK2 =
*(volatile uint32_t *)INT_ST_MASK3;
*(volatile uint32_t *)INT_ST_MASK1 =
*(volatile uint32_t *)INT_ST_MASK2;
*(volatile uint32_t *)INT_ST_MASK0 =
*(volatile uint32_t *)INT_ST_MASK1;

Anders Gavare reported to Miod Vallat, and he gave me a diff.



CVS: cvs.openbsd.org: src

2021-01-08 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2021/01/08 19:34:21

Modified files:
sys/arch/luna88k/dev: siotty.c 

Log message:
Now we do not call ttyopen() in sioopen(), we do not need the variable
'error' anymore.



CVS: cvs.openbsd.org: xenocara

2020-12-04 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:xenocara
Changes by: aoy...@cvs.openbsd.org  2020/12/04 18:46:42

Modified files:
distrib/sets/lists/xserv: md.luna88k 

Log message:
luna88k still uses wsfb_drv.{la,so} on X.

ok matthieu@ deraadt@



CVS: cvs.openbsd.org: src

2020-11-06 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2020/11/06 19:52:08

Modified files:
lib/libc/arch/m88k/sys: tfork_thread.S 

Log message:
Actually m88k assembler can not handle 'nop' mnemonic, use a macro instead.

ok deraadt@



CVS: cvs.openbsd.org: src

2020-06-22 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2020/06/22 20:18:58

Modified files:
sys/arch/m88k/m88k: pmap.c 

Log message:
Fix format strings (%p --> %lx) in debug code.

ok dlg@



CVS: cvs.openbsd.org: src

2020-06-07 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2020/06/07 18:56:19

Modified files:
share/man/man4/man4.luna88k: cbus.4 

Log message:
Add ne(4) which is supported on luna88k from OpenBSD 6.7.



CVS: cvs.openbsd.org: src

2020-06-07 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2020/06/07 16:54:58

Modified files:
sys/arch/luna88k/conf: files.luna88k 
sys/arch/luna88k/luna88k: mainbus.c 

Log message:
Skip probing cbus(4/luna88k) and xp(4/luna88k) in RAMDISK kernel, they
are not necessary in install/upgrade process.



CVS: cvs.openbsd.org: src

2020-05-26 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2020/05/26 05:55:10

Modified files:
sys/arch/m88k/conf: files.m88k 
sys/arch/m88k/include: mutex.h 
Added files:
sys/arch/m88k/m88k: mutex.c 
Removed files:
sys/arch/m88k/m88k: mutex.S 

Log message:
Rewrite m88k mutex code as a slight variation of the MI mutex code.

This will make mutex spinning time visible in top(1), and also might
improve stability.

The major change in this is that the old assembly code acquires
mutexes with an atomic exchange operation, but releases them with a
regular store, but the new code always uses atomic exchange
operations.

The mutex.h changes to the macros conform to  to be able
to reset the system while in ddb.

Suggested from Miod Vallat, tested by me.  The stability in heavy load
is greatly improved in my case.



CVS: cvs.openbsd.org: www

2020-05-21 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:www
Changes by: aoy...@cvs.openbsd.org  2020/05/21 17:39:43

Modified files:
.  : luna88k.html 

Log message:
Add ne(4) at cbus(4) description, that is supported in OpenBSD 6.7.



CVS: cvs.openbsd.org: www

2020-04-24 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:www
Changes by: aoy...@cvs.openbsd.org  2020/04/24 03:14:13

Modified files:
.  : luna88k.html 

Log message:
Add some description for unsupported devices.



CVS: cvs.openbsd.org: src

2020-02-23 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2020/02/23 17:17:44

Modified files:
usr.bin/dig/lib/isc: task.c timer.c 
usr.bin/dig/lib/isc/unix: socket.c 

Log message:
Fix 'previously declared here' error on gcc3(luna88k).

ok jsg@ florian@ jung@



CVS: cvs.openbsd.org: src

2020-01-03 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2020/01/03 20:17:57

Modified files:
sys/arch/luna88k/luna88k: machdep.c 

Log message:
Ignore 'hardware lied' interrupt in do-while loop, same as first
time processing.  That was sometimes observed when the system get
heavy load, like 'make -j N build'.



CVS: cvs.openbsd.org: src

2019-12-30 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2019/12/30 05:16:12

Modified files:
sys/arch/luna88k/cbus: cbus.c 
sys/arch/luna88k/conf: GENERIC files.luna88k 
Added files:
sys/arch/luna88k/cbus: if_ne_cbus.c 

Log message:
Add ne(4) support on cbus(4).

Allied Telesis CentreCOM LA-98 works well, other NE2000 based boards
may also work with correct resource specifying.

This driver was developed for demonstration at Open Source Conference
2019 Nagoya, Japan, in July, but I forgot to commit after that:-)



CVS: cvs.openbsd.org: src

2019-12-10 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2019/12/10 04:28:13

Modified files:
sys/arch/luna88k/stand/boot: Makefile 

Log message:
Like other architectures, luna88k bootloader also needs arc4.c.

ok guenther@, "your choice" deraadt@



CVS: cvs.openbsd.org: xenocara

2019-09-05 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:xenocara
Changes by: aoy...@cvs.openbsd.org  2019/09/05 08:03:08

Modified files:
lib/libX11/src/util: makekeys.c 

Log message:
Fix gcc3 specific error. The diff is based on latest upstream change.

suggested by jsg@, tested on luna88k by me, ok by jsg@ and matthieu@



CVS: cvs.openbsd.org: src

2019-08-30 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2019/08/30 22:22:12

Modified files:
libexec/ld.so/m88k: rtld_machine.c 

Log message:
Delete the last argument to fit recent _dl_find_symbol change.

ok guenther@



CVS: cvs.openbsd.org: src

2019-08-28 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2019/08/28 07:48:40

Modified files:
sys/arch/m88k/include: cpu.h 

Log message:
sys/arch/luna88k/luna88k/locore0.S:dummy_cpu assumes that
ci_mp_atomic_{begin,end} are 6th and 7th elements of cpu_info
structure.  Actually that is dummy structure used in early boot stage,
but for consistency, move ci_srp_hazards position in cpu_info.

ok mpi@



CVS: cvs.openbsd.org: src

2019-07-31 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2019/07/31 05:19:39

Modified files:
distrib/luna88k/ramdisk: Makefile 

Log message:
Fix errors while building bsd.rd & minirootXX.fs on luna88k that is
caused by recent Makefile changes.

Confirmed by me, "sure" deraadt@



CVS: cvs.openbsd.org: src

2019-06-29 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2019/06/29 18:23:22

Modified files:
share/man/man4 : pcmcia.4 
sys/arch/luna88k/cbus: i82365_cbus.c 
sys/arch/luna88k/conf: GENERIC 

Log message:
Change pcic(4) attached with resources specified by locators on luna88k,
rather than #define'd ones.

Compiled and tested by my own LUNA-88K2.



CVS: cvs.openbsd.org: src

2019-06-28 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2019/06/28 22:33:11

Modified files:
sys/arch/luna88k/cbus: cbus.c cbusvar.h 
sys/arch/luna88k/conf: files.luna88k 

Log message:
Introduce ISA-like locators on cbus(4) to specify resources in
files.conf(5).



CVS: cvs.openbsd.org: src

2019-05-09 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2019/05/09 06:50:03

Modified files:
sys/arch/luna88k/stand/boot: Makefile 

Log message:
Eliminate 'make clean' stops with 'rmdir: .: Invalid argument'.



CVS: cvs.openbsd.org: src

2019-04-10 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2019/04/10 16:02:03

Modified files:
sys/arch/luna88k/stand/boot: boot.c 

Log message:
Add (uint32_t) cast on marks[] to avoid warning in gcc3.

"Yes, fix that" deraadt@



CVS: cvs.openbsd.org: src

2019-04-09 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2019/04/09 08:21:32

Modified files:
sys/arch/luna88k/stand/boot: init_main.c 

Log message:
Detect /bsd.upgrade kernel and boot it if present instead of default /bsd,
same as recent change in MI boot.

"If it works, sure you can commit it" deraadt@



CVS: cvs.openbsd.org: xenocara

2019-02-08 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:xenocara
Changes by: aoy...@cvs.openbsd.org  2019/02/08 17:31:06

Modified files:
driver : Makefile 

Log message:
Delete xf86-input-usbtablet target on luna88k, because luna88k
does not have USB support.

ok matthieu@



CVS: cvs.openbsd.org: src

2018-10-06 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2018/10/06 17:30:25

Modified files:
lib/csu/m88k   : md_init.h 

Log message:
Insert definitions of environ and __progname in MD_CRT0_START again.

That part is not needed with a PIE toolchain, but until gcc 4 on m88k
receives enough fixes to produce as good code as gcc 3, the bits in
r1.5 are still required.

This fixes miniperl does not work correctly while building perl on m88k.

Diff is suggested by Miod Vallat, tested by him and me, ok guenther@



CVS: cvs.openbsd.org: src

2018-08-22 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2018/08/22 05:25:58

Modified files:
sys/arch/m88k/include: atomic.h 

Log message:
Adding membar_xxx defines to userland.

The src/lib/libc/thread/rthread.c 1.8 change adds #include
 in userland code.

Current m88k atomic.h contents are inside of #if defined(_KERNEL)
guard, then, nothing is defined for userland program.
So we need adding some defines to compile it on m88k.

The original diff is suggested from Miod Vallat, modified by the
advice from mpi@ and kettenis@.

ok kettenis@



CVS: cvs.openbsd.org: src

2018-06-06 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2018/06/06 06:58:05

Modified files:
sys/arch/luna88k/luna88k: locore0.S 

Log message:
Make sure cr17 matches curcpu() on non-MULTIPROCESSOR kernels.

This fixes that luna88k non-MULTIPROCESSOR kernel with option
DIAGNOSTIC (i.e. GENERIC) will hang silently at boot.

That problem had been caused after the addition of a
MUTEX_ASSERT_UNLOCKED check in kprintf() in sys/kern/subr_prf.c
1.95.

The diff is suggested from Miod Vallat, tested it on
non-MULTIPROCESSOR and MULTIPROCESSOR kernels by me.



CVS: cvs.openbsd.org: xenocara

2018-03-15 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:xenocara
Changes by: aoy...@cvs.openbsd.org  2018/03/15 04:02:36

Modified files:
xserver: Makefile.bsd-wrapper 

Log message:
After updated to xserver 1.19.5, the con figure's default value of
--enable-glamor has changed from 'no' to 'auto'.
This makes an error running configure on luna88k, so disable it
explicitly with ${XENOCARA_BUILD_GL}=no machines.

ok jsg@



CVS: cvs.openbsd.org: src

2018-03-12 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2018/03/12 06:47:35

Modified files:
sys/net: if_gre.c 

Log message:
Delete unused variable.

ok jsg@



CVS: cvs.openbsd.org: src

2018-03-12 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2018/03/12 05:23:53

Removed files:
sys/arch/m88k/m88k: mplock.c 

Log message:
Make luna88k use the MI mplock implementation.
(forget to remove from repository)

ok visa@



CVS: cvs.openbsd.org: src

2018-03-12 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2018/03/12 05:17:06

Modified files:
sys/arch/luna88k/include: cpu.h 
sys/arch/m88k/conf: files.m88k 
sys/arch/m88k/include: mplock.h 

Log message:
Make luna88k use the MI mplock implementation.

ok visa@



CVS: cvs.openbsd.org: src

2017-11-03 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2017/11/03 03:07:54

Modified files:
sys/arch/luna88k/luna88k: autoconf.c clock.c machdep.c mainbus.c 

Log message:
Spaces -> tab, no binary change.



CVS: cvs.openbsd.org: src

2017-11-02 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2017/11/03 00:55:08

Modified files:
sys/arch/luna88k/include: autoconf.h board.h 

Log message:
Spaces -> tab, no binary change.



CVS: cvs.openbsd.org: src

2017-11-02 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2017/11/03 00:54:06

Modified files:
sys/arch/luna88k/dev: lcd.c lunafb.c lunaws.c maskbits.h 
  mb89352.c omkbdmap.c omrasops.h siotty.c 
  timekeeper.c timekeeper.h 

Log message:
Spaces -> tab, no binary change.



CVS: cvs.openbsd.org: src

2017-10-29 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2017/10/29 06:42:11

Modified files:
gnu/usr.bin: Makefile 
gnu/usr.bin/gcc: Makefile.bsd-wrapper 

Log message:
Unify protoize.1 install process on gcc3 arch (luna88k).

ok guenther@



CVS: cvs.openbsd.org: src

2017-09-02 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2017/09/02 18:14:07

Modified files:
libexec/ld.so/m88k: SYS.h ldasm.S 

Log message:
Fix m88k problem in recent ld.so changes.

- move _dl_cerror function from SYS.h to ldasm.S to avoid duplicate
definition when linking
- [SYS.h] pull some macros from lib/libc/arch/m88k/DEFS.h
- [ldasm.S] add "'never hit' but needed" br again in _dl_cacheflush
(thanks to Miod Vallat)
- [ldasm.S] change ld.hu into ld.h in order to get a correctly signed
and sign-extended value (also thanks to Miod Vallat)

ok deraadt@



CVS: cvs.openbsd.org: src

2017-07-28 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2017/07/28 03:32:49

Modified files:
lib/libexpat   : Makefile 

Log message:
Gcc3 does not have -fvisibility feature, so skip -fvisibility=hidden
flag when compiling with gcc3.

ok espie@



CVS: cvs.openbsd.org: src

2017-07-23 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2017/07/23 03:17:17

Modified files:
sys/arch/luna88k/conf: Makefile.luna88k files.luna88k 
sys/arch/luna88k/luna88k: locore.S 
Added files:
sys/arch/luna88k/luna88k: locore0.S 

Log message:
Splitting early startup code out of locore.S into locore0.S, like other
architectures.

"Looking good" deraadt@



CVS: cvs.openbsd.org: src

2017-07-21 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2017/07/21 07:27:21

Modified files:
sys/arch/luna88k/conf: Makefile.luna88k 

Log message:
More consistent with other architectures.



CVS: cvs.openbsd.org: src

2017-07-20 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2017/07/20 06:07:54

Modified files:
sys/arch/luna88k/conf: Makefile.luna88k 

Log message:
Kernel relinking for luna88k, first step.
Not yet split locore.S to locore.S and locore0.S.

ok deraadt@



CVS: cvs.openbsd.org: src

2017-06-28 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2017/06/28 04:31:48

Modified files:
sys/arch/luna88k/luna88k: isr.c 

Log message:
Delete '0x' in DIAGNOSTIC panic message; ipl value is printed in decimal.



CVS: cvs.openbsd.org: src

2017-06-16 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2017/06/16 18:28:18

Modified files:
sys/arch/luna88k/dev: if_le.c 

Log message:
Fix comment.  This gap is not only on LUNA-88K2 but also on LUNA-88K.



CVS: cvs.openbsd.org: src

2017-06-10 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2017/06/10 06:23:00

Modified files:
sys/arch/luna88k/dev: lunaws.c siotty.c 

Log message:
Use software interrupt to process TX/RX data between sio and tty(4)
layer.

This is a straightforwad port of current NetBSD/luna68k implementation
by Izumi Tsutsui.  Tested on both LUNA-88K and LUNA-88K2.



CVS: cvs.openbsd.org: src

2017-06-08 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2017/06/08 15:30:26

Modified files:
distrib/sets/lists/comp: md.luna88k 

Log message:
Add a missing header file.

ok deraadt@



CVS: cvs.openbsd.org: src

2017-06-04 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2017/06/04 07:48:13

Modified files:
sys/arch/luna88k/dev: lunaws.c sio.c siotty.c siovar.h 

Log message:
Sync with current NetBSD/luna68k code.



CVS: cvs.openbsd.org: src

2017-04-15 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2017/04/15 18:52:54

Modified files:
usr.sbin/dhcrelay6: Makefile 

Log message:
Remove -Werror to make dhcrelay6 on gcc3 architecture successfully.

ok reyk



CVS: cvs.openbsd.org: www

2017-04-14 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:www
Changes by: aoy...@cvs.openbsd.org  2017/04/14 06:39:03

Modified files:
.  : luna88k.html 

Log message:
Add xp(4) device, it is supported since 6.1.



CVS: cvs.openbsd.org: src

2017-03-15 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2017/03/15 05:13:34

Modified files:
sys/arch/luna88k/dev: lcd.c 

Log message:
We do not need while loop around uiomove(9) in lcdwrite().

Pointed out by Enami Tsugutomo while porting this driver to NetBSD/luna68k
by Izumi Tsutsui.

Tested by me.



CVS: cvs.openbsd.org: src

2017-02-11 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2017/02/11 02:04:45

Modified files:
share/man/man4/man4.luna88k: Makefile 
Added files:
share/man/man4/man4.luna88k: xp.4 

Log message:
Add xp(4/luna88k) man page.

ok guenther@ dlg@



CVS: cvs.openbsd.org: src

2017-02-08 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2017/02/08 06:13:15

Modified files:
sys/arch/luna88k/luna88k: mainbus.c 

Log message:
Now pcexmem(4) and pcexio(4) are attached at cbus(4), we do not need to
include "pcex.h" here.



CVS: cvs.openbsd.org: src

2017-01-09 Thread Kenji Aoyama
CVSROOT:/cvs
Module name:src
Changes by: aoy...@cvs.openbsd.org  2017/01/09 01:46:13

Modified files:
sys/arch/luna88k/dev: xp.c 

Log message:
Sync with NetBSD/luna68k changes.

>> Fix (mostly harmless) off-by-one size check in XPIOCDOWNLD ioctl.
>> Consistently use sc_shm_size initialized at device attach.

http://mail-index.netbsd.org/source-changes/2017/01/08/msg080666.html
http://mail-index.netbsd.org/source-changes/2017/01/08/msg080667.html



  1   2   >