summaryrefslogtreecommitdiff
path: root/sys/arch/vax
AgeCommit message (Collapse)Author
2014-07-12Tackle the endian.h mess. Make it so that:Philip Guenther
* you can #include <sys/endian.h> instead of <machine/endian.h>, and ditto <endian.h> (fixes code that pulls in <sys/endian.h> first) * those will always export the symbols that POSIX specified for <endian.h>, including the new {be,le}{16,32,64}toh() set. c.f. http://austingroupbugs.net/view.php?id=162 if __BSD_VISIBLE then you also get the symbols that our <machine/endian.h> currently exports (ntohs, NTOHS, dlg's bemtoh*, etc) * when doing POSIX compiles (not __BSD_VISIBLE), then <netinet/in.h> and <arpa/inet.h> will *stop* exporting the extra symbols like BYTE_ORDER and betoh* ok deraadt@
2014-07-12Pull in more atomic functions to avoid <sys/atomic.h> trying to use gcc4Miod Vallat
built-ins which aren't available on vax. (A similar diff for m88k is in the pipeline as well)
2014-07-11CPU_BUSY_CYCLE(): A new MI statement for busy loop power reductionMasao Uebayashi
The new CPU_BUSY_CYCLE() may be put in a busy loop body so that CPU can reduce power consumption, as Linux's cpu_relax() and FreeBSD's cpu_spinwait(). To start minimally, use PAUSE on i386/amd64 and empty on others. The name is chosen following the existing cpu_idle_*() functions. Naming and API may be polished later. OK kettenis@
2014-07-11Convert bus_dmamem_map(9) to km_alloc(9) in order to make it fail andMartin Pieuchot
not sleep if the allocator cannot obtain a lock when BUS_DMA_NOWAIT is specified. idea and inputs from kettenis@, ok miod@
2014-07-10Set cold to 1 before executing the DVACT_POWERDOWN handlers when halting orMartin Pieuchot
rebooting a machine, like it is done in the hibernate case. At least some USB host controller drivers rely on this to busy way instead of sleeping. Avoid a panic on macppc with an uhci(4) cardbus plugged in. ok deraadt@, uebayashi@
2014-07-10boot(9): Remove comments about RB_*, "cold", and savectx()Masao Uebayashi
Again remove slightly different comments to reduce diffs. These will be re-added once boot() become MI and its specification is clearly re-defined. OK miod@
2014-07-10boot(): Remove comments about RB_TIMEBAD to reduce diffsMasao Uebayashi
RB_TIMEBAD is documented well enough that the comment is not needed. sparc64 does slightly different and its comment is left with XXX. OK deraadt@ miod@
2014-07-10boot(): Unify declarationsMasao Uebayashi
OK deraadt@
2014-07-08decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hTheo de Raadt
don't need to be married. ok guenther miod beck jsing kettenis
2014-06-13Fix broken logic in sgec_rxintr() poorly duplicating some of ether_input()Miod Vallat
checks, causing the rx ring pointer to stall as soon as an irrelevant frame is received when the intergace is in bpf+promiscuous or `all multicast' mode. Problem spotted and tracked down to the use of bpf by sebastia@. Hair pulling by me.
2014-05-31Revert previous diff setting cold to 1 on shutdown because it breaks machineMartin Pieuchot
with softraid(4) disks. softraid(4) is the last real consumer of the doshutdownhooks(9) API and it is not trivial to convert its hook to a DVACT_POWERDOWN handler since the latter does not allow to sleep.
2014-05-30Set cold to 1 before executing the DVACT_POWERDOWN handlers when halting orMartin Pieuchot
rebooting a machine, like it is done in the hibernate case. At least some USB host controller drivers rely on this to busy way instead of sleeping. Avoid a panic on macppc with an uhci(4) cardbus plugged in. ok deraadt@, uebayashi@
2014-05-25Turn on blinky things by default, very useful hereTheo de Raadt
2014-05-24Why didn't I use ps_vmspace when I scribbled all over pmap_rmproc()?Philip Guenther
ok miod@
2014-05-17One more mistake introduced in 1.65Miod Vallat
2014-05-17...and it needs a guard against NULL as well.Miod Vallat
2014-05-17Fix previous commit by making sure we are not dereferencing uninitializedMiod Vallat
pointers.
2014-05-17Lower VUPS value for delay() to behave closer to the intent.Miod Vallat
This is temporary until vax grows code to compute a proper delay const at runtime, but will help a bit, especially on KA46 where cd(4) end up detected as sd(4) due to too short delays.
2014-05-17Print the rpb device type and unit values if the root device can't be foundMiod Vallat
by the kernel.
2014-05-15Move from struct proc to process the reference-count-holding pointersPhilip Guenther
to the process's vmspace and filedescs. struct proc continues to keep copies of the pointers, copying them on fork, clearing them on exit, and (for vmspace) refreshing on exec. Also, make uvm_swapout_threads() thread aware, eliminating p_swtime in kernel. particular testing by ajacoutot@ and sebastia@
2014-05-11Move the increment of uvmexp.softs back to the caller of mi_ast():Philip Guenther
it needs to be done atomicly on some MP archs and we don't have atomic_add_int() everywhere yet. Also, mi_ast() was meant to be inline. noted by miod@
2014-05-10Factor out the common ast bits into mi_ast()Philip Guenther
ok deraadt@
2014-05-08No longer build vax kernels with -Wno-format.Miod Vallat
2014-05-08Format string fixes.Miod Vallat
2014-04-18Have each thread keeps its own (counted!) reference to the process's ucredsPhilip Guenther
to avoid possible use-after-free references when swapping ids in threaded processes. "Do I have the right creds?" checks are always made with the threads creds. Inspired by FreeBSD and NetBSD "right time" deraadt@
2014-03-30Eliminates struct pcred by moving the real and saved ugids intoPhilip Guenther
struct ucred; struct process then directly links to the ucred Based on a discussion at c2k10 or so before noting that FreeBSD and NetBSD did this too. ok matthew@
2014-03-29It's been a quarter century: we can assume volatile is present with that name.Philip Guenther
ok dlg@ mpi@ deraadt@
2014-03-26Move p_emul and p_sigcode from proc to process.Philip Guenther
Tweak the handling of ktrace EMUL when changing ktracing: only generate one per process (not one per thread) and pass the correct proc pointer down to the VFS layer. Permit generating of NAMI and CSW records inside ktrace(2) itself. ok deraadt@ millert@
2014-03-22Move p_sigacts from struct proc to struct process.Philip Guenther
testing help mpi@
2014-03-19It's safe to assumed 'signed' existsPhilip Guenther
2014-03-18More a.out detritusPhilip Guenther
ok miod@
2014-03-16DDB supports ELF symbols are all archs, and it's always the same as thePhilip Guenther
native size, so eliminate the #defines. ok miod@
2014-03-13get rid of the assumption that the head of the alldevs list is theDavid Gwynne
"mainbus" device. this breaks when mpath is enabled because it attaches before mainbus and therefore takes the head position. have autoconf provide device_mainbus() which looks up mainbus_cd, and use that instead. discussed with deraadt who just wants mpath stuff to move forward despite there being many ways to shine this particular turd.
2014-03-11lint is gone, and the 'lint' conditional was never in the implementationPhilip Guenther
namespace, so stop changing behavior when it's #defined ok beck@ krw@
2014-02-19/etc/random.seed support (only loaded from disk devices).Miod Vallat
2014-02-13Checking if the per-interface address list is empty when configuringMartin Pieuchot
the chip is always false, so remove this no-op. In fact this list contains the link-layer address as soon as the device attachs. ok miod@
2014-02-09Fix copying of the previous pte entries in grow_p1(). Found the hard way byMiod Vallat
sebastia@, this would only affect processes using more than 512KB of stack.
2014-01-30Move declaration of struct vm_page_md from <machine/vmparam.h> toMiod Vallat
<machine/pmap.h> where it belongs, and compensate in <uvm/uvm_extern.h> by including <uvm/uvm_pmap.h> before <uvm/uvm_page.h>. Tested on all MACHINE_ARCH but amd64 and i386 (and hppa64).
2014-01-26Attempt to make user changes of keyboard layout a bit more `sticky' on wsmuxMiod Vallat
kernels: - keyboard drivers will now tell wskbd if the keyboard layout they ask for is a default value, or a value they are 100% sure of (either because your kernel has a XXXKBD_LAYOUT option, or because the driver can tell the keyboard layout, e.g. by the country code on USB keyboards which provide it, such as Sun's) - when attaching a keyboard with a non-default layout, the layout will become the default layout of the mux for new keyboard attachments if the mux doesn't have a layout set already. - when changing the keyboard layout of a particular keyboard with an ioctl (i.e. using kbd(8) or wsconsctl(8)), the layout will become the default layout of the mux for new keyboard attachments. ok mpi@
2014-01-23unifdef -D__HAVE_VM_PAGE_MD - no functional change.Miod Vallat
2014-01-21dtucker@ pointed out i suck at grep.David Gwynne
fix ncr53c9x fallout.
2014-01-04Add rnddata[] placeholders to make these boot blocks build again.Miod Vallat
2013-12-18Provide MI symbol _STACKALIGNBYTESTheo de Raadt
2013-12-08reflect reality, mark as NOOBJMarc Espie
"sure" deraadt@
2013-11-27Instead of comparing the lower and higher addresses of all the multicastMartin Pieuchot
entries to decide if the IFF_ALLMULTI flag should be set, check if there is at least one real range between them. This should not change the behavior of any driver but if you encounter any problem, feel free to revert the offending chunk and ping me about it. ok naddy@, dlg@
2013-11-24Increase NMBCLUSTERS a bit. Riding upon the kernel memory saved by the pmapMiod Vallat
changes.
2013-11-24Increase MAXDSIZ to 128MB, and BRKSIZ to 16MB, now that we can afford this.Miod Vallat
Also double DFLDSIZ.
2013-11-24Rework pmap to use dynamic P0 and P1 region allocation, instead of allocatingMiod Vallat
the largest possible page table for every pmap; from NetBSD. This allows the kernel to use much less memory for page tables. Significant differences against the NetBSD code are: - allocation of page table pages is done with a pool instead of allocating whole logical pages from uvm and managing the freelist within pmap, never releasing allocated pages. - try to use pt_entry_t * rather than int * whenever possible. - growth of P0 and P1 regions is allowed to fail, if invoked from pmap_enter with the PMAP_CANFAIL flag. This will stall processes until memory for the page tables can be obtained, rather than panicing, in most cases. - keep management of mappings for managed pages using pv lists tied to the vm_page (using __HAVE_VM_PAGE_MD), rather than a global pv_list head. - bound check against Sysmap[] in pmap_extract() when asked for a kernel address. As a result of this, bsd.rd can now install a working system on a 12MB machine without needing to enable swap.
2013-11-20Update comments mentioning `resource maps' to mention `extents' instead.Miod Vallat
Resource maps have been removed more than 10 years ago, it's about time to update comments to better match reality. No functional change.
2013-11-20replace bare use of disksort with bufqs.David Gwynne
go ahead miod@