summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/include
AgeCommit message (Collapse)Author
2004-01-04Rearrange process exit path to avoid need to free resources from differentjdolecek
process context ('reaper'). From within the exiting process context: * deactivate pmap and free vmspace while we can still block * introduce MD cpu_lwp_free() - this cleans all MD-specific context (such as FPU state), and is the last potentially blocking operation; all of cpu_wait(), and most of cpu_exit(), is now folded into cpu_lwp_free() * process is now immediatelly marked as zombie and made available for pickup by parent; the remaining last lwp continues the exit as fully detached * MI (rather than MD) code bumps uvmexp.swtch, cpu_exit() is now same for both 'process' and 'lwp' exit uvm_lwp_exit() is modified to never block; the u-area memory is now always just linked to the list of available u-areas. Introduce (blocking) uvm_uarea_drain(), which is called to release the excessive u-area memory; this is called by parent within wait4(), or by pagedaemon on memory shortage. uvm_uarea_free() is now private function within uvm_glue.c. MD process/lwp exit code now always calls lwp_exit2() immediatelly after switching away from the exiting lwp. g/c now unneeded routines and variables, including the reaper kernel thread
2003-12-04netbsd.org -> NetBSD.orgkeihan
All "netbsd.org" is now gone from src/sys/arch.
2003-11-25bye, bye _MCONTEXT_TO_SIGCONTEXT and vice versa.christos
2003-10-31Reduce code duplication by adding mi_userret() in sys/userret.hcl
containing signal posting, kernel-exit handling and sa_upcall processing. XXX the pc532, sparc, sparc64 and vax ports should have their XXX userret() code rearranged to use this.
2003-10-26Use <sys/ieee754.h> where applicable.kleink
2003-10-18define SIGTRAMP_VALID()christos
2003-10-08Add some accessor macros for the ucontext:thorpej
* _UC_MACHINE_PC() - access the program counter * _UC_MACHINE_INTRV() - access the integer return value register * _UC_MACHINE_SET_PC() - set the program counter (this requires special handling on some platforms).
2003-10-07Siginfo changes for alpha kernel. Approved by thorpej@netbsd.org.skd
2003-09-26Move __cpu_simple_lock_t and __SIMPLELOCK_{UN,}LOCKED to machine/types.hnathanw
so that they can be used in a namespace-friendly way.
2003-09-21Backed out single step emulation.skd
Approved by thorpej@netbsd.org.
2003-09-18Added kernel support for single stepping, adapted from FreeBSD.skd
Approved by christos.
2003-09-11__{BEGIN,END}_DECLS-wrap prototypes.kleink
2003-08-24add support for non-executable mappings (where the hardware allows this)chs
and make the stack and heap non-executable by default. the changes fall into two basic catagories: - pmap and trap-handler changes. these are all MD: = alpha: we already track per-page execute permission with the (software) PG_EXEC bit, so just have the trap handler pay attention to it. = i386: use a new GDT segment for %cs for processes that have no executable mappings above a certain threshold (currently the bottom of the stack). track per-page execute permission with the last unused PTE bit. = powerpc/ibm4xx: just use the hardware exec bit. = powerpc/oea: we already track per-page exec bits, but the hardware only implements non-exec mappings at the segment level. so track the number of executable mappings in each segment and turn on the no-exec segment bit iff the count is 0. adjust the trap handler to deal. = sparc (sun4m): fix our use of the hardware protection bits. fix the trap handler to recognize text faults. = sparc64: split the existing unified TSB into data and instruction TSBs, and only load TTEs into the appropriate TSB(s) for the permissions. fix the trap handler to check for execute permission. = not yet implemented: amd64, hppa, sh5 - changes in all the emulations that put a signal trampoline on the stack. instead, we now put the trampoline into a uvm_aobj and map that into the process separately. originally from openbsd, adapted for netbsd by me.
2003-08-07Move UCB-licensed code from 4-clause to 3-clause licence.agc
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-02Make this compile with gcc3. Change kernel_pmap_store to array of structmatt
pmap instead of array u_long. A bit of space is wasted but it supresses the -Wcast-align warning.
2003-06-29Back out the lwp/ktrace changes. They contained a lot of colateral damage,fvdl
and need to be examined and discussed more.
2003-06-29#ifdef _KERNEL_OPT policemartin
2003-06-28#ifdef _KERNEL_OPT police.he
2003-06-23Make sure to include opt_foo.h if a defflag option FOO is used.martin
2003-06-15Handle 64bit DMA addresses on PCI for platforms that can (currently onlyfvdl
enabled on amd64). Add a dmat64 field to various PCI attach structures, and pass it down where needed. Implement a simple new function called pci_dma64_available(pa) to test if 64bit DMA addresses may be used. This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>, and there is more than 4G of memory.
2003-05-12Rename <sys/float_ieee.h> to <sys/float_ieee754.h>, following libc'skleink
convention for these.
2003-05-09A few ISA sound drivers like to share dma channels, and hence deferredfvdl
isa_dmamap_create() calls to their open/close entrypoints. This worked with some luck, but broke on i386 when _bus_dmamap_create started to allocate bounce buffers upfront, since memory below 16M may well not be available when the sound devices is opened for the Nth time. To fix this, create a new simple interface, isa_drq_alloc/isa_drq_free, wrappers around already existing bitmask macros. These are expected to be used before an isa_dmamap_create call, and after an isa_dmamap_destroy call, respectively. For the sb and ad1848 drivers, they're deferred until open/close. All isa_dmamap_create calls can now use BUS_DMA_ALLOCNOW and be done at attach time.
2003-04-29Add a BKPT_ADDR() macro which gives MD code a chance to munge ascw
breakpoint address before it's used. Currently a no-op on all but sh5. This is useful on sh5, for example, to mask off the instruction type encoding in the bottom two address bits, and makes it possible to do "db> break $rXX" instead of manually munging the address.
2003-04-28Add a new feature-test macro, _NETBSD_SOURCE. If this is definedbjh21
by the application, all NetBSD interfaces are made visible, even if some other feature-test macro (like _POSIX_C_SOURCE) is defined. <sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE, _POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve existing behaviour. This has two major advantages: + Programs that require non-POSIX facilities but define _POSIX_C_SOURCE can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS. + It makes most of the #ifs simpler, in that they're all now ORs of the various macros, rather than having checks for (!defined(_ANSI_SOURCE) || !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place. I've tried not to change the semantics of the headers in any case where _NETBSD_SOURCE wasn't defined, but there were some places where the current semantics were clearly mad, and retaining them was harder than correcting them. In particular, I've mostly normalised things so that _ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE, _XOPEN_SOURCE and _NETBSD_SOURCE in that order. Tested by building for vax, encouraged by thorpej, and uncontested in tech-userlevel for a week.
2003-04-19PR/3012: Greg A. Woods: Write all float.h files [except the vax of course]christos
in terms of float_ieee.h
2003-04-09POOL_VTOPHYS: Cast argument to ALPHA_K0SEG_TO_PHYS() to vaddr_t tonathanw
prevent gcc complaining about bitwise operations on pointers.
2003-04-09Add the ability for pool caches to cache the physical address ofthorpej
objects. Clients of the pool_cache API must consistently use the "paddr" variants or not, otherwise behavior is undefined. Enable this on Alpha, ARM, MIPS, and x86. Other platforms must define POOL_VTOPHYS() in the appropriate manner in order to enable the feature. Part 1 of a series of simple patches contributed by Wasabi Systems to improve network performance.
2003-04-08Make PAGE_SIZE, PAGE_SHIFT, and PAGE_MASK compile time constants; we onlythorpej
support 8K page models at the moment anyway.
2003-03-22Fix a grammatical nit.simonb
2003-03-02add some ISO C 1995 I18N functions and types:tshiozak
btowc, wctrans, towctrans, wcscoll, wcsxfrm, wctype_t and wctrans_t.
2003-02-05Replace machine/rnd.h with more appropriate name to share itnakayama
with cycle counter based microtime in kern/kern_microtime.c.
2003-02-05Share alpha/microtime.c with i386 and sparc64 as kern_microtime.c.nakayama
(approved by martin)
2003-01-28Introduce BUS_DMA_NOCACHE, and bus_dmamem_map() of i386 supports it.kent
2003-01-17Merge the nathanw_sa branch.thorpej
2003-01-08Use the MI setrunqueue()/remrunqueue().thorpej
2002-12-10Rename __LDPGSZ to AOUT_LDPGSZ, to accurately reflect what it is.thorpej
2002-12-10Use __LDPGSZ (which must be == USRTEXT) as the text address for a.outthorpej
executables, and eliminate the USRTEXT constant, which was only used by the a.out exec code.
2002-11-30Add multiple-inclusion protection.simonb
2002-11-26Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more.lukem
2002-10-14eliminate PT_ENTRY_NULL in favor of plain old NULL.chs
2002-09-29"definitions" has lots of 'i's, but that's not reason to leave one out.wiz
2002-09-24Remove the TCWSCONS config now that zstty can do flow control on IOASICad
machines.
2002-09-22Use "#define\t" instead of "#define ".simonb
2002-09-22it really helps to get the stub right before cutting + pasting it 27 times.chs
alas, I did not. doh.
2002-09-22add pmap_remove_all() hook (empty on most platforms so far).chs
2002-09-22Add __HAVE_MD_RUNQUEUE flag for MD code to override MI run queue primitives.gmcgarry
2002-09-18Add support for restartable atomic sequences. Rearragne the tailthorpej
of cpu_switch() slightly so we can reenable interrupts a little earlier.
2002-09-06Merge the gehenna-devsw branch into the trunk.gehenna
This merge changes the device switch tables from static array to dynamically generated by config(8). - All device switches is defined as a constant structure in device drivers. - The new grammer ``device-major'' is introduced to ``files''. device-major <prefix> char <num> [block <num>] [<rules>] - All device major numbers must be listed up in port dependent majors.<arch> by using this grammer. - Added the new naming convention. The name of the device switch must be <prefix>_[bc]devsw for auto-generation of device switch tables. - The backward compatibility of loading block/character device switch by LKM framework is broken. This is necessary to convert from block/character device major to device name in runtime and vice versa. - The restriction to assign device major by LKM is completely removed. We don't need to reserve LKM entries for dynamic loading of device switch. - In compile time, device major numbers list is packed into the kernel and the LKM framework will refer it to assign device major number dynamically.
2002-08-07Implement pmc(9) -- An interface to hardware performance monitoringbriggs
counters. These counters do not exist on all CPUs, but where they do exist, can be used for counting events such as dcache misses that would otherwise be difficult or impossible to instrument by code inspection or hardware simulation. pmc(9) is meant to be a general interface. Initially, the Intel XScale counters are the only ones supported.
2002-07-25Use "#define<tab>".simonb