Commit Graph

80040 Commits

Author SHA1 Message Date
erh 8ad33681f8 Fix Coverity issues 2321 and 2320. Make sure to free allocated memory. 2006-03-17 06:01:14 +00:00
garbled 6434af65ce ANSIfy all these files.. just formatting changes.
Remove kbdreg.h.. this was part of pccons, and was apparently missed long
ago.
2006-03-17 05:33:33 +00:00
chris fea7c6a78b Fix range to check to avoid a static buffer overrun, when
font->encoding == 4, which would cause access past the end of the encodings
array.

Fixes Coverity CID 1446.

Note that perhaps we should actually have an encoding line for
WSDISPLAY_FONTENC_ISO2 which is encoding 4.
2006-03-17 03:21:57 +00:00
chris caebf8211b Move check for rnode being NULL to before it's first use.
Fixes Coverity CID 2434
2006-03-17 01:52:08 +00:00
bouyer 14e4157f2e Add a xenbus_read_ul() which reads a node and convert it to unsigned long.
Make xenbus_switch_state() and xenbus_read_driver_state() do something usefull.
2006-03-16 23:08:08 +00:00
bouyer 62b855014e m_copyback() doesn't work the way I expexted it: it doesn't update the
mbuf fields, and it seems it doesn't allocate mbuf clusters for large
packets. So revert to using MCLGET() if needed and memcpy to get the
data in the mbuf.
Should fix panic in m_makewritable() reported by Mike M. Volokhov
and Andreas Wrede on port-xen, patch tested by Andreas Wrede.
2006-03-16 23:02:50 +00:00
drochner b89e2072ab need to set uio_vmspace for XMM accesses 2006-03-16 18:59:17 +00:00
drochner 751e656b13 adjust a diagnostic printf 2006-03-16 18:22:16 +00:00
garbled d736b3d508 More changes to prep port:
1) Add the NVRAM device.  This device allows us to speak with the nvram on
prep-based machines and read/write to it.  Also add a simple IOCTL
interface for speaking with the nvram from userland.  This hasn't been
tested yet, but eventually I plan to support it with the sparc eeprom
command.
2) Change the root device detection to use the nvram device to attempt to
guess the boot device.  Most machines should now correctly guess thier
boot device, though I expect a few devices to still not work quite right yet.
3) change the default IRQ to level rather than edge in the pnpbus if the
flags are invalid or empty. (based on output from a PowerStack E1)
4) correctly handle older machines in pnpbus that have FixedIOPorts
rather than variable ones.

Still have much to do.
2006-03-16 17:43:34 +00:00
chs a940d15b3c handle another difference between the BSDs:
free the original mbuf in the jumbo-free callback too.
2006-03-16 17:26:13 +00:00
cube f40bc6f570 s/uint32_t/unsigned int/ because we don't always have the former defined.
Reported by Juergen Hannken-Illjes.

XXX I prefer uint32_t, but there might be some namespace issues so for now
    it will do.
2006-03-16 16:05:53 +00:00
christos 7a151ba681 include if_ether.h if you want to use ether_sprintf() 2006-03-16 15:59:22 +00:00
christos cbff0fb84a Add a new function called ether_snprintf() which takes an external buffer
and a length. The buffer should be 3 * addrlen.
Remove local tap_ether_sprintf(), and use ether_snprintf() instead.
2006-03-16 15:57:59 +00:00
christos cbf41b4afc Remove duplicate and slightly different declaration of ether_sprintf, which
really should be in if_ether.h like all the other ether_ functions.
2006-03-16 15:56:28 +00:00
christos c92b23ffa8 Don't use DEBUG, add a new DEBUG_NFS_BOOT_DHCP variable to provide more
information. Print more information about what fails.
2006-03-16 15:55:20 +00:00
he 450ce68a74 Transform to new signature for uvm_fault() by dropping the third arg.
Discussed with drochner.
2006-03-16 15:10:06 +00:00
simonb c050474de9 Update a comment. 2006-03-16 14:23:19 +00:00
simonb 714761acde Fix prototype for au_himem_map(). 2006-03-16 14:19:04 +00:00
yamt e8c269e903 fix EXT_ bits in M_FLAGS_BITS. 2006-03-16 13:41:56 +00:00
drochner 0aa0d9a4cb revert accidental commit of local changes, pointed out by
Geoff Wing and Tom Spindler
2006-03-16 10:13:55 +00:00
erh 762add7da1 Check db_onpanic before dropping into the debugger on lock errors. 2006-03-16 00:52:32 +00:00
dogcow e3ac1915cb For every season, churn, churn, churn.
To fix lingering problems with the LV/ULV Pentium Ms that run with a 400 MHz
FSB (738, et al), change ENTRY() yet again to directly include the FSB
multiplier - CPUID isn't enough to determine what it should be.
While I'm at it, add more values for the 750, and fix values for the 730
and 770 to jibe with what the 'prescribed' values (via ACPI) are.

Fixes PR/33080 and PR/33081.
2006-03-15 22:56:38 +00:00
matt 332716e9f3 Fix typo in lhs cast removal. 2006-03-15 22:39:28 +00:00
bouyer aceceafca7 Implement watch of xenstore nodes, and install watches for otherend'state
node.
2006-03-15 22:20:06 +00:00
drochner b68c2aadca use km_alloc to get wired kernel memory for kernel stacks
of idle processes for secondary CPUs
(affects the MULTIPROCESSOR case only - does this exist?)
(untested)
2006-03-15 18:31:11 +00:00
drochner 47fbb9d86b adapt to uvm_fault() interface cleanup: kill the useless 3rd argument 2006-03-15 18:12:02 +00:00
drochner e10923fd37 -clean up the interface to uvm_fault: the "fault type" didn't serve
any purpose (done by a macro, so we don't save any cycles for now)
-kill vm_fault_t; it is not needed for real faults, and for simulated
 faults (wiring) it can be replaced by UVM internal flags
-remove <uvm/uvm_fault.h> from uvm_extern.h again
2006-03-15 18:09:25 +00:00
drochner 94c70b92a9 Check the "oldlen" argument to sysctl(2) before passing it
to vslock(9). This prevents a local DOS.
(The checks against system and user limits for wired
memory should be centralized in UVM; for now prefer a less
invasive fix which can be pulled pulled up into releases.)
2006-03-15 16:12:07 +00:00
christos 23a74d17e2 New patch from Cory Bajus 2006-03-15 15:39:26 +00:00
gdt e854a7f59c Add comments explaining how the 3 size variables for venus calls are
used.

Remove defect in size allocation for coda_readlink to avoid having
venus write outside malloced space by including pathname space before
allocation.

Add asserts that cred structure is non-NULL and non-FSCRED.

Check lwp against NULL before dereferencing it.

Assert that output pointer is non-NULL on a few venus returns.  This "can't
happen" but has been seen in crash dumps.

With these changes, the following work on a 345 MB coda volume.
(Before, a single invocation of tar or pax on this volume would
crash.)

$ for i in $(seq 1 10); do find . -type f -print0 |xargs -0 md5 > MD5.$i & done

Two copies of

$ for i in $(seq 1 10); do pax -w /coda/[redacted] >/dev/null & done


(lwp NULL check semi-reviewed by wrstuden@)
2006-03-15 14:30:56 +00:00
cube daab1bf18c Move malloc calls outside of the block where a lock is held. 2006-03-15 11:36:42 +00:00
lukem 315ceca91a Update arguments to ENVSYS_GTREDATA, ENVSYS_STREINFO, and ENVSYS_GTREINFO
to use the typedef-equivalent and more generic envsys_tre_data_t
and envsys_basic_info_t types.
Per discussion on tech-kern in October-November 2005.
2006-03-15 11:22:23 +00:00
yamt 0c8e5d8d8f whitespace. 2006-03-15 11:10:41 +00:00
yamt 2ff5a7c85c m_copyback0: add comments and assertions. 2006-03-15 10:40:30 +00:00
cube 37b7f4fbd8 SA introduce a new case of siginfo structure. Be ready for it when the
time comes to support SA in COMPAT_NETBSD32 (which is soon).
2006-03-15 09:09:47 +00:00
he 95eaf7b1bc Bump SYMTAB_SPACE so that it fits again. 2006-03-15 08:47:43 +00:00
dogcow 8aacb40fba Rearrange the Dothan table a bit, and fix the 738 CPUID (6d6, not 6d8).
Move the voltage-level check into the cpu ID loop, since it seems that
CPUs with the same ID string and the same CPUID can have different voltage
levels. Thank you, Intel.
2006-03-15 01:31:20 +00:00
uwe 4030a5d7d5 Make this compile with WSKBD_DEBUG again. 2006-03-14 23:41:45 +00:00
uwe bf9317f643 Constify scancode translation table.
Print dv_xname when reporting unknown scancode.
2006-03-14 23:03:45 +00:00
uwe 50e028653d Support WSDISPLAY_COMPAT_RAWKBD so that this keyboard is usable under X. 2006-03-14 22:59:32 +00:00
yamt 766d042b22 fix a typo in M_FLAGS_BITS. 2006-03-14 22:40:53 +00:00
cube bc7a3a86a6 Add the sparc64 MD bits to get usable coredumps for COMPAT_NETBSD32
binaries.
2006-03-14 22:05:05 +00:00
cube 8db07ab1c5 Under COMPAT_NETBSD32 emulation, pointers are not the same size as the
native ones...  netbsd32_pointer_t can't be used here though, so uint32_t
is used instead, which is of course the same thing.
2006-03-14 22:03:39 +00:00
shige ad1152f593 Using GPIO bus. 2006-03-14 21:59:12 +00:00
cube 7e4eb63d0d We really have EM_SPARC binaries in 32-bits mode, not EM_SPARC32PLUS.
And yes, we do have EM_SPARCV9 binaries in 64-bits mode.
2006-03-14 21:37:48 +00:00
bouyer 5dde2b7033 Welcome to 3.99.17: kfsfileop changed. 2006-03-14 20:57:07 +00:00
bouyer 59b64d6167 Allow optionnal /kern regular files to have custom read methods, the same
way writes are handled: Add KERNFS_XREAD and KERNFS_FILEOP_WRITE files
operations definitions to kfsfileop, a xread function pointer to
kernfs_fileop, rename kernfs_read to kernfs_default_xread and add a
kernfs_read calling kernfs_try_fileop(KERNFS_FILEOP_READ).

Proposed on tech-kern on Feb 18 2006.
2006-03-14 20:47:52 +00:00
tsutsui 6b6bdb9538 Oops, fix botch in previous. 2006-03-14 15:33:11 +00:00
tsutsui 4b0dbc6b50 TAB/space cleanup. 2006-03-14 15:24:30 +00:00
chs 3b7a4338db use lockmgr() instead of bespoke code for mutual exclusion in fss_ioctl().
only take the lock when we actually need it (and particularly not for
unknown cmds that are just going to fail immediately).  fixes PR 33060.
2006-03-14 15:07:29 +00:00