This allows us to use both the old sun keyboard events (/dev/kbd) as
new wscons events (/dev/wskbd*).
TODO: Not implemented for the kbd at zstty attachment.
Wskbd as console does not yet work.
offset calculation. Mostly from Bang Jun Young.
Don't call wsdisplay_cnattach unconditionally.
On sparc use OF to decide whether we are console output.
This makes it actually work on my U5 - if only we had a keyboard driver
to produce wskbd events (coming soon).
backwards and forwards) if the previous entry was backed by an amap.
Fixes pr kern/18789, where netscape 7 + a java applet actually manage
to incur forward and bimerges in userspace.
Code reviewed by fvdl and thorpej.
- The MD netbsd32_machdep.h header now defines the 32-bit pointer type
instead of using u_int32_t everywhere,
- The MD netbsd32_machdep.h header now defines a macro (at least on
current implementations) which converts a 32-bit pointer to its 64-bit
equivalent,
- Change the MI code to utilise the above two items in all the right places,
- Implement netbsd32___sigaction_sigtramp().
Tested on Sparc64 by Matt Green.
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals
kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)
based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
Add codec id of VT1616.
ALC650 codec specific chagne:
Add outputs.surround.mixtofront,
outputs.center.mixtofront, and outputs.lfe.mixtofront.
VT1616 codec specific change:
Add outputs.surround.mixtofront,
outputs.center.mixtofront, and outputs.lfe.mixtofront.
(Not tested)
XXX: We should provide ac97(4) manual page and describe
codec-specific features.
- Shift a leading misaligned quad to compensate for the implicit shift
in the "ldlo.q" instruction. (And remove the "XXX:" comment which correctly
hinted that this might be necessary).
- Clean up some comments.
meaning that there is no packet available. the OF spec reportedly
says that it's supposed to return 0 in this case, but my Firepower box
uses -2, so this is probably another of those FIRMWORKSBUGS things.
we'll accept both values in any case.
removing has no next element, verify that the queue head agrees that
the current element is the last one. (this is how I found the recent
ppc pmap bugs).
- in pmap_pte_spill(), the victim PTE could be using the secondary hash,
in which case its pvo entry is actually in the other bucket. use the
correct bucket for the victim pvo when moving it to the front of its list.
- similarly, in pmap_pvo_remove(), if the pteidx is pre-computed for us,
it might actually point to the other bucket if the entry is using the
secondary hash. adjust ptegidx if this is the case.
these should fix PRs 18645 and 18736.
while I'm here, wrap line lines and do some other misc cleanup.
Remove the set-but-not-used "proto" variable.
Guard the "ostate" variable in #ifdef TCP_DEBUG.
Remove the set-but-not-used "parentinpcb" variable in syn_cache_get().
add a flag that specify if the file can be truncated safely or not
to nfsm_loadattr and friends. when it isn't safe, just mark the nfsnode
as "should be truncated later".
ok'ed by Frank van der Linden and Chuck Silvers.
close kern/18036.
UPA is just a physical incarnation of our mainbus0.
Evidence:
- There can only be one!
- The firmware node coresponding to it is the root of the OF tree
So: remove the unused (and uncompilable) upa.c, remove upavar.h after
moving the only declaration used from it to autoconf.h.
- If the BIOS reports the same memory cluster multiple times,
only allocate the extent once.
- If we fail to allocate an extent,
don't add it to mem_clusters and don't increment mem_cluster_cnt.
- When loading the physical extents,
make sure we don't try to add an extent with zero length (seg_start == tmp).
port-i386/13399: from maximum entropy <entropy@tappedin.com>.
As discussed (briefly) on tech-userlevel, fix our quad support to work
correctly on LP64 platforms. This is mostly just s/long/int/ in the
appropriate places.
clean up some other stuff along the way, including:
- use m68k/cacheops.*, remove duplicates from cpu.h.
- centralize a few declarations in (all the copies of) cpu.h.
- define M68K_VAC on platforms which have a VAC.
- switch the sun platforms to the (now common) proc_trampoline().
- do the phys_map thang on the sun platforms too, no reason not to.
children nodes have reached their final state before augmenting the
parent. This fixes an obscure inconsistency of the space in the
vm_map tree that gcc 3.2 triggers when compiling isp.o on alpha. (this
only led to some leaked space). from art@openbsd.org
alignment code. (There was nothing wrong with the original code path
other than it was slightly slower if the buffer was already aligned).
Also, catch another corner case related to alignment/length of the
last 1-7 bytes.
ISP_DAC_SUPPORTED is defined and do a real typedef for the size
of DMA addresses. ISP_DAC_SUPPORTED also decides how much of any
particular DMA address is significant.
Lose STRNCAT over the side.
Add in (sight unseen) 10160 support.
Start doing the work necessary to support DAC (Dual Address Cycle)
environments. This allows for direct DMA to > 4GB memory from a PCI
card.
Lose STRNCAT over the side and use SNPRINTF instead.
In particular, use r8 to hold the old process, and r7 for medium-term
scratch, saving r0-r3 for things we don't need saved over function
calls. This gets rid of five register-to-register MOVs.
and hence save fewer into the PCB. This should give me enough free
registers in cpu_switch to tidy things up and support MULTIPROCESSOR
properly. While we're here, make the stacked registers into an
APCS stack frame, so that DDB backtraces through cpu_switch() will
work.
This also affects cpu_fork(), which has to fabricate a switchframe and
PCB for the new process.
allocations can be merged either forwards or backwards, meaning no new
entries will be added to the list, and some can even be merged in both
directions, resulting in a surplus entry.
This code typically reduces the number of map entries in the
kernel_map by an order of magnitude or more. It also makes possible
recovery from the pathological case of "5000 processes created and
then killed", which leaves behind a large number of map entries.
The only forward merge case not covered is the instance of an amap
that has to be extended backwards (WIP). Note that this only affects
processes, not the kernel (the kernel doesn't use amaps), and that
merge opportunities like this come up *very* rarely, if at all. Eg,
after being up for eight days, I see only three failures in this
regard, and even those are most likely due to programs I'm developing
to exercise this case.
Code reviewed by thorpej, matt, christos, mrg, chuq, chuck, perry,
tls, and probably others. I'd like to thank my mother, the Hollywood
Foreign Press...
using a "movi imm, Rn / sub R15, RN, R15" pair. This is how the compiler
creates frames which are too big to fit in the immediate field of "addi";
something which happens a lot with -O0 ...
While I'm here, add a simple heuristic to detect infinite loops caused by
tracing back through some non-leaf asm routines which don't set up frames.
so that PHY instance is not siginificant in ifmedia_match(). This
is done to support multiple PHYs on the MII. Without this change,
ifmedia_set() would panic the system when no PHYs were matched.
I ran into this on an AMD EasyNow PC, which is built around SiS
system chips with an embedded SiS 900 core, and an external AMD
Am79c901 PHY, which presents two PHYs on the MII: one for HomePNA,
and one for standard 10base-T. The 10base-T PHY ends up with instance
number 1...
wrt prefix management;
- always earn a reference to the prefix when an address is configured
(by ioctl).
- always delete the prefix when an address that has the last referene
is manually removed.
The change should solve the problem raised in KAME-snap 6989.
sync w/kame
GCC produces almost exactly the same instructions as the hand-assembled
versions, albeit in a different order. It even found one place where it
could shave one off. Its insistence on creating a stack frame might slow
things down marginally, but not, I think, enough to matter.
to char-cell based vga(4) driver, and fully compatible with existing
apps like XFree86. Currently it supports 80x25, 80x30, 80x40 and 80x50
text modes using emulation. You can enable it by specifying `options
VGA_RASTERCONSOLE' in your kernel config file.
Note that displaying multilingual text doesn't work yet. Necessary
code is already there, but userland stuff and some functionality isn't
ready for prime time yet. I'm working on them.
children to attach; it is not sufficient to have an interface
atttribute which only happens to have the same name.
Fix the same mistake with the sabtty declaration.
It seems that the firmware accept 104bit key only if
all the keys have 104bit length. We get the length of
the transmit key and use it for all other keys.
Perhaps we should use software WEP for such situation.
Change the name for the size of driver private structure:
ic_bss_privlen -> ic_node_privlen
Add a hook to free node for the driver private structure, though there are
no consumer of the structure in the tree for now.
add rd, pc, #foo - . - 8 -> adr rd, foo
ldr rd, [pc, #foo - . - 8] -> ldr rd, foo
Also, when saving the return address for a function pointer call, use
"mov lr, pc" just before the call unless the return address is somewhere
other than just after the call site.
Finally, a few obvious little micro-optimisations like using LDR directly
rather than ADR followed by LDR, and loading directly into PC rather than
bouncing via R0.
private to the process within the share group.
There is one bit missing in this implementation: when replicating a change
in a process VM to the other process of the share group, we avoid copying
mappings for private regions in the target process, but we don't prevent
copying private regions from the source process.
- Allocate interrupt handles dynamically from a pool(9) to reduce the
number of TLB misses during interrupt dispatch.
- Fully support evcnt(9) in all interrupt dispatchers.
- Add "outputs.surround", "outputs.center", and "outputs.lfe"
- If the codec is not capable of a feature, mixer variables
about the feature is not created. For example, no
"outputs.tone" for a codec without tone control.
- Set the following mixer values in ac97_attach():
outputs.master=127,127
outputs.master.mute=off
outputs.headphones.mute=off
outputs.surround=127,127
outputs.surround.mute=off
outputs.center=127
outputs.center.mute=off
outputs.lfe=127
outputs.lfe.mute=off
inputs.dac.mute=off
inputs.cd.mute=off
inputs.line.mute=off
inputs.aux.mute=off
inputs.video.mute=off
record.volume.mute=off
because the default setting of AC'97 codec (all mutes are on,
and maximum volume) is troublesome.
- Make "char*" parameters of ac97_get_portnum_by_name() "const char*"
Codec ID changes:
- If a codec ID is unknown but its vendor ID is known,
ac97_attach() prints the vendor name like "dev0: <vendor name>
unknown (0xXXXXXXXX) codec;"
- Add IDs of Asahi Kasei AK4542, AK4544, AK4544A, AK4545,
Realtek ALC100
- Correct a vendor name: "Advance Logic" -> "Avance Logic"
- Add capability of codec-specific initialization
ac97_attach():
- CDAC, SDAC, and LDAC are eanabled.
- DELAY() before mixer settings. ThinkPad X24 needs it.
ALC650 codec specific change:
- Add "outputs.surround.lineinjack" to switch the line-in jack
to the surround output
- Add "outputs.center.micjack" and "outputs.lfe.micjack" (alias
of "outputs.center.micjack") to switch the mic jack to the
center/lfe output.
in question, whereas the ARM code was using it to hold the model
identification. To fix this, rename:
ci_cpuid -> ci_arm_cpuid
ci_cputype -> ci_arm_cputype (for consistency)
ci_cpurev -> ci_arm_cpurev (ditto)
ci_cpunum -> ci_cpuid
This makes top(1) give correct CPU numbers in its "STATE" column (all 0 for
now).
joins other machdep files)
Saves maintaining multiple copies of the same thing, the only differences
were:
IRQ line used on the footbridge (made that a define in include/isa_machdep.h)
name of a dma_ranges variable contained arch name, so just made it generic.
with privilege elevation no suid or sgid binaries are necessary any
longer. Applications can be executed completely unprivileged. Systrace
raises the privileges for a single system call depending on the
configured policy.
Idea from discussions with Perry Metzger, Dug Song and Marcus Watts.
Approved by christos and thorpej.
rename former uriopoll() to urioselect() and provide it only for OpenBSD -
FreeBSD uses nopoll() for urio too
g/c no longer needed uriopoll define for OpenBSD
XXX: Current code may have problems if kernel memory is completely depleted.
This is, unfortunately, not the only chunk of RAIDframe code to have
this problem, and will have to be dealt with. :(
Define an attribute for each crypto algorithm, and use that attribute
to select the files that implement the algorithm.
* Give the "wlan" attribute a dependency on the "arc4" attribute.
* Give the "cgd" pseudo-device the "des", "blowfish", "cast128", and
"rijndael" attributes.
* Use the new attribute-as-option-dependencies feature of config(8) to
give the IPSEC_ESP option dependencies on the "des", "blowfish", "cast128",
and "rijndael" attributes.
* IPKDB_NE_PCISLOT does not need any dependencies (it is merely a
required parameter for IPKDB_NE_PCI).
* IPKDB_NE_PCI does should not have an option-dependency on IPKDB_NE_PCISLOT.
While IPKDB_NE_PCISLOT is a required parameter, that is not how option-
dependencies work, and we don't want IPKDB_NE_PCI to imply IPKDB_NE_PCISLOT,
as that would cause a bogus value for IPKDB_NE_PCISLOT to be used.
Also, the IPKDB_NE_PCI selector should be lower-case; make it so.
netinet/files.ipfilter, etinet/files.netinet, netinet6/files.netinet6,
and netinet6/files.netipsec.
XXX There are still a few stragglers in conf/files, which are entangled
with other network protocols.
"evictions" and avoide calling pmap_pte_spill if there are no evictions
for the current pmap. Make the ISI execption use the default exception
code. Remove lots of dead stuff from trap_subr.
Make olink use TAILQ instead of LIST and be sorted with evicted entries
first and resident entries last. Make use of this knowledge to make
pmap_pte_spill do a fast exit.
intterupts. No more races between the two interrupt handlers, without any
locking, and the driver becomes a bit simpler too.
Use the last bit of the config flags to select between the first and the
second sbus interrupt level the firmware has assigned to us.
0x13 Function 0) after a read error. This is a requirement mentioned
in most BIOS documentation.
This answers PR 18591.
Incidentally, on the Soekris Engineering net45x1 single-board
computer, this fixes a bug where the bootloader corrupts the kernel
while loading it from certain varieties of CompactFlash card
(especially varieties identified by NetBSD as <TOSHIBA THNCF064MBA>).
When the read value is 0, reset the timer (don't wait till the next loop round to reset it)
Add a bit of debug to the calibration stuff to make sure its working ok.
- Use the PVO_CACHEABLE flag in the pvo as the One True Indicator of
the cacheable status of a mapping instead of peeking at the PTEH.
- Don't inline some of the larger routines, in an effort to appease
the somewhat buggy compiler.
- Fix some comments.
- Fix some casts.
- Add a bunch more debugging instrumentation.
- Move usr, sr, pc, and the branch-target registers to the top of
the listing so that it is no longer necessary to scroll through
64 integer registers to see them.
This argument has been previously unused, thus undetected due to void*
typing. Mmm, copy & paste. Note that sparc got it right though.
Many thanks to Valeriy E. Ushakov <uwe@netbsd.org> for debugging support.
"scsi_core". Make all the files previously selected by the "scsi"
attribute selected by the "scsi_core" attribute. Give the "scsibus"
device the "scsi_core" attribute.
initialisation. This is just as silly as the other entropy
estimations, but it at least allows us to see how many values have
been added.
spl protect rnd_get_entropy_counter call properly
Make rndpool start out doing rotations on the first pass - make the
LSFR's be less sensitive to stuck bits in poor initial inputs.
Add considerable comments regarding the mixing function.
kernel right now, a sleep lock around the entire thing would have
worked as well, but hey.
Also correct PCB_USER_LDT to PMF_USER_LDT. This was wrong but since
they had the same value, it didn't matter.