summaryrefslogtreecommitdiff
path: root/sys/arch/arm/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-15The last cpsr_all change was misguided. Just use cpsr_c wherever possible.scw
2003-12-01 - For consistency, use cpsr_all instead of cpsr.scw
- Make sure IRQs are enabled before handling ASTs.
2003-11-26fix typo pointed out by Olivier Houchard. thanks.bsh
2003-11-25bye, bye _MCONTEXT_TO_SIGCONTEXT and vice versa.christos
2003-11-14Slight re-org of the alignment/ast exit macro to better mimic thescw
original behaviour WRT cpsr/I32_bit handling.
2003-11-11The previous commit had a #endif in the wrong place.scw
2003-11-09Pick the right value for {,_}MACHINE_ARCH according to endianness.scw
Spotted by mrg@.
2003-11-09Use #if defined(_KERNEL_OPT) to protect #include "opt_xxx.h"tsutsui
from building LKM etc. Suggested by mrg.
2003-10-31Overhaul arm32's abort handlers:scw
- Assume a permission fault is always the result of an attempted write, so no need to disassemble the opcode. (as discussed with Richard Earnshaw/Jason Thorpe a week or two ago) - Split out non-MMU data aborts into separate functions, and deal correctly with XScale imprecise aborts. Specifically, the old code made no attempt to handle the double abort faults which can occur as a result of two consecutive external (imprecise) aborts. This was easy to provoke by read(2)ing from a /dev/mem offset which caused an external abort. With the old code, this would bring the system down instantly, with little clue as to why. (hint: tf_spsr held PSR_ABT32_MODE...) - Re-write badaddr_read() to use pcb_onfault instead of adding extra overhead to data_abort_handler(). A side effect of this is that it now benefits from the XScale double abort recovery. - Invoke the cpu-specific prefetch/data abort fixup routines only if the host cpu actually needs it. On other cpus, the code is optimised away. - Sprinkle __predict_{false,true} in all the right places. - G/C some excess debugging baggage.
2003-10-30Move the alignment fault enable/disable code into macroes to avoidscw
needless duplication. Additionally, merge AST handling into the same code. exception.S and the generic irq_dispatch.S routines have been updated to use the macroes. XXX: I have patches for the non-generic IRQ dispatch routines, but they need testing by someone with hardware.
2003-10-28Retire FPA support from this file at last; suggested by Richard Earnshawkleink
and not objected to by port-arm.
2003-10-27For convenient use in libc, add unions of the C floating types and theirkleink
corresponding structure definitions.
2003-10-26Remove the FPA extended-precision format entirely; according to Richardkleink
Earnshaw it was never supported by the toolchain.
2003-10-25Enable alignment faults on arm32 for both kernel and userland.scw
If COMPAT_15 and EXEC_AOUT are defined, support per-process alignment checking where AFLTs are always enabled when running kernel code and userland ELF binaries, and dynamically disabled/ enabled when switching to/from a.out binaries. This is necessary in order to execute older a.out binaries, where gcc made deliberate use of misaligned loads under certain circumstances.
2003-10-25Update for FPA long double being 80-bit extended-precision format.kleink
2003-10-25G/c the 128-bit extended-precision format, which is not applicable tokleink
this platform. Name the 80-bit version the extended format, which it is for the FPA case according to the ARM7500FE manual.
2003-10-23* Move the definitions for types other than single-precision and double-kleink
precision back to machine-dependent headers. C99 has no strict requirement which, if any, extended-precision type `long double' must match, and even between 80-bit formats there are differences in implementation (m68k vs. x86). * On arm, consider __VFP_FP__.
2003-10-23Add a defflag for __BUS_SPACE_HAS_STREAM_METHODS, and add thescw
appropriate glue in bus.h, contingent on the option being defined. This allows stream methods to be available on a port-by-port basis.
2003-10-23Don't drop to spl0 in cpu_switch/cpu_switchto. Do it in the idle loopscw
instead. With this change, we no longer need to save the current interrupt level in the switchframe. This is no great loss since both cpu_switch and cpu_switchto are always called at splsched, so the process' spl is effectively saved somewhere in the callstack. This fixes an evbarm problem reported by Allen Briggs: lwp gets into sa_switch -> mi_switch with newl != NULL when it's the last element on the runqueue, so it hits the second bit of: if (newl == NULL) { retval = cpu_switch(l, NULL); } else { remrunqueue(newl); cpu_switchto(l, newl); retval = 0; } mi_switch calls remrunqueue() and cpu_switchto() cpu_switchto unlocks the sched lock cpu_switchto drops CPU priority softclock is received schedcpu is called from softclock schedcpu hits the first if () {} block here: if (l->l_priority >= PUSER) { if (l->l_stat == LSRUN && (l->l_flag & L_INMEM) && (l->l_priority / PPQ) != (l->l_usrpri / PPQ)) { remrunqueue(l); l->l_priority = l->l_usrpri; setrunqueue(l); } else l->l_priority = l->l_usrpri; } Since mi_switch has already run remrunqueue, the LWP has been removed, but it's not been put back on any queue, so the remrunqueue panics.
2003-10-18Define SIGTRAMP_VALID(v).briggs
2003-10-13Document the need for pcb32_r8 to be quad-aligned, now that cpuswitch()scw
uses Xscale's "strd" instruction.
2003-10-13On Xscale, define PMAP_UAREA() and use it to tweak uarea mappings soscw
they use the mini D$. This results in a small performance boost on xscale platforms, since flushing the main cache on a context switch won't affect the kernel stack/pcb.
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-08Overhaul MBR handling (part 1):lukem
<sys/bootblock.h>: * Added definitions for the Master Boot Record (MBR) used by a variety of systems (primarily i386), including the format of the BIOS Parameter Block (BPB). This information was cribbed from a variety of sources including <sys/disklabel_mbr.h> which this is a superset of. As part of this, some data structure elements and #defines were renamed to be more "namespace friendly" and consistent with other bootblocks and MBR documentation. Update all uses of the old names to the new names. <sys/disklabel_mbr.h>: * Deprecated in favor of <sys/bootblock.h> (the latter is more "host tool" friendly). amd64 & i386: * Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to be consistent with the naming convention of the msdosfs tools. * Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1 and it's confusing to have two functionally equivalent bootblocks, especially given that "ufs" has multiple meanings (it could be a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems). * Rework pbr.S (the first sector of bootxx_*): + Ensure that BPB (bytes 11..89) and the partition table (bytes 446..509) do not contain code. + Add support for booting from FAT partitions if BOOT_FROM_FAT is defined. (Only set for bootxx_msdos). + Remove "dummy" partition 3; if people want to installboot(8) these to the start of the disk they can use fdisk(8) to create a real MBR partition table... + Compile with TERSE_ERROR so it fits because of the above. Whilst this is less user friendly, I feel it's important to have a valid partition table and BPB in the MBR/PBR. * Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent with other platforms. * Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that we can boot off FAT partitions. * Crank version of /usr/mdec/boot to 3.1, and fix some of the other entries in the version file. installboot(8) (i386): * Read the existing MBR of the filesystem and retain the BIOS Parameter Block (BPB) in bytes 11..89 and the MBR partition table in bytes 446..509. (Previously installboot(8) would trash those two sections of the MBR.) mbrlabel(8): * Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code to map the MBR partition type to the NetBSD disklabel type. Test built "make release" for i386, and new bootblocks verified to work (even off FAT!).
2003-10-05Add SA_SIGINFO support for ARM (from Chris Gilbert).matt
2003-09-29Define ELF32_MACHDEP_ENDIANNESS according to target byte order.scw
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-11__{BEGIN,END}_DECLS-wrap prototypes.kleink
2003-09-06Add support for ARM10 class processors.rearnsha
2003-09-06Add processor-specific declarations for ARM10 class processors.rearnsha
2003-09-06Fix declarations of primary cache variables, so that they arerearnsha
declarations, not definitions.
2003-09-06Add support for ARM10 class devices.rearnsha
2003-09-06Add arm1020E cpu idrearnsha
2003-09-03Recognize some TI processors -- not that you'd want to use them.mycroft
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-07-28Add an opaque cookie field to the bus dma tag.thorpej
2003-07-09Make faulting in DDB continue back in the top-level commandthorpej
loop properly.
2003-06-23Make sure to include opt_foo.h if a defflag option FOO is used.martin
2003-06-18protect with #ifndef _LOCORE so that assembler codes can sharebsh
definitions in this file such as PMAP_DOMAIN_KERNEL.
2003-06-16Rename IPL_IMP -> IPL_VM.thorpej
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-06-15Add another devmap routine that allows bootstrap code to registerthorpej
a devmap reflecting mappings that are created by really early bootstrap code before pmap_devmap_bootstrap() is called.
2003-06-15Replace the ad-hoc "section mapping table" for static device mappingsthorpej
with a more generic "devmap" structure that can also handle mappings made with large and small pages. Add new pmap routines to enter these mappings during bootstrap (and "remember" the devmap), and routines to look up the static mappings once the kernel is running.
2003-05-23support IXP425 Intel Network Processorichiro
running on BigEndian
2003-05-22Use virtual_avail and virtual_end to compute the size of the availablethorpej
kernel VM space for VM_MAX_KERNEL_BUF, and move the definition into generic ARM code.
2003-05-21Remove #ifdefs supporting the old pmap, switching fully to the new.thorpej
2003-05-21Use the GDB5 breakpoint value for the kernel breakpoint assembly statementbriggs
since this value will be properly recognized by gdb_trapper(). Pointed out by bsh. Thanks!
2003-05-13add CPU typesichiro
IXP425 xscale-core NetworkProcessor later, Ill commit codes for IXP425-evaluation board
2003-05-12Rename <sys/float_ieee.h> to <sys/float_ieee754.h>, following libc'skleink
convention for these.