Commit Graph

1835 Commits

Author SHA1 Message Date
abs
a192b2c217 Abstract out setting of '-m680X0' based on -DM68020, -DM68030,
-DM68040, and -DM68060 into sys/arch/m68k/Makefile.cmachflags and
include from both atari and amiga. Other m68k ports which build
kernels that support multiple CPU types can also switch across to
this.
2009-01-25 22:25:08 +00:00
mrg
c6a4afa995 add COMPAT_50 to all the configs with COMPAT_40. 2009-01-24 05:06:05 +00:00
tsutsui
1e5c3b25c8 Replace multi-statement macro using GCC extension `({})' with
static inline functions to avoid possible side effects or confusion.

Tested on TT030 by David Ross and on Falcon by Tuomo Makinen on port-atari.
2009-01-24 02:02:38 +00:00
tsutsui
6d3b1b1ecd Use pmap_kenter_pa(9) to map msgbufpa as other m68k ports.
Tested on TT030 by David Ross and on Falcon by Tuomo Makinen on port-atari.
2009-01-24 02:01:01 +00:00
abs
548de22a7a - Rename BOOT to SMALL030 and trim some more fat
- Drop BOOTX
- Regenerate everything else - only changes in comments
2009-01-24 00:22:12 +00:00
abs
3a821eebde - Merge ATARITT.in and FALCON.in into GENERIC.in so we can generate
a sane kernel config which defines both of them
- Cleanup all the #if defined(FOO) entries to be consistent and have
  a matching /* FOO */ on the #endif line
- No change to generated ATARITT/FALCON/HADES/MILAN-ISAIDE/MILAN-PCIIDE
- Rename BOOT to SMALL030 and trim a little more to save space.
- Drop BOOTX
2009-01-24 00:19:47 +00:00
he
d4b1297c8f Re-adapt to the changed return types for major() and minor(). 2009-01-21 16:24:33 +00:00
tsutsui
00ae5151a8 Move extern decls for Sysseg, Sysptmap, Sysptsize, mem_size, virtual_avail,
virtual_end, and protection_codes[] to common <m68k/pmap_motorola.h>,
and also make protection_codes[] unsigned.

XXX: avail_start and avail_end should also be moved, but it causes
XXX: -Wshadow warnings in uvm/uvm_page.c:uvm_page_physload() and
XXX: I don't have a good idea of alternative names for now.
2009-01-17 07:17:35 +00:00
tsutsui
77938e8d54 Use firm_gettime() to retain compatibility with old firm_event. From amiga. 2009-01-17 05:23:28 +00:00
tsutsui
b5ead86432 Use PRIu64 to print 64 bit dev_t (for now). 2009-01-17 05:22:00 +00:00
tsutsui
145f39b7b6 Don't install built boot.atari loaders into / of DESTDIR because
there are two variants of boot.atari per machine types (std or milan)
and they should be selected and copied from /usr/mdec/{std,milan} dirs
to /targetroot during installation.

Problem on default installation with sysinst was reported by David Ross.
2009-01-13 13:44:01 +00:00
yamt
70de973662 g/c BUFQ_FOO() macros and use bufq_foo() directly. 2009-01-13 13:33:58 +00:00
tsutsui
fe5a481b54 Fix PR port-atari/40315: Bootloader fails on Atari TT030
Add asm sources which provide a fixed entry point for raw bootxx and bootxxx
 because modern aggressive gcc4 may reorder functions in the same source
 and the first function in a C source won't always appear at the beginning
 in its object.

Also overhaul various files in the stand directory:
- rename stand/Makefile.inc to stand/Makefile.booters and
  explicitly include it from each Makefile because the stand
  directory contains non standalone programs like installboot and
  Makefile.inc will be included implicitly from all Makefiles in SUBDIRs
- put more common options into Makefile.booters so that
  all boot programs use proper options (-Os etc.)
- make standalone boot programs compile without installed ${DESTDIR}:
  - create machine and m68k symlinks in ${.OBJDIR} in all boot programs
  - set appropriate make environments to suppress errors and warnings
  - <string.h> isn't there in _STANDALONE case
  - put #ifdef TOSTOOLS (looks equivarent with !_STANDALONE)
    to some files in stand/tostools
  - use ${LD} ${LINKFLAGS} rather than ${CC} ${LDFLAGS}
- create raw binaries on ${PROG} target rather than on beforeinstall
  and stop weird renaming on beforeinstall and afterinstall
- print proper error message if bootxx size is larger than limit
- create ${DESTDIR}/usr/mdec/{milan,std} directories on beforeinstall
  in all boot programs
  (XXX: how can we put MD /usr/mdec/foo directories into src/etc/mtree?)
- prototype warnsfy
- cleanup Makefiles for readablity and remove unnecessary rules
- no need to use daddr_t in installboot because the AHDI label doesn't
  support 64 bit block numbers

Tested by David Ross (PR submitter) on port-atari, and
finally NetBSD/atari on TT030 is now fully functional.

Should be pulled up to netbsd-4 (where gcc4 was initially imported)
and netbsd-5.
2009-01-06 13:35:30 +00:00
tsutsui
636ff16d48 Use howmany(x, y) rather than roundup(x, y)/y. No binary change. 2009-01-04 04:18:35 +00:00
tsutsui
cff68ad349 Sync with an update on amiga:
Rewrite a weird calculation marked "XXX fix calculations XXX"
for an index value of lev2 segment table for the kernel Sysptmap
with more meaningful expressions and PAGE_SIZE independent macro.
Also use "~0" rather than "-1" for an unsigned bitmap value.

Should produce the same results and no functional change.

Tested on Falcon with 68060 by Tuomo Makinen.
2009-01-03 07:11:02 +00:00
tsutsui
c61c988be5 Raise IPL to splsoftnet() before calling callback functions registered
via (atari specific) add_sicallback(), as a workaround hack.

Many drivers which use the MD sicallback depend on BASEPRI() macro
defined in <machine/cpu.h> to check nested interrupts,
but functions invoked from MI softint(9) won't run at IPL_SOFT
any longer and the BASEPRI() macro doesn't return expected value
as the past.

Fixes lost interrupt problem on Falcon wdc(4) reported by
Tuomo Makinen on port-atari, and also confirmed by him.

Should be pulled up to netbsd-5.
2009-01-03 06:36:58 +00:00
tsutsui
cf6816d68a Update one more comment which was missed in previous. 2009-01-02 04:38:09 +00:00
tsutsui
21ac960f24 Remove declarations of CADDR1, CADDR2, and vmmap.
These variables have been moved into pmap_bootstrap.c
and <m68k/pmap_motorola.h> has extern decls for them.
2009-01-01 08:11:45 +00:00
tsutsui
8e2bef0189 Pull the following amiga's pmap changes to atari:
arch/amiga/amiga/amiga_init.c		1.95-1.97, 1.100-1.102
arch/amiga/amiga/pmap.c			1.123, 1.126-1.131, 1.142, 1.145
arch/amiga/amiga/pmap_bootstrap.c	1.1, 1.2, 1.3, 1.4
arch/amiga/conf/files.amiga		1.137
arch/amiga/include/pcb.h		1.16
arch/amiga/include/pmap.h		1.44
arch/amiga/include/pte.h		1.19
arch/amiga/include/vmparam.h		1.35

- change kernel address space layout (i.e. move Sysmap to the end of KVA)
  to match other m68k ports, which should be done on yamt-km merge
- rework pmap_zero_page(), pmap_copy_page() and some more other functions
  to make them compatible with m68k/pmap_motorola.c
- move pmap_bootstrap() into a separate file to allow using either
  the atari pmap.c or the m68k common pmap_motorola.c
- use common m68k include files, pcb.h, pmap_motorola.h, and pte_motorola.h
- misc style and cosmetic changes

Most merge work is done by Tuomo Makinen, and
miscellaneous fixes and cleanups are done by me.

Tested on Falcon with both 68030 and 68060 by Tuomo, and
also tested on TT030 by David Ross on port-atari.

Should be pulled up to netbsd-4 (it requires at least Sysmap changes)
and netbsd-5.
2009-01-01 04:10:25 +00:00
tsutsui
d38ce2ebbc Pull a change from amiga/pmap.c rev 1.124 for yamt-idlelwp merge. 2009-01-01 03:43:30 +00:00
tsutsui
baffe80103 Remove quite obsolete pcb_cmap2. 2008-12-31 11:11:05 +00:00
tsutsui
7d8d4998c1 Fix broken RCS Id. 2008-12-28 23:00:39 +00:00
tsutsui
fd6ad22aed Clear bp->b_oflags (introduced on vmlocking2 merge) before read
rather than calling brelse(9) after read.
Tested by Tuomo Makinen on port-atari.

Should fix pool panics during installation reported by David Ross
on port-atari:
http://mail-index.NetBSD.org/port-atari/2008/11/13/msg000113.html
and actually close PR port-atari/39850.
2008-12-28 03:13:59 +00:00
tsutsui
8a0754e5d7 Account idepth in all interrupt handlers in locore.s. 2008-12-27 16:17:24 +00:00
tsutsui
d79dc17147 Sprinkle volatile to bus_space(9) access functions. 2008-12-27 16:14:12 +00:00
cegger
dcf705893e use M_ZERO on malloc() and remove subsequent bzero(). 2008-12-19 18:49:37 +00:00
he
1c6fe739fe Correct two typos and remove a now-unused variable to make this
build again.
2008-12-18 10:58:17 +00:00
christos
9a5d3f2817 replace bitmask_snprintf(9) with snprintb(3) 2008-12-16 22:35:21 +00:00
pooka
ee352f3d33 Make kernel_pmap_ptr a const. Requested by steve_martin. 2008-12-10 11:10:17 +00:00
pooka
29d439f898 Make pmap_kernel() a MI macro for struct pmap *kernel_pmap_ptr,
which is now the "API" provided by the pmap module.  pmap_kernel()
remains as the syntactic sugar.

Bonus cosmetics round: move all the pmap_t pointer typedefs into
uvm_pmap.h.

Thanks to Greg Oster for providing cpu muscle for doing test builds.
2008-12-09 20:45:44 +00:00
martin
719a906ef5 As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.
2008-11-30 18:21:31 +00:00
ad
93ea4650a6 dumpsys: don't spew numbers into the log. 2008-11-25 15:51:34 +00:00
ad
6ba528b5bc Remove softdep, pass 1. We are focused on improving journalling.
Proposed on tech-kern@.
2008-11-24 11:41:07 +00:00
abs
b53939be13 To be safe, do not use DMA for Falcon - from Tuomo 2008-11-15 21:35:31 +00:00
abs
5dd888f5c3 Since dl.d_type is always "unknown" now, pick the type of bootblock to
install based on the device name: eg /dev/fd0c would be floppy
2008-11-15 21:33:12 +00:00
abs
58051692c8 Remove bogus DEBUG uvm_map() calls - (sync with amiga pmap). From Tuomo 2008-11-15 21:30:50 +00:00
abs
85609809d6 Regenerate: Increase min ST_POOL_SIZE from 22 to 24 to avoid out of ST memory issues. Tested by Tuomo 2008-11-15 21:22:03 +00:00
abs
53aa0265b2 Increase min ST_POOL_SIZE from 22 to 24 to avoid out of ST memory issues. Tested by Tuomo 2008-11-15 21:21:23 +00:00
ad
0efea177e3 Remove LKMs and switch to the module framework, pass 1.
Proposed on tech-kern@.
2008-11-12 12:35:50 +00:00
dyoung
94d985722a It is not appropriate to call pmf_system_shutdown(9) from
doshutdownhooks(9): shutdown hooks registered by shutdownhook_establish(9)
expect to be called with interrupts disabled, but shutdown hooks
registered with pmf_device_register1(9) expect to be called with
interrupts enabled.  So I have made two changes:

1 Do not call pmf_system_shutdown() from doshutdownhooks().  Instead,
change every call to doshutdownhooks() to a call to doshutdownhooks()
followed by a call to pmf_system_shutdown().  No functional change
is intended by this change.

2 Make i386 re-enable interrupts briefly while it calls
pmf_system_shutdown().  I leave it to others either to fix the
other ports, or to factor out some MI shutdown code, as joerg@
suggests, and fix that.  Note that a functional change *is* intended
by this change.

I hope that this patch will stop us from flip-flopping between
calling doshutdownhooks() and pmf_system_shutdown() sometimes with
and sometimes without interrupts enabled.
2008-11-11 06:46:40 +00:00
abs
66b0aa634e Regenerate from GENERIC.in 1.75
Enable 68060 support in FALCON & BOOTX kernels for CT60/63 upgrades
Drop KERNFS from INSTALL kernels
Drop 68040 support from ATARITT kernels
2008-11-09 07:50:39 +00:00
abs
0282f5b26e Enable 68060 support in FALCON & BOOTX kernels for CT60/63 upgrades
Drop KERNFS from INSTALL kernels
Drop 68040 support from ATARITT kernels
2008-11-09 07:49:59 +00:00
abs
96dc40fee6 Add the following note to README:
Please commit changes to 'GENERIC.in' and other source files *first*, then
 run 'makeconf' and commit the generated files to ensure the 'Created from:'
 tags are correct.

Then follow it. Noted by tsutsui@
2008-11-06 17:12:20 +00:00
abs
09149f66a7 Add a note that SERCONSOLE breaks on the Falcon, and remove from
FALCON config.
2008-11-05 23:55:06 +00:00
abs
d36d67412b Another fix from Tuomo Makinen - Use brelse() to unbusy bp buffer
to allow user to swap floppy disks when prompted.
2008-11-04 17:08:45 +00:00
abs
7bb734ab12 Move tc_init(&clk_timecounter); to stop the "timecounter:" message
appearing in the middle of the clock0 attach message. Tested by
Tuomo Makinen
2008-11-04 16:43:47 +00:00
abs
87d661967a Cleanup spelling and syntax in a comment 2008-10-29 14:31:01 +00:00
abs
eb89868e67 Remove unwanted 'xs->xs_status |= XS_STS_DONE' which caused scsipi_done()
to bail out early.
Found by T. Makinen, and additional confirmation by David Ross
2008-10-28 11:44:14 +00:00
apb
f46c1de7cb Use ${TOOL_SED} instead if plain sed in Makefiles. 2008-10-25 22:27:34 +00:00
apb
96230fab84 Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.
2008-10-19 22:05:19 +00:00