Commit Graph

104305 Commits

Author SHA1 Message Date
jruoho da6a111dbe Destroy the callout(9) when detaching. Also evaluate the removal of the
notify handler before going to demolishing business.
2010-03-01 13:16:21 +00:00
pooka 510a73e003 Introduce RUMP_COMPONENT. It behaves mostly like a simplified
module which is linked into the kernel and cannot be unloaded.
The main purpose is to get the proper constructors run and create
any /dev nodes necessary for said component.  Once more of the
kernel (e.g. networking stack and device drivers) are converted to
MODULE and devfs pops up from somewhere, rump components can be
retired.
2010-03-01 13:12:19 +00:00
pooka 15022b379a "support" unmount of rumpfs 2010-03-01 13:03:30 +00:00
pooka e4791c2626 Add types for LWP_CREATE and LWP_EXIT rpc calls. Currently unimplemented. 2010-03-01 13:02:46 +00:00
pooka 566bdea883 Free memory in unmap instead of panicking.
(this is currently not very actively called, though, as can be seen
from the previous "implementation")
2010-03-01 13:01:16 +00:00
pooka bc4e423976 add signal stubs required by mfs 2010-03-01 11:35:58 +00:00
pooka 0bd00d250f add u3g 2010-03-01 11:34:27 +00:00
skrll 91b151c4f5 Use #define<tab> consistently. 2010-03-01 11:27:29 +00:00
darran fa288ab6ce Backout accidental commit adding sdt.h (hold off until CTF toolchain build
is ready).
2010-03-01 11:25:05 +00:00
darran ac8906f757 DTrace: fix a few problems introduced by the recent ZFS update (expected
problems from the OpenSolaris merge).
2010-03-01 11:19:39 +00:00
macallan 5e9539b84b enable PNOZZ_USE_LATCH in case we run into some hardware which needs it 2010-03-01 06:14:17 +00:00
macallan 3bc5d8b535 make latching optional.
The SPARCbook docs claim it's necessary but my 3GX happily works without.
2010-03-01 05:42:08 +00:00
jruoho 5bc6f3c06a Semantics:
* Use ACPI_ADR_PCI_DEV(x) and ACPI_ADR_PCI_FUNC(x).
  * !ACPI_FAILURE -> ACPI_SUCCESS, UINT32 -> uint32_t
  * Remove whitespace.
2010-03-01 05:37:37 +00:00
macallan 539b768657 fix ancient typo, noticed by mouse@ 2010-03-01 05:26:53 +00:00
pgoyette 7e73c12204 Now that sysmon_envsys(8) has learned how to retrieve and update sensor
limit values from the device driver, remove the high_limit and low_limit
entries from the hw.dbcool<#>.<sensor> sysctl(8) tree.  These limits are
now directly accessible via envstat(8).  Simplify the remaining code
somewhat.

No objections raised on either tech-kern@ or current-users@

XXX The fan controllers's parameters (including those that are tied to
XXX temperature sensors) are still in sysctl, since there isn't any clean
XXX way to implement the fan controllers in sysmon_envsys yet.  It is on
XXX my To-Do list...
2010-03-01 03:14:49 +00:00
jym 1e1cc23e07 Do not forget that ptoa() casts the result to vaddr_t, which is bad
for paddr_t values under i386 PAE. Use ctob() instead.

Although amd64 is not affected by this vaddr_t vs paddr_t issue (both
having the same size), for the sake of completeness, switch to
ctob() when manipulating paddr_t/psize_t entities in amd64 machdep.c.

Compile tested for i386 and amd64. No regression expected.
2010-03-01 01:35:11 +00:00
jym 1e9520c105 Change rbus_min_start_hint() semantic for i386. "ram" is now psize_t
(instead of size_t) to avoid possible overflow when system may have more
than 4GB of memory (like PAE).

The behavior of rbus_min_start_hint() remains the same. While here, fix
printf's format strings (paddr_t => PRIxPADDR).

Use ctob() and cast physmem to psize_t to avoid losing bits above 4GB.

Comes from PAE patch from Jeremy Morse; adaptation by me.

Compile tested for GENERIC only. No regression expected.
2010-03-01 01:15:23 +00:00
macallan 9df6065977 Don't call frame-buffer-adr since it doesn't work as expected by the code
that got cargo culted over from macppc. While there shut up some leftover
debug printf.
2010-03-01 01:14:58 +00:00
jym d967c640a3 Use PDP_SIZE for NTOPLEVEL_PDES (number of top level PDEs) instead of
#ifdef'ing PAE.
2010-03-01 00:55:33 +00:00
pgoyette 06d81b8ad2 Move definitions of internal data structures and flag bits to avoid
exposing them to user-land.
2010-02-28 20:04:04 +00:00
jruoho a92215aa7e Add makefiles for a sample of ACPI kernel modules. 2010-02-28 17:40:51 +00:00
jruoho 86c3014958 Introduce support for ACPI kernel modules.
Tested on couple of laptops.
2010-02-28 17:22:41 +00:00
snj ccaf1e96be Fight the ever-increasing size of src checkouts by spelling "useful"
without an extra l.
2010-02-28 15:52:16 +00:00
snj 77db2769ee Spelling police. 2010-02-28 15:33:21 +00:00
martin 492b486237 dmesg cosmetics 2010-02-28 15:30:22 +00:00
haad c2a856c467 Update zfs module to new sources. 2010-02-28 15:22:16 +00:00
martin 3c21532a2a Interpret the "reg" property of i2c nodes more liberal, and depending
on the cell size in use.
I have been unable to find any documents about the i2c bindings for OF,
so this is all pretty much voodoo.
2010-02-28 13:59:05 +00:00
jruoho 0f58ad7ae9 Use native functions instead of polluting the namespace with ACPICA-macros. 2010-02-28 13:56:49 +00:00
jruoho ba2862cd60 Add ACPI_DEBUG_ALLOC. 2010-02-28 13:10:43 +00:00
jruoho cd85adf1c0 In preparation for partial modularization of the acpi(4) subtree.
* * *

XXX:	The internal memory tracking of ACPICA, available when
	ACPI_DBG_TRACK_ALLOCATIONS is defined, has been removed
	from ACPI_DEBUG.

	This is due to the instability of the ABI of ACPICA.

	If the memory tracking is enabled, ACPICA will insert a header
	to each memory allocation. As a consequence, when ACPI specific
	code is loaded as a kernel module and the running kernel has
	been compiled with ACPI_DEBUG, the result is an instant panic.
	This happens because of unaligned memory access when the code
	tries to use ACPI_FREE for a buffer obtained via ACPI_ALLOCATE,
	AcpiEvaluateObject(), and related calls.

	If the involved memory statistics are required, a separate constant
	ACPI_DEBUG_ALLOC is available in options(4) for ACPI_DEBUG kernels.

* * *

Discussed with, and ok'ed by, jmcneill@ and pooka@.
2010-02-28 12:57:11 +00:00
pgoyette cbd0b07b1d Set the FMONNOTSUPP flag for each individual sensor, and add the
FMONLIMITS flag so the sensor is actually monitored and events can
be generated.

As discussed with martin@ in private email.
2010-02-28 12:40:46 +00:00
martin f0ca32dd6a Remove the envctrl driver, it is superseeded by the more general pcfiic @
ebus. Add the SB1000/SB2000 fan controll driver (tda). From OpenBSD.
Move config files over to direct configuration of i2c devices.
2010-02-28 11:49:44 +00:00
martin 046723f091 Update pcf8584 driver from OpenBSD 2010-02-28 11:47:28 +00:00
martin 66539057af Add support for direct configuration of i2c devices 2010-02-28 11:43:40 +00:00
martin a56e529332 Add direct config support for a few devices 2010-02-28 11:36:27 +00:00
martin 5aa9335e67 Supporting cast for i2c direct configuration on OF machines 2010-02-28 11:35:40 +00:00
martin 9d9a688916 Generic (device property based) framework for optional direct configuration
of i2c devices, as discussed on tech-kern.
2010-02-28 11:34:42 +00:00
jruoho ab778822b7 Remove ACPI_LID_DEBUG. 2010-02-28 09:24:46 +00:00
jruoho 5d978521d4 Cleanup:
* Semantics.
  * Remove ACPI_LID_DEBUG.
  * Reduce the amount of error reporting.
  * As the status of the lid (open/closed) is known upon suspend, move the
    state variable to the softc, and avoid one object evaluation this way.
2010-02-28 09:23:30 +00:00
darran 6cc8d64caf Propagate the IFCAP_TSOv6 property also. 2010-02-28 07:10:40 +00:00
snj 6ea9f5a749 Spell "exception" properly. 2010-02-27 22:12:31 +00:00
snj 364e777af2 Fix a couple old typos in comments. 2010-02-27 19:10:41 +00:00
mlelstv 7ad5c184b5 Move block number computations to callers of wapl_read/wapl_write and
conditionally build DEV_BSIZE adjustments for kernel. fsck_ffs shares
the same code but accesses physical blocks.

Also compute correct block numbers for each physical sector.
2010-02-27 16:51:03 +00:00
mlelstv ef95b640b0 Store physical block numbers in superblock that point to the journal.
Calculate position of both commit headers correctly for disks with
large sectors.
Correct calculation of circular buffer size.
2010-02-27 12:04:19 +00:00
jym 4077310cda Make a XENMEM_decrease_reservation DEBUG printf() more meaningful. 2010-02-27 09:22:40 +00:00
tsutsui 1609b8d6f6 KNF, misc cosmetics. 2010-02-27 05:41:22 +00:00
tsutsui d2be1889f9 Always call device dependent functions via pointers rather than
using conditionals to switch inline functions for modern processors.
2010-02-27 04:40:11 +00:00
tsutsui 4f3417c562 Also fix a wrong mem_ring calculation in dp8390_ipkdb_attach(). 2010-02-27 04:36:56 +00:00
jakllsch dd483616f8 Use RUN_ONCE(9) again. (Everyone happy now?) 2010-02-27 00:31:57 +00:00
jakllsch 7d0469d4c4 Use correct prototype for dmattach(). 2010-02-26 23:52:43 +00:00
mlelstv c30b0f26b2 mnt_fs_bshift is the filesystem block size, not the fragment size.
Revert to physical block size. This is fine as long as filesystem
and log stay on a similar physical medium.
2010-02-26 22:24:07 +00:00
jym 42e5342a52 Fixes regarding paddr_t/pd_entry_t types in MD x86 code, exposed by PAE:
- NBPD_* macros are set to the types that better match their architecture
(UL for i386 and amd64, ULL for i386 PAE) - will revisit when paddr_t is
set to 64 bits for i386 non-PAE.

- type fixes in printf/printk messages (Use PRIxPADDR when printing paddr_t
values, instead of %lx - paddr_t/pd_entry_t being 64 bits with PAE)

- remove casts that are no more needed now that Xen2 support has been dropped

Some fixes are from jmorse@ patches for PAE.

Compile + tested for i386 GENERIC and XEN3 kernels. Only compile tested for
amd64.

Reviewed by bouyer@.

See also http://mail-index.netbsd.org/tech-kern/2010/02/22/msg007373.html
2010-02-26 19:25:07 +00:00
pooka 6e4a9f9133 librumpuser is not _KERNEL code and does not belong in sys. Move
the source files from src/sys/rump/librump/rumpuser to src/lib/librumpuser
(from where it is already built).  Even so, keep rumpuser.h in
sys/rump/include for kernel source tree self-containment.
2010-02-26 18:54:20 +00:00
jym cbdb1f8831 Change RSS (resident set size) limit. Instead of setting it arbitrarily
to the total free memory available to the system, use the smallest value
between VM_MAXUSER_ADDRESS and total free memory (having a RSS limit
bigger than VM_MAXUSER_ADDRESS has no real meaning).

Fix a possible int overflow when ptoa(uvmexp.free) is bigger than 4GB
with a 32 bits vaddr_t.

This change is similar to the one made in rev 1.144 of uvm/uvm_glue.c.
2010-02-26 18:47:13 +00:00
pgoyette 933c70b5e1 Disable DBCOOL_DEBUG by default, and make it compile that way. 2010-02-26 18:16:18 +00:00
pooka 5b02e50b03 Rename rumpuser_dl_module_bootstrap() to rumpuser_dl_bootstrap(),
since it hasn't been involved only with modules for quite a while now.
2010-02-26 15:23:20 +00:00
reinoud 28b2fc3a6f Typo and style 2010-02-26 09:57:39 +00:00
dyoung edec44fc69 Cosmetic: re-wrap some line. 2010-02-26 01:16:09 +00:00
dyoung 53a8345822 Cosmetic: join a line. 2010-02-26 01:15:08 +00:00
dyoung ad812b20b2 Introduce Cardbus_intr_establish(cardbus_devfunc_t, ...) and
Cardbus_intr_disestablish(cardbus_devfunc_t, ...) and start using them.
2010-02-26 01:12:56 +00:00
dyoung 508883c164 Use PCI_ constants and macros instead of CARDBUS_. Use
Cardbus_conf_{read,write}() instead of cardbus_conf_{read,write}().
Delete all of the CARDBUS_ constants and macros that replicate PCI_.

Compile-tested, only.
2010-02-26 00:57:01 +00:00
dyoung eb0836d9ae Move the definitions for PCI_BAR0, PCI_BAR1, PCI_BAR2, PCI_BAR3,
PCI_BAR4, and PCI_BAR5 to pcireg.h for re-use.
2010-02-26 00:38:14 +00:00
dyoung 51d6f75dc3 sc_csr is read & written from the PCI Command & Status Register,
so make its type pcireg_t.
2010-02-26 00:01:27 +00:00
dyoung fde907f497 Make fxp at cardbus detach during shutdown.
Stop calling (*cardbus_ctrl) to enable bus mastering, I/O and memory
spaces on the CardBus bridge.  cbb(4) always enables that stuff,
anyway.  In the process, avoid remembering what BAR we mapped by
writing CARDBUS_{IO,MEM}_ENABLE to sc_cben or sc_cbenable, and
record the BAR in use sc_bar, instead.

Replace more CARDBUS_ constants with PCI_ constants.

Compile-tested, only.
2010-02-25 23:40:39 +00:00
haad 58c910bce8 Fix device-mapper to work in builtin case. This commit fixes
PR: 42799

REwork fix commited by jak@ to be more readable and remove unneeded ifdef _MODULE.
2010-02-25 23:37:39 +00:00
matt 7b012669b8 Adapt to <powerpc/spr.h> breakup. 2010-02-25 23:34:54 +00:00
matt ec4306c95e Adapt to <spr.h> breakup. 2010-02-25 23:33:43 +00:00
matt 5a4cb80d76 Adapt to spr.h breakup. 2010-02-25 23:31:47 +00:00
matt 3cba909205 Split <powerpc/spr.h> into a common <powerpc/spr.h> and <powerpc/XXX/spr.h>
where XXX is ibm4xx or oea.
2010-02-25 23:30:04 +00:00
jym 2c546c52cc Change RSS (resident set size) limit. Instead of setting it arbitrarily
to the total free memory available to the system, use the smallest value
between VM_MAXUSER_ADDRESS and total free memory (having a RSS limit
bigger than VM_MAXUSER_ADDRESS has no real meaning).

Fix a possible int overflow when ptoa(uvmexp.free) is bigger than 4GB
with a 32 bits vaddr_t.

Reviewed by bouyer@.

See also http://mail-index.netbsd.org/tech-kern/2010/02/24/msg007395.html
2010-02-25 23:10:49 +00:00
dyoung fb7f881ea9 Use PCI_ constants instead of CARDBUS_ constants. Use Cardbus_conf_*()
functions instead of cardbus_conf_*() functions to simplify some
code.
2010-02-25 23:01:48 +00:00
dyoung 96d11f3066 Copy values from the cardbus_attach_args and use them instead of values
from the cardbus_softc.
2010-02-25 22:40:16 +00:00
dyoung ae121f118d Don't use the cardbus_softc. Compile-tested, only. 2010-02-25 22:31:51 +00:00
dyoung 512b7322ce Fix Xen.
XXX Almost everything in this header file, x86, amd64, and i386 should
XXX share.
2010-02-25 22:20:03 +00:00
dyoung 74013c932b Phase out some CardBus constants and types. Use the equivalent PCI
constants and types, instead:

        CARDBUS_CLASS_REG -> PCI_CLASS_REG
        CARDBUS_ID_REG -> PCI_ID_REG
        cardbus_product_id_t -> pci_product_id_t
        cardbus_vendor_id_t -> pci_vendor_id_t
2010-02-25 21:18:35 +00:00
macallan 8ffcf0035e add a comment on PCI_MAGIC_IO_RANGE 2010-02-25 21:09:00 +00:00
macallan 54b08bae4c some cleanup 2010-02-25 20:56:20 +00:00
dyoung 8687bf03ba In the x86 pci(9) implementation, test for and call a
pci_chipset_tag_t's override functions.
2010-02-25 20:51:10 +00:00
jakllsch 6fc9836341 Be sure to config_cfattach_attach() in dmattach().
Loosely based on patch from Brian Brombacher,
with other inspriation from vnd(4).

This should fix PR kern/42799.

While here, a few prototype, style and namespace pollution-related changes.
2010-02-25 20:48:58 +00:00
dyoung 6bbebe48f4 Change the pci_attach_args definition to allow machine-dependent
code to override the default pci(9) behavior by creating a non-NULL
pci_attach_args_t (on x86, pci_attach_args_t is always NULL) containing
one or more non-NULL function pointers.
2010-02-25 20:48:34 +00:00
dyoung 878053a897 Don't create the device's PCI tag with Cardbus_make_tag(9), but save and
use the tag found in the cardbus_attach_args.  Compile-tested, only.
2010-02-25 20:36:31 +00:00
reinoud 1196d96d39 First part of shrinking/growing metadata partition support:
- extending the metadata partition

Still to follow:
- sparsify metadata partition
- growing the metadata partition
- unsparsifying metadata partition
2010-02-25 16:15:57 +00:00
msaitoh b32bc8f5ec Merge if_wm.c rev. 1.162.4.13 and if_wmvar.h rev. 1.2.46.3 into maintrunk.
Increase the timeout value to prevent timeout on 80003. The values are taken
from Intel's e1000 driver. Tested by spz and me.
2010-02-25 15:07:06 +00:00
drochner 4faa4ba521 retire our private definitions for the scan1/3/5/7/9 DEC graphics
symbols, use the unicode definitions instead (which apparently didn't
exist when I wrote that)
2010-02-25 11:20:09 +00:00
skrll 7b00c6209a s/cpu_fork/cpu_lwp_fork/ in comment 2010-02-25 07:21:19 +00:00
skrll 158aca4053 s/cpu_fork/cpu_lwp_fork/ in comment. 2010-02-25 07:14:48 +00:00
macallan 0320314aca a very preliminary driver for Wildcat 5110 / Sun XVR-500 graphics boards
Since we don't have any documentationthis driver is unaccelerated and thanks
to the insane state we get the hardware in it's also slow and scrolling
looks weird.
Some hardware info came from OpenBSD's ifb driver.
2010-02-25 03:33:09 +00:00
macallan df530d6bed regen 2010-02-25 03:20:02 +00:00
macallan 0c6f3037b6 add 3Dlabs Wildcat 5110, also known as Sun XVR-500 2010-02-25 03:18:44 +00:00
dyoung 4ce33933f8 Cardbus_free_tag() and cardbus_free_tag() are no-ops, so get rid of them
to simplify the code a bit.
2010-02-25 00:47:39 +00:00
dyoung 6f92774f38 Use device_suspensor_t. 2010-02-24 23:52:49 +00:00
dyoung 7c4be3328d Start to tuck Cardbus under the PCI abstraction. Step #1, textual
substitution: for all practical purposes, pcitag_t and cardbustag_t are
interchangeable, so just use pcitag_t.  Ditto pcireg_t and cardbusreg_t.

Poison new uses of cardbusreg_t and cardbustag_t by deleting the type
definitions.
2010-02-24 23:38:40 +00:00
pgoyette c138fa58da Fix handling of 6bit VID register (6th bit takes place of 12VIn sensor).
Move VID out of sysctl tree - make it a separate sensor of type INTEGER.

Clean-up some of the chip-descriptors.
2010-02-24 23:37:45 +00:00
dyoung 197d9d4ff8 Use device_private(). 2010-02-24 23:03:00 +00:00
dyoung 66bdd36fe9 Use device_t, device_private(). 2010-02-24 22:58:45 +00:00
dyoung c1b390d493 A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
2010-02-24 22:37:54 +00:00
dyoung 7e2170d1cd KNF: change spaces to tabs. 2010-02-24 21:34:23 +00:00
dyoung 71e3c83259 Don't bother to #define PCI_PREFER_IOSPACE, nothing uses it. 2010-02-24 21:25:51 +00:00
dyoung 440f38e104 Change 'typedef void *pci_chipset_tag_t' to 'typedef struct
pci_chipset_tag *pci_chipset_tag_t' for an improvement in type safety.
(Back when I did the same for cardbus_chipset_tag_t, it helped to turn
up some bugs!)
2010-02-24 21:24:20 +00:00
dyoung e43ae59b99 Rename to 'pc' all variables 'pci_chipset_tag'. 2010-02-24 21:22:01 +00:00
dyoung 8089c2dc69 Start to tuck Cardbus under the PCI abstraction. Step #1, textual
substitution: for all practical purposes, pcitag_t and cardbustag_t
are interchangeable, so just use pcitag_t.  Ditto pcireg_t and
cardbusreg_t.

While I'm here, don't make a copy (sc_intrline) of
cardbus_attach_args.ca_intrline unless we use it, later.
2010-02-24 19:52:51 +00:00
reinoud e1abb93a90 Rename metadata partition parameters to be less generic and add the flags. 2010-02-24 19:20:13 +00:00
reinoud a8903501c1 Extract UDF metadata partition parameters as already done for VAT and sparable
partitions.
2010-02-24 19:14:12 +00:00
skrll 952a515d7e Typo in comment. 2010-02-24 19:12:12 +00:00
drochner aaf6e48436 map some more punctuation to more or less good replacements in the IBM
character set
2010-02-24 18:33:45 +00:00
dyoung 3def77969b Start to tuck Cardbus under the PCI abstraction. Step #1, textual
substitution: for all practical purposes, pcitag_t and cardbustag_t
are interchangeable, so just use pcitag_t.
2010-02-24 18:16:50 +00:00
dyoung 9e575a840e Mark some suspicious ENODEV returns (should be ENXIO?) with comments. 2010-02-24 17:59:33 +00:00
plunky c672648cd8 print end of line before getting the descriptor as it sleeps 2010-02-24 17:34:56 +00:00
plunky 7e131adc8e use # for include directive, just because.. 2010-02-24 17:00:25 +00:00
uebayasi af0ced746a Merge more indirect functions. Some comments. 2010-02-24 15:58:26 +00:00
tsutsui 2232ac2075 Use roundup2() in <sys/param.h> rather than a conditional. 2010-02-24 15:18:15 +00:00
tsutsui 48df35bd24 Now dp8390_config() calculates mem_ring correctly so
no longer need to override it in ne2000_attach().
2010-02-24 15:13:34 +00:00
pooka 1142233da6 Expose rump_schedule() and rump_unschedule(). These can be used
for wrapping application space calls to the rump kernel without
having to do heavyweight interface specification with ifspec.
2010-02-24 14:56:04 +00:00
tsutsui 07b15f7d28 Fix a wrong calculation bug around RX ring buffer memory address
slipped in about sixteen years ago.  Fortunately, it had been working
for ages because some devices used address zero and other devices
ignored wrong higher bits.

Tested on we(4) (SMC Elite Ultra) and ne(4) (NE2000 compatible
named UL0001) on ISA.
Note FreeBSD also uses the same correct value in their ed(4) driver.
2010-02-24 13:10:26 +00:00
kiyohara 5401ccaba6 Fix porting miss.
However this change in between #ifdef notyet and #endif.
  Thanks for fukaumi.
2010-02-24 12:29:47 +00:00
tron 2897183305 Fix build of the "dtrace" kernel module. 2010-02-24 10:18:19 +00:00
mrg 321846985a check for TLB_V bit for valid tte entries, not against zero.
KASSERT() the 3rd call to pseg_get() in pmap_page_cache() like the other 2.
2010-02-24 10:11:53 +00:00
mrg becc426fb8 when handing back page table pages to UVM, flush them from the dcache
on all CPUs.

idea from skrll@, and makes my disk-based SB2000 stable.

tested on U60, SB2000 and SB2500.
2010-02-24 09:49:36 +00:00
skrll 243d3947d4 s/printf/db_printf/ in a few places. 2010-02-24 06:38:53 +00:00
skrll 6a02363785 Typo in comment 2010-02-24 06:34:55 +00:00
uebayasi f736e76fa5 uvm_fault_upper_lookup, uvm_fault_upper_neighbor: There is no point to call
pmap_update() without calling pmap_enter().

(Probably calling only once after loop (as done in uvm_fault_lower_lookup())
is enough.  If done so, other threads see entered neighbor pages as reflected
a little latter.)
2010-02-24 06:18:19 +00:00
mrg d098c87db8 fix MULTIPROCESSOR build for previous. 2010-02-24 06:05:35 +00:00
uebayasi efa838c11f Minor clean up. 2010-02-24 05:26:28 +00:00
uebayasi a9659a6dfb Revert a thinko. 2010-02-24 05:00:55 +00:00
mrg 87eb5c0788 move the tlb flush routines into cache.h to avoid machine/pmap.h polution. 2010-02-24 04:48:28 +00:00
uebayasi 3bf5a87956 Slightly clean up uvm_fault() code path after pmap_enter(). Now tasks
needed for page cache are concentrated in own functions (uvm_fault_*_done()).
2010-02-24 04:32:58 +00:00
uebayasi 79440fb3fd Record if "promote" is done in UVMHIST. Do it for "upper" fault too. 2010-02-24 04:20:45 +00:00
uebayasi b8168569e9 Merge some indirect "lower" fault handlers back. Prompted by rmind@. 2010-02-24 04:18:09 +00:00
mrg 07a4d49e0e - re-introduce sp_tlb_flush_pte() and sp_tlb_flush_all() that call
the right USI/USIII version.
- define tlb_flush_pte() in terms of sp_tlb_flush_pte() for the
  !MULTIPROCESSOR case

this centralises some CPU_IS_USIII_UP() tests.
2010-02-24 01:58:52 +00:00
jym 7bf36164a7 - Use ctob() instead of ptoa() to obtain physical addresses from frame
numbers. Using ptoa() will cast to vaddr_t, which might no be adequate
for architectures where sizeof(paddr_t) > sizeof(vaddr_t) (like i386 PAE).

- small fix inside AGP heuristics to avoid masking high order bits for
systems with more than 4GB.

Reviewed by bouyer@.

See also http://mail-index.netbsd.org/tech-kern/2010/02/22/msg007373.html
2010-02-24 00:01:11 +00:00
mrg 49f69a7e5c oops. don't call sp_tlb_flush_pte_usiii() on USI/USII. 2010-02-23 22:52:21 +00:00
darran eda764aaf5 DTrace: remove kern_dtrace.c since it is no longer used. (Its functions
are inlined in dtrace_bsd.h).
2010-02-23 22:22:29 +00:00
darran 0311cbad04 DTrace: remove kern_dtrace.c, no longer used 2010-02-23 22:21:25 +00:00
darran 383b7f700b DTrace: Get rid of the KDTRACE_HOOKS ifdefs in the kernel. Replace the
functions with inline function that are empty when KDTRACE_HOOKS is not
defined.
2010-02-23 22:19:27 +00:00
bouyer d3b2fb89de Move ahci_channel_start() after BSY has cleared (what seems to matter
here is not touching SError while BSY is asserted). Fix random
behavior (serial console corruption/misfunction, misbehavior of USB
controllers, crasy interrupts crashing the Xen hypervisor, ...)
of Intel ESB2 controller with some brand of hitachi drives.
2010-02-23 21:38:36 +00:00
mlelstv b4d69db7b5 Use correct offset to block number calculations.
Also change access to filesystem blocks to be done by fragment instead
of by physical block. Fragments are the fundamental blocks of the
filesystem.

For a theoretical filesystem that accesses the disk in smaller units
than stored in mp->mnt_fs_bshift, the assumption might be wrong. But
this will also break other subsystems. The value mp->mnt_dev_bshift
which formerly represents the physical sector size is currently only
virtual in NetBSD (always DEV_BSIZE).
2010-02-23 20:51:25 +00:00
mlelstv 6d6d11f709 Replace individual queries for partition information with
new helper function.
Use this information to query physical sector sizes for WAPBL
instead of hardcoded defaults.
No longer limits physical sector sizes to 512 bytes.
2010-02-23 20:41:41 +00:00
dyoung d2fb16224c Remove unused functions pci_disable_retry() and cardbus_disable_retry(). 2010-02-23 19:28:00 +00:00
pooka 546515e65b * abort correct endpoint in bulk xfers
* actually free memory in the freem method (well, usually stick
  it to the usb freelist, but same thing)
2010-02-23 14:05:04 +00:00
cegger 71e3b44a06 dtrace kernel hooks
ok darran@
2010-02-23 06:27:40 +00:00
mrg fb94e19ed4 change print_dtlb() and print_itlb() to take (tlb_size, tlb_selectbits).
for cheetah, print the 3 dtlb's and 2 itlb's.

now "mach dtlb" and "mach itlb" work for cheetah.
2010-02-23 05:32:08 +00:00
mrg 9b94dc89ff add some bits to set to access all the cheetah dtlb/itlb's. 2010-02-23 05:24:50 +00:00
cegger 6db342e072 include opt_xen.h 2010-02-23 00:23:36 +00:00
pgoyette 3bb3920ad0 Correct calculation and display of SDR DRAM speed. From OpenBSD.
Fixes PR kern/42736
2010-02-23 00:13:06 +00:00
jym 7017a033c7 Remove a duplicate entry for PTE_BASE.
While here, introduce PDP_SIZE and PDE_SIZE. They will be used by asm code
to make it more generic (PAE related).
2010-02-22 23:52:17 +00:00
mrg 24e08ad36b move {dump,print}_[id]tlb() into a separate file. 2010-02-22 22:28:57 +00:00
skrll 9882ad0204 Deal with PA2.0 cache move-in rules by purging the TLB as well as
flushing/purging the cache.
2010-02-22 21:32:55 +00:00
drochner ec0c8f12ca Run binaries with ELF_TYPE==DYN at virtual address PAGE_SIZE rather
than 0. This is still not the intent of PIE, but it allows them to
run with VA 0 disabled.
(The PAX_ASLR stuff which should deal with this needs work.)
CV: ----------------------------------------------------------------------
2010-02-22 19:46:18 +00:00
pgoyette 4950ef9e4e Forgot to add smscmon here... 2010-02-22 17:27:04 +00:00
pooka da9a2c25a9 * get UDESC_CONFIG for proper config index
* support UR_SET_CONFIG for root hub
* set port change bits for root hub interrupts
+ cosmetics
2010-02-22 14:47:40 +00:00
pgoyette ad945e1f49 Correct spelling of smscmon and add (commented out) to GENERICs 2010-02-22 13:42:04 +00:00
darran ec6b20a273 DTrace: missed the opt_dtrace.h include for these. 2010-02-22 06:42:14 +00:00
ahoka 4c65a125fc Add SPLASH example, like in i386. 2010-02-22 05:59:04 +00:00
ahoka c14889048f Mention splash need genfb or radeonfb 2010-02-22 05:57:10 +00:00
ahoka 0f279dbbae Restore splashscreen support with genfb.
genfb patch from Pierre Pronchery, other small changes to make it
compile by me.

Closes PR kern/42605.

XXX doesnt work in 8bit, probably a cmap issue
2010-02-22 05:55:10 +00:00
pgoyette f34bafd81b Specify the correct default address for smscmon 2010-02-22 04:57:43 +00:00
pgoyette 0977e451a3 Add smscmon(4) 2010-02-22 03:52:06 +00:00
pgoyette b5f89aa493 Import smcsmon(4) driver for SMSC LPC47M192 hardware monitor
From Takahiro HAYASHI in PR kern/40420
2010-02-22 03:50:56 +00:00
mrg 9181dd2c07 - store the maximum [id]cache size / line size for each cpu
- remove patch_kernel() since it isn't necessary and has been patching
  the wrong thing in general.

- implement USIII versions of blast_icache(), dcache_flush_page() and
  cache_flush_phys().  use the newly recorded cache size/line sizes.

- in winfixsave, flush the D$ with the right size index and ops.  this
  kills one of the wrong tag->inval patches.

- for blast_dcache(), use the newly recorded dcache_size/line_size.

- for blast_icache(), use the newly recorded cache size/line sizes.
  for the USIII verison, disable the I$ while writing to ASI_ICACHE_TAG.


these changes removed several hard coded cache sizes values, some very
wrong kernel patching, and seem to make the current failure modes for
USIII less common, but not gone.
2010-02-22 00:16:31 +00:00
bouyer 8f7318d794 Fix confusion about PRE/POST in previous; and another place that has the
same issue. Also add a BUS_DMASYNC_POSTWRITE to the POLL operation.
Problem pointed out by tsutsui@.
Still not perfect (a BUS_DMASYNC_PREREAD would be needed after the
testing the condition in the POLL() macro), but closer.
2010-02-21 18:50:10 +00:00
tsutsui d31d8d052b Regen from GENERIC.in rev 1.83:
> Add pseudo-device ksyms. Noticed by David Ross on port-atari.
2010-02-21 18:00:13 +00:00
tsutsui 4b4e0d474c Add pseudo-device ksyms. Noticed by David Ross on port-atari. 2010-02-21 17:57:03 +00:00
bouyer 80f97b6e05 Fix bus_dmamap_sync(): it should be a BUS_DMASYNC_POSTWRITE after
writing to DMA memory.
Found by code inspection.
2010-02-21 14:16:47 +00:00
mlelstv 03c7f48412 For the UVM_PAGE_TRKOWN test do not require that the relevant pages
must exist.
2010-02-21 13:55:58 +00:00
drochner 9783f258ba rename the va0_disabled option and cpp conditional to "disable" as well,
for consistency, and document option and sysctl flag
2010-02-21 13:17:50 +00:00
darran f802834604 DTrace: add the dtrace module. 2010-02-21 11:16:19 +00:00
darran dea8f231d6 DTrace: add the dtrace module to the build. 2010-02-21 11:14:47 +00:00
darran 2c398f9ea9 DTrace: Add __predict_false() to the DTrace hooks per rmind's suggestion. 2010-02-21 07:39:18 +00:00
darran 8d0c2f9cd9 DTrace: missed kern_dtrace.c (thanks rmind!) 2010-02-21 07:28:51 +00:00
darran 37422f86b0 Added a defflag option for KDTRACE_HOOKS and included opt_dtrace.h in the
relevant files. (Per Quentin Garnier - thanks!).
2010-02-21 07:01:57 +00:00
bsh 67a60d973a Modify definitions for ULCOM register of UART according to S3C2800
User's manual rev 1.3.

The values of ULCON_PARITY_SHIFT and ULCON_IR are now same to those
for S3C2410. So the definitions are moved to s3c2xx0reg.h.  (Old
definitions from User's manual rev1.1 were differ to those for
S3C2410, and that was why I put them in s3c2800reg.h and s3c24x0reg.h.
There's no description in errata about this changes.)

Also, fix the value for UMSTAT_DCTS on 2800.

The values of UMCON_AFC and UMSTAT_DCTS still differ between 2800 and
2410.

Reported by Brett Slager.  Thank you very much.
2010-02-21 06:08:53 +00:00
cnst 51998ed2d7 New wbsio(4) driver for Winbond Super I/O attachment of lm(4) on any port.
http://mail-index.netbsd.org/tech-kern/2010/02/17/msg007338.html

Reviewed by <pgoyette>, <tech-kern>.
2010-02-21 05:16:29 +00:00
darran 7fe76dd45f Add the DTrace kernel hooks file to the kernel build. 2010-02-21 04:00:47 +00:00
darran 1bc28ea1e9 Add the DTrace hooks to the kernel (KDTRACE_HOOKS config option).
DTrace adds a pointer to the lwp and proc structures which it uses to
manage its state.  These are opaque from the kernel perspective to keep
the kernel free of CDDL code. The state arenas are kmem_alloced and freed
as proccesses and threads are created and destoyed.

Also add a check for trap06 (privileged/illegal instruction) so that
DTrace can check for D scripts that may have triggered the trap so it
can clean up after them and resume normal operation.

Ok with core@.
2010-02-21 02:11:39 +00:00
mrg 19f4d68d7a s/D-cache/I-cache/ in some comments. 2010-02-21 00:57:44 +00:00
martin d84669ba8d Select the shutdown method for secondary CPUs by available firmware
methods, not properties of the CPU.
Inspired by OpenSolaris, pointed out by eeh.
2010-02-20 16:46:38 +00:00
pooka 17a848cc03 printf -> aprint_normal to avoid empty linefeeds and partial messages
for AB_QUIET.
2010-02-20 14:52:22 +00:00
pooka 91f03c22e5 Fix snafu with error reporting in bulk transfers. 2010-02-20 13:56:29 +00:00
drochner 1a101ef360 rename the new sysctl to "vm.user_va0_disable", for consistency
with the majority of existing sysctl flags, suggested by yamt
2010-02-20 13:21:58 +00:00
dyoung 754590e092 Avoid a potential crash: get more struct device initialization
out of the way before trying to get a unit number.  If we cannot
get a unit number, we call config_devfree(), which expects for
fields such as dv_flags, dv_cfattach, and dv_private to be initialized.
2010-02-19 22:28:47 +00:00
he f4a50bc26a Bump SYMTAB_SPACE so that it fits again. 2010-02-19 15:25:28 +00:00
pooka 182993fbc7 Huawei K3765 requires another kind of magic to get it out of CD mode.
It also changes product id after being configured.  Without this
change the device just lingers in u3ginit forever.  With this change:

u3ginit0 at uhub0 port 1: Switching to 3G mode
u3ginit0: detached
u3ginit0: at uhub0 port 1 (addr 2) disconnected
u3g0 at uhub0 port 1 configuration 1 interface 0
ucom0 at u3g0 portno 0: 3G Modem
u3g1 at uhub0 port 1 configuration 1 interface 1
ucom1 at u3g1 portno 1: 3G Modem
u3g2 at uhub0 port 1 configuration 1 interface 2
ucom2 at u3g2 portno 2: 3G Modem
u3g3 at uhub0 port 1 configuration 1 interface 3
ucom3 at u3g3 portno 3: 3G Modem

(tested with rump)
2010-02-19 15:10:02 +00:00
pooka 0c9a7e023d regen: huawei K3765 2010-02-19 13:56:39 +00:00
pooka 91e54342ca Add Huawei K3765 (two id's, it changes product id after being inited). 2010-02-19 13:55:51 +00:00
pooka 3dbf8271ce Replace USB_GET_SC() instances with USB_GET_SC_OPEN(). The latter
is exactly like the former, except it returns with ENXIO if sc is
NULL instead of continuing on to use it.  Most of the time this is
handled by the fd layer and you get EBADF, but sometimes it's
possible to race into the device method for whatever reason and
you get a kernel panic.  I have no idea what the "whatever reason"
might be.
2010-02-19 12:40:47 +00:00
asau bf551971e8 Don't mix BUS_DMASYNC_PREREAD and BUS_DMASYNC_POSTWRITE.
Suggested by <bouyer>, fixes PR kern/42662
2010-02-19 12:36:15 +00:00
skrll b475da34b5 Improve a comment. 2010-02-18 21:38:32 +00:00
skrll e86ede10b6 Fix up some comments. 2010-02-18 21:30:00 +00:00
skrll f3c7b2c4cd Fix comment(s).
OK'ed by rmind
2010-02-18 20:58:23 +00:00
pooka 0569cd0d25 Don't leak control endpoint descriptors. 2010-02-18 16:24:19 +00:00
pooka 35e8f16689 Actually, detach is possible enough if the device isn't in use.
So just support it.
2010-02-18 16:13:30 +00:00
pooka a798dc1e14 Change match to be based on the existence of the ugen device node
and signal the root hub interrupt only once we are succesfully able
to open the device node.  This makes it possible to insert a device
after the rump kernel was booted and have it succesfully attach
(does not make detach possible yet, though, as there are some
ugen and host kernel uhci/ohci/ehci evil crashies with that).

XXX: optimally, match would fail if there is a permanent error in
opening.  However, it is difficult to figure out the difference
between the device backing ugen not being present, a transient
error in opening and a permanent error in opening.  For example,
which of the latter two would EPERM be?  And, ugen returns ENXIO
if the device is not present, but how would be know that's really
the case and not some other ENXIO from elsewhere in the stack?
2010-02-18 15:25:13 +00:00
drochner dda500d0d8 Disable mapping of virtual address 0 by user programs per default.
This blocks an easy exploit of kernel bugs leading to dereference
of a NULL pointer on some architectures (eg i386).
The check can be disabled in various ways:
-by CPP definitions in machine/types.h (portmaster's choice)
-by a kernel config option USER_VA0_DISABLED_DEFAULT=0
-at runtime by sysctl vm.user_va0_disabled (cannot be cleared
 at securelevel>0)
2010-02-18 14:57:01 +00:00
pgoyette fe9cd1c415 Print correct temperature value, and properly display negative temperatures.
Resolves PR kern/36615
2010-02-18 14:10:15 +00:00
pgoyette fedb8afd44 Enhance DPRINTF to use AcpiFormatException as suggested in PR kern/40130 2010-02-18 13:52:33 +00:00
pooka 7775600816 Also, don't try to figure out the size of devices if size matters not. 2010-02-18 12:32:30 +00:00
pgoyette f2b6b76565 If we're going to valdate things, at least do it correctly. 2010-02-18 12:30:53 +00:00
pooka 88b1bf8a5e Allow NULL as size and file type pointers. 2010-02-18 12:21:28 +00:00
kiyohara 23849e1fa6 Remove unnecessary line-feed. 2010-02-18 07:24:16 +00:00
macallan 490ba2f1c7 Abort setup when we find no audio codec to avoid crashing later on with
ISDN-only cards.
Should fix PR41055
2010-02-18 02:21:38 +00:00
eeh 836736c39d Fix root filesystem support. 2010-02-18 01:14:00 +00:00
pooka d97a943f37 Support SCSIVERBOSE. 2010-02-17 20:44:34 +00:00
pooka 80b0497c2e * allow one more request
* print warning if a request which might fail, fails
* report error from bulk transfers
2010-02-17 20:39:53 +00:00
eeh feea5ba263 Add support for ffsv2 and lfs. 2010-02-17 15:50:06 +00:00
eeh 55cbbbda21 Fix ffsv2 support. 2010-02-17 15:49:19 +00:00
pooka 65dca8eead * add a rant about why MPSAFE isn't enabled even though puffs code is
* predict_false that we are mounting when calling statvfs
* KNF
2010-02-17 14:32:08 +00:00
skrll 27e0e1c809 Fix typo in previous. It's not a good idea to let uvm mess with kernel
text pages.
2010-02-17 14:16:53 +00:00
pooka 35257440bd Invert inverted comment and verbosify it. 2010-02-17 13:28:40 +00:00
skrll 6216966bd3 Add some comments. 2010-02-17 11:33:51 +00:00
skrll 66e7a27415 Semi-colons help. 2010-02-17 11:31:39 +00:00
skrll def9f5d433 Whitespace. 2010-02-17 11:21:24 +00:00
skrll fe12c9786e Add aliasing defines for PA2.0 cpus.
They will cause unnecessary non-equiv alias handling on PA1.x machines if
PA2.0 cpu support is compiled into the kernel.  GENERIC currently doesn't
have this support enabled.

The performance hit of this needs testing.
2010-02-17 11:14:10 +00:00
skrll 397f09772a Add a prototype for pmap_page_physload. 2010-02-17 10:03:30 +00:00
kiyohara 3b90717a87 Fix type missmatch.
forgot to commit since change ia64/syscall.c,1.5.
2010-02-17 06:06:50 +00:00
dyoung c26d0a3ad4 Initialize the temporary pmf_qual_t in pmf_device_subtree_release()
to avoid a failed ds != NULL assertion, later.
2010-02-17 00:15:24 +00:00
mlelstv 7974872552 Three changes in a single commit.
- drop the notion of frags (LFS fragments) vs fsb (FFS fragments)
  The code uses a complicated unity function that just makes the
  code difficult to understand.

- support larger sector sizes. Fix disk address computations
  to use DEV_BSIZE in the kernel as required by device drivers
  and to use sector sizes in userland.

- Fix several locking bugs in lfs_bio.c and lfs_subr.c.
2010-02-16 23:20:30 +00:00
pooka 643ba90bf0 Globally define -Wno-pointer-sign, as it has become a pointless
exercise of "add it to every Makefile individually".

XXX: should autosynchronize with the rest of the kernel buildflags
in sys/conf/Makefile.kern.inc.
2010-02-16 20:42:44 +00:00
pooka 97fada1858 remove -D__NetBSD__ (it's done globally now) 2010-02-16 20:34:03 +00:00
dyoung a60f2abe1f PCI Configuration Mechanisms #1 and #2 are controlled by two to
three registers.  Let us think of the kernel operating the registers
in two steps:

1) Select: enable configuration cycles and select a range of
   configuration-space addresses.

2) Access: read or write a word in PCI configuration space.

To make the steps more explicit, extract some helper subroutines
from pci_conf_read(9) and pci_conf_write(9):

pci_conf_selector(tag, reg): from a pcitag_t and a register offset,
    create a word that enables configuration cycles and selects a
    configuration address range.

pci_conf_select(w): for `w' a word created by pci_conf_selector(),
    enable configuration cycles and select the address range indicated
    by `w'.

pci_conf_select(0): disable configuration cycles.

pci_conf_port(tag, reg): map a pcitag_t and a register offset to an I/O
    port where the configuration access should occur.

While I'm in here, change the panic(9) calls to panic("%s: ...",
__func__) instead of hard-coding a subroutine name.
2010-02-16 19:29:40 +00:00
skrll bce51a654b Remove the dma24_ex method of dealing with BUS_DMA_24BIT and replace
with a uvm managed freelist of pages in the right range.
2010-02-16 16:56:29 +00:00
msaitoh b601f7daf0 Add support for 82575, 82576 and 82580(ER).
- Apply the patch for 82575 from Wolfgang Stukenbrock (PR#42422). We use
  only one RX ring and with the legacy mode.
- Add support for 82576.
- Partial support for 82580.
- Partial support for the serdes systems.
2010-02-16 15:17:17 +00:00
msaitoh ddce6a6e5c regen. 2010-02-16 10:10:26 +00:00
msaitoh 65f53e95ec Add entries for 82576 and 82580 2010-02-16 10:10:04 +00:00
msaitoh bff00e11f7 indent, tabify and remove extra spaces. 2010-02-16 10:06:19 +00:00
dholland 1b722ce8d0 Don't inspect vn_stat() results until after checking that it succeeded.
If anyone's been seeing random "File too large" results from module loading,
this should fix it.
2010-02-16 05:47:52 +00:00
jym 6d2adb482c - re-factor code in pmap_map_ptes() slightly, and make it PAE-ready for
native i386 by using PDP_SIZE

- introduce pmap_unmap_apdp(), used to clear the APDP entries in PD, and
replace the relevant code parts with this function.

Comes from Jeremy Morse's patch for i386 PAE support. Adjustments by me.
2010-02-16 00:48:17 +00:00
dyoung 871ebd4c6d Declare pci_mode_set(). 2010-02-16 00:47:46 +00:00
dyoung 07a5af08b1 Get rid of all PCI_CONF_MODE #ifdef'age except for the little bit
that initializes pci_mode, which I have moved to the top.

Make pci_mode private to pci_machdep.c.

Provide pci_mode_set() for pcibios.c to configure the PCI Configuration
Mechanism.  KASSERT() in pci_mode_set() that the mechanism is not
changing from anything but the "don't know" value, -1.
2010-02-16 00:03:47 +00:00
dyoung 515dca997f Get pci_mode out of the global namespace. 2010-02-15 23:55:24 +00:00
dyoung 2e4dbd90d6 Don't use the global variable pci_mode, but use a local copy of
the return value of pci_mode_detect(), instead.
2010-02-15 23:53:07 +00:00
pgoyette 8844275b30 For symmetry, allow warning and critical upper-limits for capacity
sensors.
2010-02-15 22:32:04 +00:00
dyoung ff79c75809 Extract a subroutine, const char *cfdata_ifattr(cfdata_t cf), that
returns the name of the interface attribute that associates cf with
its parent.  Use cfdata_ifattr() at several sites in the autoconf
code.
2010-02-15 20:20:34 +00:00
mrg 658c47c0f2 - don't flush 32-bit entries for 64-bit code, it does not seem to be
necessary.  #define TLB_FLUSH_LOWVA to turn it back on.
- remove the #if 0'd code in sparc64_ipi_flush_pte_usiii(), i have
  verified that it is not required.
- add a missing membar #Sync to sp_tlb_flush_pte_usiii().
2010-02-15 12:46:24 +00:00
nakayama c160863387 Fix linker error of GENERIC32 kernel. 2010-02-15 11:46:54 +00:00
mrg 0432f45fd5 use TLB_SIZE_SPITFIRE in a couple of places, and note that the
{print,dump}_[id]tlb() versions are currently spitfire specific.
2010-02-15 09:56:33 +00:00
dholland 62bdde038d typo in comment 2010-02-15 09:39:00 +00:00
mrg 78e651db39 introduce a new patch_kernel() and call it from the end of bootstrap().
use it to patch up TLB flush instructions that don't match for USI/II
and later.  we can also hopefully use this to make GENERIC.MP minimally
expensive on single CPU machines as well.

this is the last piece needed to get GENERIC/GENERIC.MP to boot on the
USIII* machines.

idea and some initial code from openbsd.
2010-02-15 07:56:51 +00:00
skrll 6118df95b4 Typo in comment. 2010-02-15 07:55:33 +00:00
pgoyette de08bb89f2 Replace large amount of replicated code with a macro to improve readability. 2010-02-14 23:30:52 +00:00
pgoyette 6ac583dc32 Adapt to changes in sysmon's limit structure. 2010-02-14 23:07:59 +00:00
pgoyette f7613feb09 Adapt to changes in sysmon's limit structure 2010-02-14 23:07:22 +00:00
pgoyette 52af77f5e8 Adapt to changes in sysmon's limit structure. 2010-02-14 23:06:58 +00:00
pgoyette 9150436462 Remove the flags member of the limits structure. Its value was only
meaningful for a few limited function calls;  all persitent storage
of limit-present flags is maintained in the edata->upropset member.
2010-02-14 23:06:01 +00:00
pgoyette f84d320712 Correct one more instance of checking flags in the wrong place. 2010-02-14 16:22:09 +00:00
drochner 3f900515e4 add missing glue file, otherwise the emulation will not work if
compiled into the kernel (and the module loader will load another
instance, causing symbol duplication)
2010-02-14 11:54:03 +00:00
drochner ca771c66aa fix confused CS selector, fixes the panic reported by Mark Davis
per PR port-i386/42787 (the panic happens due to a GPF when a
privileged descriptor is tried to be loaded with the UPL bit set)
The original bug is very old (pre-2.0, i386/svr4_machdep.c rev. 1.69),
but it was relatively harmless until the order of GDT entries was
shuffled (pre-5.0, i386/segments.h rev. 1.42). Before, it caused
a userlevel data selector to be used for CS which broke the emulation
(likely the reason of PR port-i386/32424). The shuffle made that
a privileged selector was used, causing the GPF.
(recent -current doesn't panic on that GPF which seems to be a
side effect of another change)
2010-02-14 11:09:54 +00:00
eeh 80ff9af55f Major overhaul:
1) Add support for multiple filesystems including ffsv1, ffsv2, lfsv1 and lfsv2.
(ffsv1 and lfsv2 are known to work.  ffv2 support needs more work.  lfsv1 is
probably untested.)

2) Only 32-bit Fcodes are used.  All 64-bit math uses two cells.  This means it
should work on 32-bit machines.

Additional work to consider:

1) Rename genfth.cf to genffs.cf, or keep it and move the ffs symbols to genffs.cf

2) Move the ffs code and the lfs code to different source files so you can
selectively fload the just the filesystems you want.

3) Add code to load ELF files directly instead of relying on the host firmware
ELF support.  But, since the binary is now 7250 bytes there may not be room.
2010-02-13 23:38:17 +00:00
mrg 2c1b1c6acf remove KTR support. it's never been a working part of netbsd src tree. 2010-02-13 22:29:55 +00:00
mrg 6690014dc5 remove all the devices now present in GENERIC. 2010-02-13 22:24:09 +00:00
pgoyette 7bd93168ee When checking current sensor value vs limits, check the correct set of
flags to determine which limits are present.
2010-02-13 19:34:14 +00:00