Commit Graph

50578 Commits

Author SHA1 Message Date
rmind 891259c1af Use lwp_getpcb() on mips, powerpc and sh3, clean from struct user usage. 2009-11-21 17:40:27 +00:00
rmind 92b21522e9 Missed fix for Xen builds. 2009-11-21 15:38:43 +00:00
rmind 12193ee3b4 Use lwp_getpcb() on hppa and ia64, clean from struct user usage. 2009-11-21 15:36:33 +00:00
rmind 23d62c72ca Include sys/user.h for MD proc.h (hppa and m68k ports). 2009-11-21 15:13:14 +00:00
tsutsui 19d7d2e19d Reduce diffs against GENERIC. 2009-11-21 13:19:04 +00:00
tsutsui 371d5c2321 - more options<space><tab>
- capitalize Ethenet
2009-11-21 12:15:55 +00:00
tsutsui 27ba005b8e - use options<space><tab>
- remove an extra whitespace
2009-11-21 12:09:15 +00:00
dsl 3adafc2801 Replace EPIA_HACK code with a version that 'just' trashes any return
address cache.  This seems to be rather more effective!
This seems to be adequate and is more justifyable than the previous hack.
2009-11-21 11:54:47 +00:00
dsl ef19c35a6d Preserve %ds over bios calls.
Not strickly necessary because real_to_prot doesn't normally rely on in.
However it caused much confusion while debugging, and does no harm.
2009-11-21 11:52:57 +00:00
kiyohara 16ef4dd6d8 The variable ckenreg is used only when defined macro {FF,ST,BT,HW}UARTCONSOLE. 2009-11-21 08:41:38 +00:00
kiyohara f97cdf80e0 Fix a bug.
sc = device_private(self);
  sc->dev = self;
2009-11-21 08:33:50 +00:00
rmind 448807fa21 Catch-up Xen and usermode with lwp_getpcb() and unbreak Xen build. 2009-11-21 05:54:04 +00:00
rmind 498ef96f10 - Use lwp_getpcb() on Alpha.
- Replace and clean struct user usage, slightly simplify some code parts.
- Include sys/user.h in MD proc.h .
2009-11-21 05:35:40 +00:00
rmind 8065606a88 - Use lwp_getpcb() on VAX, clean from struct user usage.
- Include sys/user.h in MD proc.h .
2009-11-21 04:45:39 +00:00
rmind a626cff9ae Use lwp_getpcb() on sparc{64} and sun2/3 MD code, clean from struct user usage. 2009-11-21 04:16:51 +00:00
rmind 368037b555 Include sys/proc.h for sparc/sparc64, which is required for now. 2009-11-21 04:04:07 +00:00
rmind 3c2bd91e81 Use lwp_getpcb() on x86 MD code, clean from struct user usage. 2009-11-21 03:11:00 +00:00
dsl ccd3c03880 EXT13_DEVPATH_SIGNATURE should be EXTINFO_DEVPATH_SIGNATURE 2009-11-20 19:25:37 +00:00
dsl 8987b9ee60 Change relay address for mbr and bootxx code to be 0x8800.
I'm not sure why I used 0x600, but I have a feeling that might
sometimes corrupt bios data.
0x8800 is far enough above 0x7e00 for a sector read to the latter address.
2009-11-20 17:28:19 +00:00
dsl 9c09cc2745 Add 32 bit versions of message and dump_eax that write directly to
the serial port. Useful for debugging - especially real_to_prot!
2009-11-19 22:13:17 +00:00
dsl bde6465dfb Move code for outputting directly to the serial port into message.S
Allows it to be enabled for other parts of the boot sequence.
2009-11-19 22:10:03 +00:00
dsl cc7a493e8e Shorten slightly 2009-11-19 22:08:14 +00:00
skrll 71dad8f507 Fix itlb_cf and dtlb_cf. 2009-11-19 19:28:14 +00:00
dyoung d53ef3367c wdcactivate() is gone, don't use it. 2009-11-18 22:51:07 +00:00
dsl c32688c3c2 Reinstate the banner.
This was added to detect problems when the mbr code gets written into the pbr.
(When the code loops reading the pbr!)
It is also a useful diagnosting that the boot it proceeding normally.
2009-11-18 21:04:12 +00:00
dsl 1e2fe5a0f2 Reinstate the 'banner'.
It is a useful diagnostic that the boot sequence is proceeding.
2009-11-18 21:02:16 +00:00
dsl eae5810c3d Adjust the way references to the unrelocated addresses are done so
that the address doesn't have to be passed in.
Adjust #ifdef so that only one item is checked - at it is the one used.
2009-11-18 20:51:22 +00:00
dsl 1dc876966b Keep the output of 'ld' prior to extracting the image.
Useful for debugging (etc) since it contains the symbols.
2009-11-18 20:33:39 +00:00
dyoung 626b8b2a34 Don't #include <sys/extent.h> any more because this module doesn't use
struct extent any more.
2009-11-17 23:51:59 +00:00
dyoung 26ed60379e Delete unused functions eisa_mem_alloc() and eisa_mem_free(). 2009-11-17 23:46:27 +00:00
dyoung a3cf1aee4a Fix spelling in a comment, s/extentions/extensions/. 2009-11-17 23:45:39 +00:00
dyoung 98c8bebd28 Fix spelling in comments, s/extention/extension/. 2009-11-17 22:35:43 +00:00
nakayama cb838e534b Merge changes between revision 1.16 and 1.19 of OpenBSD with
shutdownhook_establish(9) to pmf(9) conversion:

- LOMlite seems to get wedged from time to time; add some code to unwedge it.

- Make sure we don't insert and entry into the list of pending commends twice.

- Establish a shutdown hook to disable the watchdog timer to prevent watchdog
  triggers after the kernel has been halted.

- Handle LOMlite2 in an interrupt-driven way; avoids using delay(9) once the
  machine is up and running.
2009-11-16 13:11:51 +00:00
snj ac9f09c8c7 Drop 3rd and 4th clauses (except in one case, where copyright is shared
with UCB and only the 3rd clause is dropped).  Approved by mhitch@ and is@
(copyright holders).
2009-11-15 20:38:35 +00:00
dholland 470c8bf181 Declare trap name array as extern const char *const [] to match how
it's defined in trap.c. (Should really be in a header, of course.)
Compile-tested.
2009-11-15 18:41:31 +00:00
dholland e460740976 Remove PROTO(), which is like _P() only spelled differently.
The change causes gcc to harmlessly permute two instructions in the output
for some reason, but otherwise has no effect on the generated code.
2009-11-15 18:27:40 +00:00
dholland 268f060954 Since this is a host program, fix some 64-bit cleanliness issues. 2009-11-15 18:24:23 +00:00
dholland 3b3360c119 Declare trap name array as extern const char *[] to match how it's defined
in trap.c. (Should really be in a header, of course.) Compile-tested.
2009-11-15 18:17:18 +00:00
skrll 9e705b0d3a Reformat comment. 2009-11-15 15:53:05 +00:00
skrll dcfde2a0ef Put PMAP_NOCACHE in the MD space. 2009-11-15 12:26:02 +00:00
skrll 8e8677821f Update a couple of comments. 2009-11-14 13:31:44 +00:00
tsutsui 929c691c07 Preserve wscons(4) device numbers for forthcoming udl(4) USB display. 2009-11-14 09:14:22 +00:00
nakayama 933215c182 comcons in dev/ic/com.c is now declared as static, so don't peek it
directly but use it via cn_tab.

Tested on my Netra X1.
2009-11-14 03:43:52 +00:00
dsl 659c7fee7d tlbstate is 'int', so use 'cmpl' not 'cmpq'.
Fixes gprof on amd64 PR/40960.
2009-11-13 22:49:46 +00:00
dyoung e4fd5e4f38 Simplify activation hook. 2009-11-12 19:18:55 +00:00
tron 6ff18287ac Turn on Stack Smash Protection (SSP) for the "ALL" kernel to get at least
compile time coverage during a full release build.

Suggested by Mindaugas Rasiukevicius.
2009-11-12 14:58:09 +00:00
haad dd6f356cec Reert change which was not meant to be comitted. 2009-11-11 23:59:36 +00:00
haad 14ad4d5b1e Build kernel modules with -mno-red-zone like kernel is build. This fixes
frequent panics in amd64 zfs module. This should also fix problem reported
by Nicolas Joly in:

http://mail-index.netbsd.org/port-amd64/2008/12/09/msg000646.html

Thanks to cube@ for his help with this.
2009-11-11 23:53:38 +00:00
cegger e72026cf1f update comment: we use PMAP_NOCACHE for both pmap_enter and pmap_kenter_pa 2009-11-11 17:08:16 +00:00
macallan 2cd1fea625 Look for a Sun-like video mode specifier in output-device, if there is one
pass it on to igsfb. With this you can
setenv output-device=screen:r1280x1024x60
and igsfb will use that mode. The mode specified must be listed in
dev/videomode/modelines.
2009-11-11 17:05:11 +00:00
skrll 1070b74721 Use the new flags argument to pmap_kenter_pa for PMAP_NOCACHE. 2009-11-11 16:08:31 +00:00
he f128f0ca99 Pass a 0 as flag value to pmap_kenter_pa(). 2009-11-11 14:20:01 +00:00
yamt be3e4126f3 x86_get_sdbase: copyout to a correct address. 2009-11-11 13:38:53 +00:00
skrll 12002be5ee Update / improve the snprintb formats. 2009-11-11 12:57:52 +00:00
skrll 9bedfc746a Remove unnecessary and incorrect STRONG_ALIAS. 2009-11-11 11:25:52 +00:00
kiyohara 5aa041ef68 Include <dev/acpi/acpica.h> instead of <external/intel-public/acpica/ ... >.
Thanks cegger@
2009-11-11 05:19:34 +00:00
macallan 509cdfee59 add a mmap() method so the xf86-video-igs driver can map the aperture and
IO space in a sane way.
2009-11-10 22:24:57 +00:00
he 116e5d88b0 Add a zero argument to pmap_kenter_pa() invocations.
According to cegger@ this is the right thing to do for the moment.
2009-11-10 17:37:15 +00:00
kiyohara 4587969773 Fix build failure.
acpi.h moves to external/intel-public/acpica/dist/include/.
2009-11-10 11:14:48 +00:00
is c4a186ea1c Move to two-clause license. 2009-11-09 15:35:27 +00:00
skrll 15b37f6115 Make this compile. 2009-11-09 14:15:15 +00:00
skrll f875a8ff95 G/C unused sc_memh from dino_softc. 2009-11-09 13:33:08 +00:00
skrll 8e71351ce7 Whitespace. 2009-11-09 13:21:34 +00:00
mhitch aafca08c2d The tlb shootdown IPI can interrupt the pool_cache_get() in places that
can cause a deadlock or pool cache corruption.  Take the shootdown job
queue mutex before calling pool_cache_get(), which will block the IPI
interrupts and seems to fix the remaining tlb shootdown deadlocks and
pool cache corruption I've been seeing.  Should address both
PR port-amiga/38335 and PR port-amiga/42174.
2009-11-09 04:31:03 +00:00
mhitch 83c7e4d319 Loading the kernel at 0xfffffc0000300000 doesn't work on my ES40 when I've
got raid drives configured on the iop(4) adapter and the mlx(4) adapter.
Change the kernel text to 0xfffffc0000430000 (which is where Tru64 has its
kernel).
2009-11-09 04:03:19 +00:00
snj 886d7f6c39 Drop 3rd and 4th clauses on this TNF-copyrighted file. 2009-11-07 19:54:17 +00:00
skrll 0ed80c5100 Use elf/external.h from new binutils.
XXX do we need a src/tools/compat/elf.h?
2009-11-07 17:56:14 +00:00
cegger 962afef088 Implement pmap_kenter_pa(9) new flag argument in x86.
Make x86 bus_space(9) using it to eliminate an extra TLB flush.
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
Thanks to Martin Husemann for spotting copy&pasto errors in the original patch version.
2009-11-07 07:32:53 +00:00
cegger 9480c51b04 Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
2009-11-07 07:27:40 +00:00
dyoung a43418e649 Use deviter(9) instead of accessing alldevs directly. 2009-11-06 23:10:22 +00:00
dsl f73c380ff9 Don't call _bus_dmamem_free() when _bus_dmamem_alloc() fails.
Fixes PR/42208
2009-11-06 23:10:10 +00:00
dyoung 3976f04982 Use deviter(9) instead of accessing alldevs directly. 2009-11-06 23:09:10 +00:00
dyoung 5df4a900a7 return_address(9) can be called from interrupt context; handle its
page faults appropriately.
2009-11-06 18:18:57 +00:00
dyoung b504b9ff0b Use deviter(9) instead of accessing alldevs directly. Untested. 2009-11-05 18:11:09 +00:00
uebayasi 997d28a770 Informative comments instead of useless blank lines. 2009-11-05 16:28:09 +00:00
dyoung 6efd54581f Bring this up-to-date with the changes to dbcool_softc. 2009-11-05 05:39:41 +00:00
dyoung 7507fa6898 In awacs(4) and snapper(4), use deviter(9) instead of accessing
alldevs directly.

In pbms(4), delete some unused debugging macros, expand USB
compatibility macros, and add a child-detachment routine.  Simplify
pbms(4) deactivation and detachment.

These changes are compile-tested, only.
2009-11-05 05:37:30 +00:00
thorpej 121cb87046 Fix error in previous that could cause us to refer to the wrong cpu_info
after handling an AST.
2009-11-05 04:19:47 +00:00
dyoung f2d55f8489 Use deviter(9) instead of accessing alldevs directly. Test-compiled,
only.
2009-11-05 00:35:12 +00:00
skrll 4199642c5f Apply workaround for an ld bug which creates an empty .rel.dyn section. 2009-11-04 17:03:52 +00:00
toshii c8d10319f7 Don't return an error if the _PIC method isn't found.
It's an optional method and not found in kvm/qemu.
2009-11-04 14:39:17 +00:00
dyoung c64f34a1e5 Gracelessly bracket #include "opt_spldebug.h" with #ifdef i386.
Should fix the amd64 kernel-build failure that Andreas Wrede
reported.
2009-11-03 20:11:53 +00:00
thorpej c64f923f50 Restructure exception_return() a bit in preparation for some upcoming
changes.
2009-11-03 16:08:00 +00:00
cegger bed332fcc5 use proper type for memory protection bits 2009-11-03 13:14:50 +00:00
dyoung e48f8429d1 Add a kernel configuration flag, SPLDEBUG, that activates a per-CPU log
of transitions to IPL_HIGH from lower IPLs.  SPLDEBUG is only available
on i386 and Xen kernels, today.

'options SPLDEBUG' adds instrumentation to spllower() and splraise() as
well as routines to start/stop debugging and to record IPL transitions:
spldebug_start(), spldebug_stop(), spldebug_raise(), spldebug_lower().
2009-11-03 05:23:27 +00:00
dyoung 3d5b001d3f Add return_address(9) for reading the Nth return address from the call
stack.
2009-11-03 05:08:18 +00:00
snj 32381fa0dd Follow upstream license changes for files with Michael Shalayeff's
copyright.  In most cases, this means dropping the 3rd and 4th clauses.
2009-11-03 05:07:25 +00:00
snj 0676449036 Drop 3rd and 4th clauses, as the copyright holder (Michael Shalayeff) did
in OpenBSD revision 1.39.
2009-11-03 01:23:21 +00:00
snj be288643d0 Drop 3rd and 4th clauses, as the copyright holder (Michael Shalayeff) did
in OpenBSD revision 1.2.
2009-11-03 01:19:35 +00:00
christos e641795b86 adjust to dbcool_chipset. 2009-11-02 21:38:07 +00:00
snj cf5c962817 Drop 3rd and 4th clauses. Approved by Brad Grantham (copyright holder). 2009-11-01 01:51:35 +00:00
mhitch a755312d41 The tsc(4) bus initialization was using a single statically allocated
extent storage for each tsp(4), which caused a LOCKDEBUG kernel to fail
because the extent storage contained a mutex which panics when the second
mutex_init() is attempted.  Put the extent storage into the tsp_config
structure so each tsp(4) gets it own.  Fixes PR port-alpha/38358.
2009-10-30 18:55:45 +00:00
he 5c62e90d6f Avoid unused variable warnings on Sun4c-only kernels.
Fix applied from PR#42249 -- thanks!
2009-10-30 15:05:54 +00:00
yamt 413e239f0d fix a typo in a comment. 2009-10-29 09:50:49 +00:00
macallan d3a06a75fa add radeonfb ( has been working for ages with my XVR-100 ) and pm2fb ( for
PGX32 / TechSource Raptor GFX 8P )
We should probably enable cgthree as well since it grew wsdisplay support a
while ago.
2009-10-28 03:41:30 +00:00
rmind 8a919a04df cpu_proc_fork: use pcb1 and pcb2, and thus make routine more readable.
Remove or update outdated comments, add new ones.  Clean-up.
2009-10-27 03:48:59 +00:00
snj a98264b10e Drop 3rd and 4th clauses. Approved by gwr@ and wrstuden@ (copyright
holders).
2009-10-27 03:45:32 +00:00
snj 7e31e944c7 Drop 3rd and 4th clauses. Approved by all copyright holders
(Embedtronics Oy's owners, Jon Sevy, and joff).
2009-10-27 03:42:31 +00:00
rmind 0d5ca7ed05 Make pcb_ldt_sel, in amd64, an unused field. Unlike in i386, it was
missed during clean-up of LDT handling.
2009-10-27 03:05:27 +00:00
martin d0ff1af4a8 g/c zssoftpending 2009-10-26 19:55:11 +00:00
cegger 62cf489d8e kill extra whitespaces
reviewed by tsutsui@
2009-10-26 19:16:54 +00:00
thorpej b88f55760b Garbage-collect pmap_do_reactivate() and the associated IPI -- nothing has
used them for a long time.
2009-10-26 03:51:42 +00:00
thorpej ba23fd19c8 Garbage-collect PMAP_LEV1MAP_SHOOTDOWN() -- it hasn't been used for a long
time.
2009-10-26 03:21:19 +00:00
snj 0c56aec186 Fix a typo in a comment. 2009-10-26 00:59:39 +00:00
mhitch 4cdf2079e4 We might switch cpu in between the start of cpu_reboot() and where we
actually start shutting down cpus.  This caused problems because the
wait_mask computed at the beginning of cpu_reboot() wouldn't be correct
when actually waiting for the other cpus to shutdown, and cpu_halt()
might be called instead of prom_halt() at the end, leading to a hung
machine.
2009-10-25 20:39:45 +00:00
bouyer 5e31b302a3 When we stall the continuation waiting for the queued I/O to complete
in xbdback_co_cache_flush2(), we don't advance the req pointer. In this
case call xbdi_put() to compensate for the xbdi_get() that will be done again
in xbdback_co_main_loop().
Fix stalled xbdback detach that would stall the whole xenbus thread,
preventing new domU from be created.
2009-10-25 13:47:43 +00:00
ahoka 88ffebdb42 Remove obscenity from comments. 2009-10-25 09:32:25 +00:00
he adee7c99f9 Correct the previous by adding an obviously overlooked
"struct pmap *pm" argument declaration to pmap_vax_swappable().
2009-10-25 09:25:10 +00:00
rmind 5f45928b22 Provide cpu_lwp_free* stubs in vax and powerpc.
Reported by <he>.
2009-10-24 20:03:56 +00:00
nakayama e3b6fc3b97 Use trunc_page or round_page where appropriate.
No functional changes intended, and generate same binaries.
2009-10-24 14:52:19 +00:00
he c162de1c7b Fix the previous by terminating the comment. 2009-10-24 13:28:16 +00:00
dsl e547824726 Fix constant in comment 2009-10-24 12:57:17 +00:00
dsl c3b1f51b2f Support reading /boot > 64k. Based on the patch from Izumi Tsutsui.
Compiles but not actually tested!  Fixes PR/42202
2009-10-24 11:23:06 +00:00
dsl 836bb82532 Add some illumination ... 2009-10-24 10:28:30 +00:00
thorpej 825a207d3f Ensure coherency between the L1 PT cache and pmap_growkernel() -- protect
allocations from pmap_growkernel() with a r/w lock.
2009-10-24 04:56:42 +00:00
snj 3358f48bf3 Drop 3rd and 4th clauses. Approved by scw (copyright holder). 2009-10-23 17:01:08 +00:00
snj 1d76033e5b Drop 3rd and 4th clauses. Approved by Jukka Marin (copyright holder). 2009-10-23 16:46:13 +00:00
snj cff5cadd85 Drop 3rd and 4th clauses. Approved by all copyright holders:
joff and Embedtronics Oy's owners (Jukka Marin and Sami Kantoluoto).
2009-10-23 06:53:12 +00:00
snj 264f5ccd6e Drop 3rd and 4th clauses. Approved by cl@ and Keir Fraser (copyright
holders).
2009-10-23 05:10:48 +00:00
snj ce8b7309aa Follow revision 1.28 in OpenBSD: remove ad clause. 2009-10-23 03:28:09 +00:00
snj 85791bacd0 Follow revision 1.8 in OpenBSD: remove ad clause. 2009-10-23 03:25:36 +00:00
snj 0d31d3264f Remove 3rd and 4th clauses. OK cl@ (copyright holder). 2009-10-23 02:32:33 +00:00
snj 7e82f68c7b Switch to a 2 clause license. Approved by joff@ (copyright holder). 2009-10-23 00:39:29 +00:00
rmind 33963b1448 Avoid #ifndef __NO_CPU_LWP_FREE, only ia64 is missing cpu_lwp_free
routines and it can/should provide stubs.
2009-10-22 22:28:57 +00:00
rmind 10758cb0f9 Simplify pmap_remove() a little by avoiding pmap_do_remove() layer, since
possibility to skip wired mappings is not needed anymore.  Apart from that,
no functional differences are intended.
2009-10-22 19:50:55 +00:00
snj da0d530a06 Drop 3rd and 4th clauses. OK gwr@ drochner@ (copyright holders). 2009-10-22 19:10:42 +00:00
snj 78f74058b2 Drop 3rd and 4th clauses (except on files where copyright is shared
with UC, in which case only the ad clause has been removed). Approved
by mhitch@ (copyright holder).
2009-10-21 23:53:38 +00:00
snj febb7cce65 Drop 3rd and 4th clauses. Approved by gwr@ (copyright holder). 2009-10-21 23:12:09 +00:00
snj 0c15144ae1 Drop 3rd and 4th clauses. Approved by thomas@ (copyright holder). 2009-10-21 21:57:39 +00:00
snj 7f108050aa Drop 3rd and 4th clause. Approved by leo@ and thomas@ (copyright holders). 2009-10-21 21:50:14 +00:00
rmind 40cf6f3659 Remove uarea swap-out functionality:
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
rmind d4b6de6fb5 Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).

(this single file was missed in previous commit)
2009-10-21 16:16:24 +00:00
snj 176f5f951d Drop 3rd and 4th clauses. OK jmcneill (copyright holder). 2009-10-21 16:06:59 +00:00
rmind f95af63371 Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Reviewed and approved by ichiro@ (copyright holder).
2009-10-21 14:15:50 +00:00
snj 7a9dfdb753 Remove 3rd and 4th clauses. OK'd by Tohru Nishimura and Reinoud Zandijk
(copyright holders).
2009-10-21 00:30:43 +00:00
snj 4988388746 Remove 3rd and 4th clause on Leo Weppelman's license. OK leo@. 2009-10-20 19:10:09 +00:00
kardel c3263d7b0a update copyright to 2 clause version of the NetBSD Foundation 2009-10-20 17:29:06 +00:00
jmcneill ec03d6f02a trim some fat, don't scan disklabels on non-HD disks 2009-10-20 14:49:03 +00:00
jmcneill 441aa3df66 trim some fat 2009-10-20 14:47:33 +00:00
cegger d3e9e93ad6 Use aprint_* when attaching. While here, unwrap some lines. 2009-10-20 10:34:21 +00:00
rmind 993cb03302 Drop 3rd and 4th clauses from David Young's license.
Reviewed and approved by dyoung@ (copyright holder).
2009-10-19 23:19:37 +00:00
bouyer 6d07b400dc Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
2009-10-19 18:41:07 +00:00
snj 4968c04d96 Move Eduardo Horvath's license to 2 clause. OK eeh@. 2009-10-19 18:12:37 +00:00
tsutsui 437ae37c1d Switch the atari port to the common m68k/m68k/pmap_motorola.c, at last. 2009-10-19 13:40:28 +00:00
snj 065c5ae0d0 Move Matthias Pfaller's files to 2-clause license. OK matthias@. 2009-10-18 18:13:59 +00:00
tsutsui 1bc6608553 Don't try to read disklabel to check FS_RAID on floppy boot since
reopening floppy could cause Data Access Exception later.
Fixes PR port-sparc/42186, ok'ed by mrg@.
2009-10-18 06:24:21 +00:00
nakayama 77df506ed7 Wrap unused code with #if 0 which is called from #if 0'ed code. 2009-10-17 20:03:06 +00:00
mlelstv e33abf1ab0 Add a serial console mode for the bootblock. In this mode all console
output will be echoed to the serial port and input will be accepted
from either keyboard or serial port. The bootblock serial console is
limited to 9600bps 8N1 as it uses the AmigaOS kernel debug routines.

To enable this you have to uncomment the SERCONSOLE define in
boot/Makefile.

Also note that the handling of a serial console in the kernel is
independent of this, you need to a build a kernel with 'options
SERCONSOLE'.
2009-10-17 11:18:17 +00:00
nakayama 33ec454f0c Merge want_ast check in userret() into trap handler, and repeat
preempt() call while want_resched is true.  While there remove
unnecessary #if 1.

This should fix a performance degradation of disk I/O on heavy load.
2009-10-17 08:50:49 +00:00
cegger f94b517224 Family 10h Errata #319: Attach on Family10h cpu series which have it fixed. 2009-10-16 12:05:19 +00:00
phx 89bf9948e9 Fixed typos in zssc_dump() (DEBUG). 2009-10-16 10:07:16 +00:00
phx be3b6697b5 Fixed typo in DEBUG: atysc -> atzsc 2009-10-16 09:36:35 +00:00
bouyer e4821a51fc Don't pass a NULL arg to DIOCCACHESYNC, sd(4) dereferences it.
Pass a pointer to a int initialized to 1, so that a DIOCCACHESYNC will be
forced on sd(4).
Should fix dom0 panic reported by Sarton O'Brien.
2009-10-14 18:54:00 +00:00
pooka 5e8ba6d465 protect against multi-inclusion 2009-10-13 22:41:57 +00:00
uwe c9c7f30b6e Fix inline asm for tas.b. "=m" is not restrictive enough and gcc may
decide to use addressing modes that tas.b does not support.  'V' is
advertised to be "non-offsettable" subset of 'm' but there's a bug in
gcc that prevents "=V" from working.

When in doubt use brute force, so pass lock pointer as "r" input and
declare "memory" as clobbered.

Landisk kernel diff is 5 instructions (register choice for lock
address in __cpu_simple_lock_try).

sys/dev/raidframe/rf_copyback.c - where old __asm triggered incorrect code
- successfully compiles (as part of sys/rump/dev/lib/libraidframe).
2009-10-13 12:55:53 +00:00
mhitch 8d2f7e8644 Fix DEBUG build - pv_flags does not exist anymore. 2009-10-11 20:37:47 +00:00
bsh 0c0e7d064d add options COMPAT_50 to all evbarm boards. 2009-10-11 16:20:22 +00:00
mlelstv 688e4b57e6 AmigaOS console.device expects a character buffer, not a pointer to an int.
This fixes printf() output.
2009-10-11 10:00:10 +00:00
elad 2cb56be586 Add a (weak aliased) machdep_init() as a place to do machdep initialization
that can't happen as early as the other init functions as called from
cpu_startup() -- for example, register kauth(9) listeners.

Put unprivileged policy in the x86 code; used by i386, amd64, and xen.
2009-10-06 21:07:05 +00:00
rmind b619d660f4 Remove X86_IPI_WRITE_MSR (and msr_ipifuncs.c), replace all uses in drivers
with xc_broadcast().  AMD K8 PowerNow driver tested by <jakllsch>, thanks!

Closes PR/37665.
2009-10-05 23:59:30 +00:00
dyoung e30873664a Improve readability of trap() by extracting two subroutines,
trap_print() and check_dr0().
2009-10-05 19:04:14 +00:00
mhitch 7e4eb61e65 IPI interrupts occur above IPL_VM, so using IPL_VM in for the tlb shootdown
queue mutex doesn't work very well.  I get various deadlocks and corrupted
queue entries.  Change to IPL_SCHED [IPL_CLOCK] to block IPI interrupts
while the cpu is mucking with the shootdown queue.
2009-10-04 17:00:31 +00:00
jmcneill 74436af5d8 add dummy opt_via_c7temp.h, spotted by Andreas Gustafsson. 2009-10-03 20:56:39 +00:00
jmcneill d0d1a0e6c3 Enable viapcib 2009-10-03 13:37:27 +00:00
jmcneill 350f3d2e59 match VT8237A 2009-10-02 21:27:45 +00:00
jmcneill ce1935e8e6 Add and enable options VIA_C7TEMP 2009-10-02 18:50:49 +00:00
jmcneill 574c128daa Add support for VIA C7 temperature sensors (options VIA_C7TEMP) 2009-10-02 18:50:03 +00:00
jmcneill 23e8227b7c PR# kern/42139: ACPI WMI: new driver
Import acpiwmi(4) from Jukka Ruohonen. From the PR:

Attached is a driver that implements ACPI WMI API:

http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx

The WMI is used to provide a generic interface for OEMs to use certain
platform/laptop-specific additions to the standard ACPI in a somewhat
portable way. These can be hotkeys for additional buttons, different event
handlers (wireless kill switch, lid switch, etc.), and so on. At least HP
and Acer use it by default nowadays.

The benefit of this interface would be portability. For an example, instead
of hpqlb(4) that works only with certain HP models, we could have a generic
HP WMI-driver that should work in theory across all HP laptops. On many new
laptops WMI may also be the only way to access laptop/manufacturer-specific
features.
2009-10-02 16:47:52 +00:00
nakayama d61a38f649 Port lom(4) driver for LOMlite lights out management hardware monitor
and watchdog timer from OpenBSD.

It supports the LOMlite found on Sun Netra t1 and the LOMlite2 found
on Sun Netra T1/X1 and Sun Fire V100/V120.
2009-10-02 15:09:16 +00:00
jmcneill f986f9682c Use the TSC and current multiplier to calculate bus clock on VIA C7 Esther.
Probably needed for all C7 and Nano processors, but to be safe only use
this alternate method on Esther for now.

Now est on my C7-M 1.6GHz properly reports frequencies from 1600 to 400,
instead of 2133 to 533.
2009-10-02 15:05:42 +00:00
skrll 980b1066f3 It's -z max-page-size, not -z maxpagesize. 2009-10-02 10:14:20 +00:00
skrll 1521a0436b MAXPAGESIZE got bumped to 0x200000. Use -z maxpagesize=0x100000 until
someone(tm) decides that kernels should have that alignment, etc.
2009-10-01 09:15:19 +00:00
skrll a5f3419efe Fix up mwait/monitor now that gas has been fixed. 2009-10-01 09:13:54 +00:00
jmcneill c05491c171 Need sdmmc* at wb? 2009-09-30 22:19:00 +00:00
jmcneill e7a9e26c28 wss@acpi doesn't make much sense on amd64, so remove it 2009-09-30 20:49:07 +00:00
jmcneill beb3879990 add and enable wb(4) 2009-09-30 20:47:09 +00:00
pooka c33877d5b2 remove the tempting VNODE_LOCKDEBUG option 2009-09-29 11:58:18 +00:00
bouyer c709e72357 Don't disestablish a soft interrupt which has not been established. 2009-09-27 19:48:57 +00:00
jakllsch ff243da79f Make this build without gpio(4). 2009-09-27 18:27:01 +00:00
jakllsch bd5cb77445 gpio(4) support for Intel ICH southbridges.
Tested on Intel SS4200-E (ICH7), and Acorp 6A815EPD (ICH2) motherboards,
on amd64 and i386 ports respectively.

It should be noted that the majority of boards with ICH chips do not
expose the GPIO pins for off-board use.  For instance, aside from the
three exposed-on-a-header pins on the 6A815EPD, another pin is also
used to control write protect on the FWH.  The SS4200 exposes the GPIO
on a header that connects to the 10 LEDs on the front panel, as well
as a tact switch on the back panel.
2009-09-27 17:55:31 +00:00
tsutsui be5da0aabb Remove commented out and nonexistent cgthree at obio stuff.
SPARCclassic has onboard CG3 but it's internally connected via SBus,
and there is no info about sun4m machines which actually require
cgthree at obio attachment. Info from jdc@.
2009-09-27 13:27:44 +00:00
tsutsui 6d12c25806 +jme* at pci? 2009-09-27 12:53:46 +00:00
jmcneill 2d504df7b5 add viadrm at pci 2009-09-27 12:41:05 +00:00
tsutsui 4ee6b34006 Replace shutdownhook_establish(9) with pmf_device_register1(9).
Tested on JC94.
2009-09-27 05:29:20 +00:00
tsutsui 7ec1a2d842 Make local functions static. 2009-09-26 16:07:51 +00:00
tsutsui 165ffb1ad0 Replace shutdownhook_establish(9) with pmf_device_register1(9).
Tested on 3/80.
2009-09-26 16:03:45 +00:00
tsutsui 2b46e6e3c6 Make local functions static. 2009-09-26 15:49:45 +00:00
tsutsui 2036298c54 Replace shutdownhook_establish(9) with pmf_device_register1(9).
Compile test only, but similar to mesh.c.
2009-09-26 15:46:48 +00:00
tsutsui d9d27ba4b2 Replace shutdownhook_establish(9) with pmf_device_register1(9).
Tested on Apus2000.
2009-09-26 15:45:28 +00:00
tsutsui cc35c23e68 Fix a botch on device_t/softc split:
Don't forget to set sc->sc_dev.
2009-09-26 15:40:02 +00:00
skrll dc89c66367 Deal with the following change to ld:
* The default output section LMA has changed for allocatable sections from
  being equal to VMA, to keeping the difference between LMA and VMA the same as
  the previous output section in the same region.  This is a more useful
  default when using overlays and other cases where you specify an LMA
  differing from the VMA for some sections.
2009-09-26 07:29:55 +00:00
bouyer fc24e4743d Announce feature-rx-copy and feature-rx-flip.
Add support for request-rx-copy. Tested with a Debian lenny install.
Should fix PR port-xen/40650
2009-09-25 23:11:57 +00:00
mlelstv f4d53c7199 Ensure FP state is reset, if FP is used in a signal handler.
Fixes PR kern/39299 for 32bit code.
2009-09-25 13:56:32 +00:00
mlelstv aef222ecba The FPU Tag word is a 16bit register, in FPU (387) mode it
defines 2-bit tags for each FPU data register, in MMX mode it
defines 1-bit tags for each data register. The single bit
tags are stored in the lower 8 bits and thus in the first byte
of the save frame.

See amd64/include/fpu.h and the IA-32 Software Developer's manual Vol 2A.
2009-09-25 13:51:27 +00:00
he 3b5f619bfc Use .PATH.S instead of giving a source file with fully qualified path.
This should avoid the sun3 port contaminating its source tree during build
with .d and .o files corresponding to ctrlsp.S.
2009-09-25 11:19:35 +00:00
tsutsui 5d2638c2b1 Replace shutdownhook_establish(9) (which was added by me)
with pmf_device_register1(9).
2009-09-24 14:09:18 +00:00
bouyer db95bc7f01 xbdback: implement and publish "feature-flush-cache".
xbd: if feature-flush-cache is present, use it for DIOCCACHESYNC.
 If not present, make DIOCCACHESYNC return EOPNOTSUPP and warn on
 first call.
Should improve WAPBL reliability of Xen guests on a NetBSD dom0.
Unfortunably not all linux guests seems to support this feature, and using
feature-write-barrier would require a B_BARRIER flag in the buffer.
2009-09-23 17:48:55 +00:00
tsutsui c77366b578 +cs* at isapnp? 2009-09-22 16:46:15 +00:00
tsutsui 7d94469845 - use device_t and cfdriver_t
- wrap long function decls
2009-09-22 15:04:41 +00:00
tsutsui 3b0a685f2b Split device_t/softc. Tested only on cs at ofisa on shark. 2009-09-22 14:55:19 +00:00
tsutsui 74b0667d3e Bump SYMTAB_SPACE. 2009-09-22 14:49:46 +00:00
tsutsui 72b646b74f Explicitly include <sys/exec_aout.h> for ZMAGIC etc. 2009-09-22 14:49:28 +00:00
cegger ee0f0893eb fix botch with merging in changes from x86/x86/cpu.c:
don't use wbinvd(). Xen flushes the cache for us.
This makes DomU boot again.
Spotted by bouyer@.
2009-09-22 13:59:42 +00:00
bouyer bd2f090e7c Allow a xbd to be detached from the domU (e.g. at shutdown). Patch tested
and adjusted by David Young, discussed on port-xen@ early august.
2009-09-21 21:59:30 +00:00
macallan b81d1cca71 set is_console even if we don't have any fb_info so other console drivers
than genfb have a chance of working.
Tested with radeonfb which works fine with an RV280
TODO: figure out how to deal with more than one PCI_CLASS_DISPLAY device in
      a halfway sane manner
2009-09-21 13:23:43 +00:00
tsutsui 102f04400c - use device_t and cfdriver_t
- use device_private() and device_xname()
- use proper types or variables for device_t/softc
2009-09-20 16:18:21 +00:00
christos 68b7139cf2 add toshide 2009-09-20 01:14:31 +00:00
tsutsui a616b75df3 Split device_t/softc.
Tested on TME emulating SS2.

XXX: bwtwo at obmem on TME emulating sun2 didn't match and cannot test
2009-09-19 04:52:44 +00:00
mhitch 298c91975c Explicitly include sys/exec_aout.h. 2009-09-18 21:40:09 +00:00
dyoung 5cc26b1024 As Jonathan Kollasch points out, elansc_attach() does not actually
use gba after filling it out.  Delete it.
2009-09-17 20:21:54 +00:00
tsutsui 12ad76b18c Remove struct sbusdev and related functions sbus_establish() and sbusreset().
They are derived from 4.4BSD/sparc and have been there since initial import
of NetBSD/sparc in 1993, but the struct sbusdev is almost unused for years,
nothing calls sbusreset(), and all (*sd->sd_reset)() functions look bogus.

Suggested by mrg@ and martin@, and tested on SS1+ and SS20.
2009-09-17 16:28:12 +00:00
bsh 87aae92eeb fix a typo of register bit name. 2009-09-17 16:13:32 +00:00
tsutsui 41559777ac Use device_t, cfdriver_t, device_private(), device_xname(),
and appropriate types and variables for device_t/softc.
2009-09-17 12:38:11 +00:00
mlelstv 23ab96a36b Allow for 'options ACPI_DEBUG' by providing module declarations
and using memory allocation macros instead of calling AcpiOs* stubs
directly.
2009-09-16 10:47:54 +00:00
tsutsui 16c0f8385d Use device_private(), proper types or variables for device_t and softc.
(not yet split though)

No crash on gxemul emulating hpcmips mobilepro.
2009-09-14 13:41:15 +00:00
rmind d1e070a421 Add COMPAT_50 for MALTA. 2009-09-14 12:52:20 +00:00
tsutsui 5770fb4ee0 u_intNN_t -> uintNN_t 2009-09-14 12:49:33 +00:00
jmcneill 1ea984dc79 Don't commit the selected VBE mode until the loader is past the point of
no return; need to stick in text mode as long as possible since libsa does
not include a rasops library. While here, add the 'vesa' command to pxeboot
to mirror biosboot behaviour.
2009-09-14 11:56:27 +00:00
tsutsui cbc3734a99 Enable options IPKDB. 2009-09-14 11:38:29 +00:00
tsutsui f52132ce21 Make this compile. From elad@. 2009-09-14 11:37:36 +00:00
jmcneill 1b3357e5de Don't treat timeouts or the return key as an invalid choice; spotted by
Andreas Gustafsson.
2009-09-14 10:42:42 +00:00
mhitch e851d39acd Add support for booting off a couple of common RAID adapters found on
several models of alpha systems: mlx [Mylex DAC060] and iop [I2O].
Addresses PR #25829.
2009-09-14 02:46:29 +00:00
mhitch a25d763f88 Add the I2O iop controller, as used in the ES40 and ES45. 2009-09-14 02:28:22 +00:00
mhitch 3ebe8c5833 Switch the amiga to the common m68k/m68k/pmap_motorola.c (Finally!!). 2009-09-14 02:23:05 +00:00
mhitch bd24936ebd Not understanding what vax_mfpr_get_counter() was doing, my fix for
backwards time was incorrect, and actually disabled the use of mfpr for
timecounters.  The intent was to emulate a 32 bit counter using the
hardclock_ticks from the clock interrupt and the contents of the
Interval Counter register.  The problem with that was when the ICR
wrapped, but the clock interrupt was blocked resulted in an incorrect
count.  Work around this by keeping track of the previous ICR value
and hardclock_ticks to ensure the 32 bit counter doesn't go backwards.
Also, the ICR runs from -10000 to -1, so adjust the value when reading it.
Now mfpr works quit nicely on my 4000/90.
2009-09-14 02:19:15 +00:00
jmcneill df6bdc8be4 If the menuformat is not letter, do not allow letter keys to be aliases
for number keys. snj@ often overshoots the spacebar in a panic and
accidentally hits 'b' instead, which makes the loader boot item '2'.
Can't fix snj@, so fix the boot loader instead.
2009-09-13 23:53:36 +00:00
jmcneill 891bf245b9 Make the 'dev' command print out a list of known boot devices based on
information from the BIOS in addition to the currently selected default
partition. Handy when you don't know where to boot from. Here's a demo:

  type "?" or "help" for help.
  > dev
  disk hd0 size 3815 MB
    hd0a(4.2BSD) hd0b(swap)
  disk cd0
    cd0a(unknown)
  default hd0a
  >
2009-09-13 22:45:27 +00:00
jmcneill d2a59733be kmod improvements
- unless otherwise specified, modules are now loaded from the same device
   as the kernel ('load miniroot' now implies 'load tftp:miniroot' if the
   boot command is 'boot tftp:netbsd')
 - the module name -> path expansion now works when a device prefix: is
   specified ('load tftp:miniroot' now works)
 - if the module name has been expanded to a path, print that path when
   loading the module rather than the symbolic name
 - only print an error in module_open if both the expanded path and the
   raw path fail to open
2009-09-13 18:13:37 +00:00
tsutsui 5113172f58 Add MI and ISA gpib(4) stuff. (compile test only) 2009-09-12 18:53:22 +00:00
tsutsui bc210dec04 +options RTSOCK_DEBUG 2009-09-12 18:09:47 +00:00
phx 3bef245803 Make disklabel.h from amiga and amigappc include the MI sys/disklabel_rdb.h.
amiga/amiga/adosglue.h was deleted and moved into sys_disklabel_rdb.h, as both
are always needed together (disksubr.c and ofppc/stand/ofwboot/rdb.c).
2009-09-12 09:18:42 +00:00
phx a1fee67004 Handle the situation of a wrapped interval counter, while the hardclock()
interrupt was not yet executed to update the hardclock_ticks variable.
2009-09-11 19:43:08 +00:00
phx fbc94dd682 Reverted last change after discussion with the author, Michael L. Hitch:
http://mail-index.netbsd.org/port-amiga/2009/08/14/msg007164.html
We have a full 32-bit counter, so the masking is not needed.
2009-09-11 13:11:15 +00:00
phx ad12935328 Added support for RDB partitions.
Moved MBR parition code out of ofdev.c into mbr.c.
Tested on Pegasos2 (RDB and MBR) and RS6000.
2009-09-11 12:00:12 +00:00
mhitch 7b90090350 Alpha will size the mutex structure in pmap_tlb_shootdown_q to 16 bytes.
Change the command and pad accordingly;  now pmap_tlb_shootdown_q entries
really are cache-aligned.
2009-09-10 22:27:11 +00:00
mhitch 8c83d5056c Now that secondary cpus are added the cpu_info list earlier, attempt to
send pmap tlb shootdowns to them cause the shootdown job queue to fill up,
but since the cpus aren't running yet, no IPIs get sent.  When the job
queue is full, the bit mask of cpus to send the IPI to is not set and no
shootdown IPI ever gets sent after the cpu is marked running.  Always
set the cpumask even when the queue is full.  Now I get shootdown ipis
on all the secondary cpus.
2009-09-10 21:36:39 +00:00
tsutsui d519f74ad6 Make sure to initialize cpus[0] which will also be used as cpuinfo
for sun4 and sun4c, not only for sun4m. Okay'ed by mrg@.
2009-09-10 14:12:02 +00:00
jmcneill 68aba25e22 Switch on hdaudio(4) 2009-09-07 22:59:09 +00:00
jmcneill ad5f1845fb Refer to hdaudio as 'High Definition Audio', not
'Intel High Definition Audio' as many vendors implement the HD audio spec.
2009-09-07 10:40:54 +00:00
mhitch 66b730fd58 There's now some per-cpu initialization that occurs before the secondary
cpus are told to begin running.  Since the seconedary cpus weren't being
added to the cpu_info list until then, that initialization wasn't being
done and resulted in crashes on the secondary cpus.  Add the secondary
cpus to the cpu_info_list after they've been started (but waiting to be
told to start running).  This fixes the problem specifically stated in
PR port-alpha/41106.  MP alphas will now at least boot and begin running,
but will eventually crash in various ways later.
2009-09-06 18:06:24 +00:00
sborrill b88195cfa1 hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio*	at pci? dev ? function ?
hdafg*		at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio
2009-09-06 17:25:55 +00:00
bsh 742947bc03 correct the initial value of interrupt masks. 0 is to disable.
This fixes stray interrupt from LCD controller when lcd driver is not configured in the kernel.
2009-09-05 17:40:35 +00:00
jmcneill 41b863f675 Fix a bug where mapping the very end of iomem accidentally returns an
address in the ISA hole (because addr+size calculations wrap to 0). Fixes
ohci on VirtualPC 7 for Mac, which places OHCI at base address 0xfffff000
size 0x1000.
2009-09-03 23:25:04 +00:00
tsutsui 767b154f7a Use a proper local variable. 2009-09-02 17:22:53 +00:00
joerg 292e598a25 Be a bit more noisy by telling the user VGA_POST is missing in the
kernel config when trying machdep.acpi_vbios_reset=2.
2009-09-02 15:42:31 +00:00
joerg 12cda29892 Don't allow machdep.acpi_vbios_reset=2 if option VGA_POST is missing. 2009-09-02 15:25:07 +00:00
tsutsui 0f7a15058c Invert logic around nested pmf(9) registrations for readability. 2009-09-02 10:43:24 +00:00
tsutsui 531b631d68 Some backends may use ncr53c9x_abort(), so remove static declaration from
the function and explicitly declare it in ncr53c9xvar.h.  Noticed by he@.
2009-09-02 10:34:04 +00:00
skrll dd9009a209 More sections to remove when doing ELF->a.out conversion. 2009-09-02 07:48:50 +00:00
tsutsui 943109cbb1 Check a return value of pmf_device_register1(9) and also call
pmf_class_network_register(9).
2009-09-01 17:10:42 +00:00