CVS commit: src/sys/arch/luna68k/luna68k

"Jason R Thorpe" <[email protected]>
Newsgroups gmane.os.netbsd.devel.cvs
Message-ID <[email protected]>
Module Name:	src
Committed By:	thorpej
Date:		Sun Mar 15 17:54:54 UTC 2026

Modified Files:
	src/sys/arch/luna68k/luna68k: genassym.cf

Log Message:
Clean-up / consolidation of m68k bus error / address error handling
code.  This is not a very radical change for most m68k platforms,
since they were using a version of this re-factored code already via
an #include directive in locore.s.  Now, however, the bus error handlers
are split into CPU "generation"-specific files, and brought into the
kernel via the CPU options in the kernel config file (the goal being
to reduce boilerplate in each locore.s).

The more notable changes:
- amiga and atari no longer have their own copy of each handler, and
  some of their local tweaks have been folded into the shared code.
- sun2's bus error handling code has been re-factored into a shared
  buserr_10.s to facilitate support for other 68010-based systems (all
  of which have their own custom MMU).
- sun3's bus error handling code has been re-refactored into the
  shared buserr_2030.s.  The Sun3-specific MMU handling is treated
  just like the HP-specific MMU handling that was already there.
  This additional #ifdef is a small price to pay for more code sharing.
- sun3x now also uses the shared buserr_2030.s rather than an identical
  local copy of the 68030 MMU handling.

Other minor changes:
- Get rid of magic numbers used a trap frame offsets in the bus error
  handlers; provide proper assym.h constants for them, and add comments
  to each handler describing which format(s) the CPU will use (68010
  uses Format 8, 68020 and 68030 use Format A or Format B depending
  on whether or not the error occurred on an instruction boundary,
  68040 and 68060 use Format 2 for address error, 68040 uses Format 7
  for bus error and 68060 uses Format 4).
- No longer a need for MACHINE_BUSERR_HANDLER or MACHINE_ADDRERR_HANDLER
  hooks, so go ahead and garbage-collect those.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/luna68k/luna68k/genassym.cf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.