summaryrefslogtreecommitdiff
path: root/sys/arch/luna88k
AgeCommit message (Collapse)Author
2023-01-13put man page in the right placeTheo de Raadt
2023-01-12Update luna88k boot procedure; help & tweaks jmc@Miod Vallat
2023-01-10Switch the luna88k boot loader to the MI boot code, to ease future maintainenceMiod Vallat
of it. Crank version to 0.8. ok aoyama@
2022-12-31Let luna88k's bootloader pass RB_GOODRANDOM to the kernel.Kenji Aoyama
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@
2022-12-18Do not save bootdev and boothowto when invalid value has passed.Kenji Aoyama
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.
2022-12-10Fix comments, no binary change.Kenji Aoyama
2022-12-06_C_LABEL() and _ASM_LABEL() are no longer useful in the "everythingPhilip Guenther
is ELF" world. Eliminate use of them in m88k code. ok aoyama@
2022-12-06m88k, luna88k: switch to clockintrScott Soule Cheloha
- Initialize tick_nsec during cpu_initclocks() We have no control over the interrupt clock on luna88k, so this switch is trivial. Bringup help and testing from aoyama@ and miod@. Link: https://marc.info/?l=openbsd-tech&m=166776371203450&w=2 ok aoyama@ mlarkin@
2022-11-06Change character drawing depth when 'pseudo' framebuffer depth is changed.Kenji Aoyama
Tested on LUNA-88K2 with 4bpp/8bpp framebuffer by me.
2022-11-02Remove audio(9) speaker_ctl(), let open() handle speakers where neededKlemens Nanni
Only five legacy half-duplex hardware drivers require this function to change between playing and recording: i386: ess(4), gus(4), pas(4), sb(4) luna88k: nec86(4) If defined, it is always called early in audio_open(), so just move the call from audio(4) to each hardware driver's open() handler. SPKR_ON/OFF remain defined to leave driver-specific code unchanged. Further cleanup (unchecked speaker_ctl() return values, FWRITE -> AUMODE_PLAY -> SPKR_ON dances, etc.) can happen later. Builds fine on i386. OK ratchov
2022-10-28Replace audio(9) get_props() with duplex check in open() in non-duplex driversKlemens Nanni
Make drivers which do *not* adverise AUDIO_PROP_FULLDPLEX return ENXIO in their open() if full-duplex mode was requested. This way, sys/dev/audio.c:audio_open() will fail immediately rather than later through the to-be-removed get_props() check. These are all drivers which simply don't support full-duplex mode. In device-tree based drivers like simpleaudio(4)/rkiis(4) and newer Apple ones like aplaudio(4)/aplmca(4), this adds a new open() stub to the low-level drivers which merely does the duplex check. My Pinebook Pro keeps playing audio and recording silence with this diff just like before (rkiis(4) is currently play-only): simpleaudio0 at mainbus0 simpleaudio1 at mainbus0 audio0 at simpleaudio1 $ aucat -i song69.wav -o rec.wav OK ratchov miod
2022-10-25Add more chance to process IPI in the interrupt service routine.Kenji Aoyama
This prevents "luna88k_ext_int: cpu0 level 1 interrupt" message on heavy load. "This makes sense" miod@, tested by me.
2022-10-19Use C99 struct init for struct audio_hw_ifKlemens Nanni
This audio(9) struct will lose a member, but drivers init their struct quite inconsistently, most pre-C99 style. Use C99 style everywhere, to get rid of all annoying differences and allow for easy member removals/additions: - don't change current order of members - no explicit NULL members - no comments or blank lines - trailing comma in last member line GENERIC.MP builds fine with this on arm64, amd64, i386 and sparc64. macppc and alpha build-tested by miod OK ratchov miod
2022-10-19Remove audio(9) setfd() stubKlemens Nanni
necsb(4/luna88k) is the only driver that "implements" it... through EIO. Remove it so setfd can be removed from struct audio_hw_if. Prodded by ratchov OK aoyama
2022-10-15ansiJonathan Gray
2022-10-14Pass boot device information from bootloader to kernel.Kenji Aoyama
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.
2022-10-14No point in luna88k setting D_VENDOR since all actual uses areKenneth R Westerback
inside #ifdef SUN_CYLCHECK or #ifdef SUN_AAT0 blocks in disklabel(8), neither of which are defined for luna88k. ok miod@
2022-10-11Give checkdisklabel() a new parameter supplying the dev_t of theKenneth R Westerback
device whose disklabel is being checked. Within checkdisklabel() use this information to discover a device name iff (sic) the label is an obsolete version. Use the name to generate a meaningful warning message asking the user to rewrite the disklabel and thus promote it to the current version. Suggested by, feedback from and ok deraadt@
2022-09-23Delete unused variables originally come from mvme88k.Kenji Aoyama
2022-09-02Constify nam2blk[], chrtoblktbl[] and octeon devmap[].Miod Vallat
ok mpi@ millert@
2022-09-01Stop setting d_bbsize and d_sbsize. Nobody has paidKenneth R Westerback
any attention for some time. ok otto@ as part of larger diff
2022-08-29static inline, not inline staticJonathan Gray
c99 6.11.5: "The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature." ok guenther@
2022-08-23Added NFS client support to RAMDISK kernel as the same as other platforms.Kenji Aoyama
Tested by me.
2022-08-13avoid uninitialised var when boot_unit has an unexpected valueJonathan Gray
tested by and ok aoyama@
2022-08-12Fix to work 1bpp Xorg server again on 1bpp framebuffer hardware.Kenji Aoyama
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.
2022-08-10match other archs use %s for version printfJonathan Gray
2022-08-08Change branch condition inverted to realize original intention inKenji Aoyama
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@
2022-07-15Implement support for framebuffers that don't start on a page boundary.Mark Kettenis
This happens on the new 14" and 16" Macbook Pro where we deliberately use a framebuffer that skips the first few lines to avoid "the notch". The offset of the first pixel is added to struct wsdisplay_fbinfo. The stride is added as well, mirroring the value returned by the WSDISPLAYIO_LINEBYTES ioctl, such that we can retire that one in the future. A compat ioctl is implemented to help the transition. The compat code will be removed after OpenBSD 7.3 has been released. ok miod@
2022-06-28Remove unused field d_poll from struct cdevsw.Visa Hankala
OK miod@ mpi@
2022-05-19Now MULTIPROCESSOR kernel boots with CPU modules installed inKenji Aoyama
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.
2022-04-16constify SCSI adapter entry pointsChristian Weisgerber
ok krw@
2022-04-06constify struct cfattachChristian Weisgerber
2022-03-21Constify struct {audio,midi,radio,video}_hw_if. No functional change.Miod Vallat
ok mpi@ ratchov@ "More const is good" deraadt@
2022-03-05Move initial ROM console related codes into separated luna88k/romcons.cKenji Aoyama
file. No functional change, tested by me.
2022-03-05Move CPU-CMMU association report into #ifdef DEBUG section.Kenji Aoyama
This was useful in early days of porting OpenBSD to LUNA-88K, but now more detailed information is shown in dmesg. Tested by me.
2022-02-16Make room for a cookie argument passed to audio_attach_mi(). CurrentlyAnton Lindqvist
unused but intended to be used to correlate audio and wskbd devices. ok ratchov@
2022-02-14Delete incomplete implementation of bus_space_{alloc,free} in bus.h.Kenji Aoyama
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@
2021-11-11Retire switch(4) it never really was production ready and the OpenFlowClaudio Jeker
API implemented is a deadend. OK akoshibe@ yasuoka@ deraadt@ kn@ patrick@ sthen@
2021-10-24extra 0 fields in cfdriver are not neededTheo de Raadt
2021-09-25Fix a possible race condition in spc_msgin().Kenji Aoyama
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.
2021-09-25Add $OpenBSD$ keyword and correct spelling.Kenji Aoyama
2021-09-17Sync 1bpp initial palette setting with NetBSD/luna68k.Kenji Aoyama
Tested by me on 1bpp framebuffer got recently.
2021-07-31Fix displaying incorrect patterns on LUNA's wscons with 1bppKenji Aoyama
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.
2021-07-25Force to use serial console when no graphic board is found.Kenji Aoyama
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.
2021-03-11spellingJonathan Gray
2021-02-23Make more efficient clearing interrupts on all processors at boot time.Kenji Aoyama
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.
2021-01-28Again allow COPTS= to come from the environment again, and don't lose theTheo de Raadt
SMALL_KERNEL specific variations. ok espie jsg
2021-01-09Now we do not call ttyopen() in sioopen(), we do not need the variableKenji Aoyama
'error' anymore.
2021-01-01Remove useless redundant call of ttyopen().jan
Also remove dead DIALOUT macro. ok mpi@
2020-12-09Use daddr_t and not daddr32_t in boot media.Kenneth R Westerback
At a minimum, amd64/i386 should now boot from 4TB GPT formatted disks. More daddr32_t terminations with extreme prejudice to follow. Tested by various, in snaps for a few days. ok deraadt@