Commit Graph

50578 Commits

Author SHA1 Message Date
matt d97095d58e Get rid of l_addr references pulled in via merge. 2009-12-14 04:37:02 +00:00
mrg 97c80e8ff0 replace mips:elf_check_itp() and ELFNAME2(netbsd32,probe_noteless) that
it's based upon with a common compat_elf_check_interp().

tested on MALTA64 and sparc64.
2009-12-14 04:09:38 +00:00
mrg a06fd79f93 forward declare struct exec_package 2009-12-14 03:20:27 +00:00
matt 290a34a065 Merge from matt-nb5-mips64
Merge mips-specific arch files.
2009-12-14 00:45:59 +00:00
jakllsch 8cdfba11fe Shut down the PXE network stack when we are done with it.
This fixes an issue where a CK804 nfe(4) would have a
byte-reversed MAC address after pxeboot(8).
2009-12-13 23:01:42 +00:00
tsutsui 1a8ce335ce - update some comments
- use unsigned constant for shift op
2009-12-13 12:32:46 +00:00
tsutsui f5d0565d90 Replace a couple of magic numbers with proper macro. 2009-12-13 12:21:26 +00:00
tsutsui 626b27405b Now we have Sysseg_pa value so no need to calculate it from KVA Sysseg.
Tested on hp300.

XXX: mac68k seems to have a different VA vs PA mechanism so I leave it for now.
2009-12-13 11:24:02 +00:00
tsutsui e180a79423 Split device_t/softc, some KNF. 2009-12-13 11:10:50 +00:00
tsutsui 75b234b3c3 Use todr_[gs]ettime_ymdhms() format. 2009-12-13 11:03:33 +00:00
tsutsui 8d72c85f6f Put srt0.S to SRCS, not in dependencies for target all. 2009-12-13 08:36:01 +00:00
tsutsui 9a96349d3d Pull a fix from mvme68k:
Create machine and ${MACHINE_CPU} symlinks properly and
 remove unnecessary dependencies so that parallel build works.
2009-12-13 08:32:57 +00:00
nakayama 3e1e45a4ab Merge change of OpenBSD rev 1.20:
Remove debug printf and properly dequeue command instead when a read times out
on LOMLite2.
2009-12-13 05:21:06 +00:00
nakayama 1c54a66d99 System utilities, boot programs and kernel modules are machine
(port) specific not CPU, so use MACHINE not MACHINE_ARCH.
2009-12-13 05:01:32 +00:00
nonaka 82dabf8c63 comment out KLOADER. 2009-12-13 04:36:02 +00:00
tsutsui 679db53719 Allow NetBSD/hp300 kernel work with PGSHIFT==13, i.e. 8KB/page.
Tested on HP9000/382 with 68040.

XXX: 8KB/page won't work on HP MMU machines (i.e. HP320 and HP350).
2009-12-12 16:37:22 +00:00
skrll aae0dc7c17 Correct/add comments. 2009-12-12 15:25:32 +00:00
tsutsui 471e528b58 Remove `volatile' qualifier from argument types of
struct timeval passed to todr_gettime(9) and todr_settime(9).
We no longer have an ancient and volatile struct timeval `time'
global since we have switched to MI timercounter(9) on all port.

XXX1: some of these RTC drivers still assume 32bit time_t
XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms()
XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms()
2009-12-12 14:44:08 +00:00
nonaka 671ae66041 report collect charge state. 2009-12-12 14:29:34 +00:00
nonaka 90e9d6e92e Use mutex(9). 2009-12-12 13:12:49 +00:00
phx a58c4d9e81 Reverted the CIA-timer based delay() to the pre-5.0 method of a calibrated
delay loop.
This fixes keyboard handshaking problems with some A1200 models since 5.0
and restores the precision for short delays on DraCo systems (the QuickLogic
timer has only a seventh of the CIA precision).
Changed the keyboard handshaking delay from 2000 back to 200ms, although
even the recommended 85ms were successfully tested on the most problematic
A1200 keyboards.
All those changes were tested on an A3000 and A1200 with 68060/50 CPU, and
previously discussed on the port-amiga ML.
2009-12-12 13:10:36 +00:00
martin 3ec6df1964 Clear new pcb in cpu_lwp_fork, now that this seems to no longer be
guaranteed to be zeroed memory after the uarea swap changes.
XXX shouldn't we zero the new uarea upfront in MI code before calling
uvm_lwp_fork?
2009-12-12 12:23:29 +00:00
martin f714d75546 Fix register usage in previous proc0paddr->lwp0.l_addr change: do not
overwrite %r1 yet, it is later used to calculate the kernel stack pointer.
As a side effect the right value is stored in $PR_PCBB again.
2009-12-12 12:19:21 +00:00
nonaka a75e0b5b4d use APM_BATT_FLAG_CHARGING. 2009-12-12 11:38:45 +00:00
tsutsui 080cfc2189 Allow NetBSD/mac68k kernel work with PGSHIFT==13, i.e. 8KB/page.
Tested on LC630 with 68LC040.
2009-12-12 09:55:44 +00:00
tsutsui 1f792f80d1 Allow NetBSD/news68k kernel work with PGSHIFT==13, i.e. 8KB/page.
Tested on NWS-1750 with 68030.
2009-12-12 09:54:42 +00:00
nonaka c54868835c Use tpcalib_ioctl() instead of hpc_tpanel_ioctl(). 2009-12-12 07:49:31 +00:00
tsutsui 789c74706a Use appropriate macro during pmap initialization:
- use SYSMAP_VA, SEGSHIFT for Sysmap address and table entries
- use TIA_SIZE, TIB_SIZE for sizes of table entries

Now page size dependent numbers are almost replaced with proper macro.

Tested on atari, hp300, and news68k.
2009-12-11 22:23:08 +00:00
tsutsui adfe5ab281 Fix (probably fatal) typo on yamt-km merge back on 2005. 2009-12-11 20:00:49 +00:00
tsutsui 095a9b6e17 MAXADDR used for PA == VA mapping should be page size dependent. 2009-12-11 19:43:18 +00:00
tsutsui 6f99640dde Fix leftover botch in rev 1.48:
Remove initialization of protection_codes[] which has been movde into
 pmap_bootstrap_finalize().
2009-12-11 19:36:05 +00:00
tsutsui cf5f9350fc Define SYSMAP_VA in <m68k/pmap_motorola.h>
where the Sysmap pointer is declared.
2009-12-11 18:57:44 +00:00
tsutsui a1b485666f NBSG is not used in this file so remove unnecessary comment and include. 2009-12-11 18:45:05 +00:00
tsutsui 1a88b50bca Include pmap.h or pmap3.h instead of param.h for NBSG to handle MMU. 2009-12-11 18:42:05 +00:00
tsutsui 648c35441c Export NBSG for bootloaders. MMU is enabled even on PROM on sun68k machines. 2009-12-11 18:40:08 +00:00
tsutsui 8c1c2fcdd0 Export pmap_procwr() declaration only #ifdef _KERNEL. 2009-12-11 18:31:27 +00:00
tsutsui 1401e77eb0 Move uvm_setpagesize() calls from locore.s to pmap_bootstrap_finalize().
Also explicitly set uvmexp.pagesize to prepare 8KB/page settings.

XXX: There is #ifdef !defined(amiga) && !defined(atari) workaround
XXX: because they have different pmap initialization functions.
2009-12-11 18:28:35 +00:00
tsutsui 465857f028 Refactoring MD segment related definitions on m68k ports:
- move macro SEGSHIFT, NBSEG, and SEGOFSET from <machine/param.h>
  to <m68k/pmap_motorola.h> where they should belong
- also simplify NBSEG macro for both 020/030 and 040/060 cases
- also move m68k_trunc_seg(), m68k_round_seg(), and m68k_seg_offset()
  (that use SEGOFSET) from <m68k/param.h> to <m68k/pmap_motorola.h>
- add comments about each segment size value used on pmap_motorola
  implementation
- add TIA_SIZE, TIA_SHIFT, TIB_SIZE, and TIB_SHIFT macro which can be
  used for ste/pte index sizes
- use proper vaddr_t cast instead of unsigned for SEGOFSET/PGOFSET macro

Tested on atari, hp300, and news68k.
2009-12-11 17:53:22 +00:00
tsutsui 73bba0e6a2 Refactoring MD segment related definitions on m68k ports:
- move macro SEGSHIFT, NBSG, and SEGOFFSET from <machine/param.h>
  to <machine/pmap.h> where they should belong
- don't use m68k_round_seg() and m68k_trunc_seg() in sun2 pmap sources
  and instead define and use sun2_round_seg() and sun2_trunc_seg()
  since they are quite pmap implementation dependent
2009-12-11 13:56:15 +00:00
tsutsui ce06f8d54c Refactoring MD segment related definitions on m68k ports:
- move macro SEGSHIFT, NBSG, and SEGOFFSET from <machine/param.h>
  to <machine/pmap.h> where they should belong
- don't use m68k_round_seg() and m68k_trunc_seg() in sun3 pmap sources
  and instead define and use sun3_round_seg() and sun3_trunc_seg()
  since they are quite pmap implementation dependent
2009-12-11 13:52:57 +00:00
matt 0a8b38422e Add PRIx{P,V}{ADDR,SIZE}, PRIu{P,V}SIZE, and PRIxREGISTER{,32,64} for all
(except where they will be added via merge).  These should be used to print
{p,v}{addr,size}_t and register*_t as appropriate.
2009-12-11 05:52:03 +00:00
matt 6a9e4e8eeb Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly
involves setregs and vmcmds).  Should result in no code differences.
2009-12-10 14:13:48 +00:00
uch 612627584e u-area is no longer zero-cleared. reset here 2009-12-10 13:35:32 +00:00
nakayama fb022d0910 iommu_dvmamap_load:
Split a segment if its size is larger than dm_maxsegsz.

iommu_dvmamap_load_raw:
Don't coalesce segments if total size is larger than dm_maxsegsz.

This should fix port-sparc64/35299.
2009-12-10 12:29:44 +00:00
rmind e9f7af26e6 Rename L_ADDR to L_PCB and amend some comments accordingly. 2009-12-10 05:10:00 +00:00
dsl 7a42c833db Rename fo_drain() to fo_abort(), 'drain' is used to mean 'wait for output
do drain' in many places, whereas fo_drain() was called in order to force
blocking read()/write() etc calls to return to userspace so that a close()
call from a different thread can complete.
In the sockets code comment out the broken code in the inner function,
it was being called from compat code.
2009-12-09 21:32:58 +00:00
he 8529946f44 Make this one build again. 2009-12-09 12:42:59 +00:00
tsutsui d7debedc42 Fix wrong NBSEG values for all hp300 pmap derived m68k ports.
They were incorrect since 1997 on amiga and atari, and since 2002
on other ports, but fortunately they don't look so fatal.

Anyway, these values will be moved into <m68k/pmap_motorola.h> soon
since they are quite pmap implementation dependent.
2009-12-09 12:21:58 +00:00
tsutsui 5f1f616644 Remove unused M68K_SEG_SIZE macro. All sources use NBSEG directly.
XXX: It looks NBSEG definitions in <machine/param.h>
XXX: for all m68k port are incorrect, since 1997 or 2002.
2009-12-08 15:32:01 +00:00
tsutsui 7a77e181aa Use PGSHIFT from <machine/param.h> for PAGE_SHIFT.
We can assume PGSHIFT is always constant on current
m68k pmap_motorola implementation.
Also fix some leftover HP300 comments on some ports.
2009-12-08 13:47:26 +00:00