aboutsummaryrefslogtreecommitdiff
path: root/sys/arm
Commit message (Collapse)AuthorAgeFilesLines
* Donc recompute the io port address if it's already the good one.Olivier Houchard2006-01-231-3/+5
| | | | Notes: svn path=/head/; revision=154712
* Build a minimal pagetables, with only section mappings, mapped write through,Olivier Houchard2006-01-201-5/+52
| | | | | | | to speed up the decompression. Notes: svn path=/head/; revision=154561
* By popular demand, move __HAVE_ACPI and __PCI_REROUTE_INTERRUPT intoWarner Losh2006-01-092-2/+2
| | | | | | | | | | | param.h. Per request, I've placed these just after the _NO_NAMESPACE_POLLUTION ifndef. I've not renamed anything yet, but may since we don't need the __. Submitted by: bde, jhb, scottl, many others. Notes: svn path=/head/; revision=154128
* Fix various places that were testing td_critnest to see if interruptsJohn Baldwin2006-01-061-3/+4
| | | | | | | | should remain disabled during a trap or not to check td_md.md_spinlock_count instead. Notes: svn path=/head/; revision=154074
* Define __HAVE_ACPI and/or __PCI_REROUTE_INTERRUPT, as appropriate forWarner Losh2006-01-011-0/+2
| | | | | | | | each platform. These will be used in the pci code in preference to the complicated #ifdefs we have there now. Notes: svn path=/head/; revision=153955
* MI changes:Alexander Leidinger2005-12-311-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - provide an interface (macros) to the page coloring part of the VM system, this allows to try different coloring algorithms without the need to touch every file [1] - make the page queue tuning values readable: sysctl vm.stats.pagequeue - autotuning of the page coloring values based upon the cache size instead of options in the kernel config (disabling of the page coloring as a kernel option is still possible) MD changes: - detection of the cache size: only IA32 and AMD64 (untested) contains cache size detection code, every other arch just comes with a dummy function (this results in the use of default values like it was the case without the autotuning of the page coloring) - print some more info on Intel CPU's (like we do on AMD and Transmeta CPU's) Note to AMD owners (IA32 and AMD64): please run "sysctl vm.stats.pagequeue" and report if the cache* values are zero (= bug in the cache detection code) or not. Based upon work by: Chad David <davidc@acns.ab.ca> [1] Reviewed by: alc, arch (in 2004) Discussed with: alc, Chad David, arch (in 2004) Notes: svn path=/head/; revision=153940
* Remove kern.elf32.can_exec_dyn sysctl. Instead extend Brandinfo structureMaxim Sobolev2005-12-261-0/+2
| | | | | | | | | | | | | with flags bitfield and set BI_CAN_EXEC_DYN flag for all brands that usually allow executing elf dynamic binaries (aka shared libraries). When it is requested to execute ET_DYN elf image check if this flag is on after we know the elf brand allowing execution if so. PR: kern/87615 Submitted by: Marcin Koziej <creep@desk.pl> Notes: svn path=/head/; revision=153741
* Tweak how the MD code calls the fooclock() methods some. Instead ofJohn Baldwin2005-12-225-33/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | passing a pointer to an opaque clockframe structure and requiring the MD code to supply CLKF_FOO() macros to extract needed values out of the opaque structure, just pass the needed values directly. In practice this means passing the pair (usermode, pc) to hardclock() and profclock() and passing the boolean (usermode) to hardclock_cpu() and hardclock_process(). Other details: - Axe clockframe and CLKF_FOO() macros on all architectures. Basically, all the archs were taking a trapframe and converting it into a clockframe one way or another. Now they can just extract the PC and usermode values directly out of the trapframe and pass it to fooclock(). - Renamed hardclock_process() to hardclock_cpu() as the latter is more accurate. - On Alpha, we now run profclock() at hz (profhz == hz) rather than at the slower stathz. - On Alpha, for the TurboLaser machines that don't have an 8254 timecounter, call hardclock() directly. This removes an extra conditional check from every clock interrupt on Alpha on the BSP. There is probably room for even further pruning here by changing Alpha to use the simplified timecounter we use on x86 with the lapic timer since we don't get interrupts from the 8254 on Alpha anyway. - On x86, clkintr() shouldn't ever be called now unless using_lapic_timer is false, so add a KASSERT() to that affect and remove a condition to slightly optimize the non-lapic case. - Change prototypeof arm_handler_execute() so that it's first arg is a trapframe pointer rather than a void pointer for clarity. - Use KCOUNT macro in profclock() to lookup the kernel profiling bucket. Tested on: alpha, amd64, arm, i386, ia64, sparc64 Reviewed by: bde (mostly) Notes: svn path=/head/; revision=153666
* Ooops, I removed the wrong bits.Olivier Houchard2005-12-211-2/+3
| | | | | | | This unbreak boot from a VA which is different from the PA. Notes: svn path=/head/; revision=153616
* Remove #undef DDB I shouldn't have committed.Olivier Houchard2005-12-211-1/+0
| | | | Notes: svn path=/head/; revision=153615
* - Disable the instruction cache very early, until it's time to enable it again.Olivier Houchard2005-12-201-23/+14
| | | | | | | - Revamp the code that jumps from physical to virtual address. Notes: svn path=/head/; revision=153550
* Make the elf trampoline disable the MMU, and link it at physical address,Olivier Houchard2005-12-201-4/+36
| | | | | | | to avoid bad surprises. Notes: svn path=/head/; revision=153549
* - Better use of the busdma API.Olivier Houchard2005-12-092-47/+69
| | | | | | | - Use spin locks instead of sleep locks. Notes: svn path=/head/; revision=153279
* Fix a harmless bug in the way we allocate the early PTEs.Olivier Houchard2005-12-091-3/+2
| | | | Notes: svn path=/head/; revision=153278
* The IQ80321 clock is 200MHz, but the IQ80321 is 198MHz, so add a kernel optionOlivier Houchard2005-12-092-0/+6
| | | | | | | to override the frequency Notes: svn path=/head/; revision=153277
* A #define is not enough, we need to cast from u_long * to uint32_t *.Olivier Houchard2005-12-091-1/+8
| | | | Notes: svn path=/head/; revision=153276
* Define atomic_whatever_longOlivier Houchard2005-12-091-0/+4
| | | | Notes: svn path=/head/; revision=153275
* In copyout(), quad-align the source buffer, and use ldrd if possible.Olivier Houchard2005-12-091-54/+33
| | | | Notes: svn path=/head/; revision=153273
* Drop _MACHINE_ARCH and _MACHINE defines (not to be confused withRuslan Ermilov2005-12-061-6/+0
| | | | | | | | | | MACHINE_ARCH and MACHINE). Their purpose was to be able to test in cpp(1), but cpp(1) only understands integer type expressions. Using such unsupported expressions introduced a number of subtle bugs, which were discovered by compiling with -Wundef. Notes: svn path=/head/; revision=153168
* Try to use contigmalloc() even if M_NOWAIT has been specified.Olivier Houchard2005-12-051-13/+17
| | | | Notes: svn path=/head/; revision=153113
* Teach the elf trampoline how to deal with gzipped kernels.Olivier Houchard2005-12-052-51/+175
| | | | Notes: svn path=/head/; revision=153112
* Add missing "struct" in i386/i386/machdep.c,v 1.497 by deischen@.Ruslan Ermilov2005-11-241-1/+1
| | | | Notes: svn path=/head/; revision=152753
* Use a magic number to know we were started from the elf wrapper.Olivier Houchard2005-11-243-9/+24
| | | | | | | Add a dummy _start function to make the non-elf version of the wrapper work. Notes: svn path=/head/; revision=152743
* MFP4: Bring in arm9 cache-related functionsOlivier Houchard2005-11-231-50/+169
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=152723
* Force pmap to write-back the pte cacheline after each pte modification,Olivier Houchard2005-11-211-0/+5
| | | | | | | | even if the pte is supposed to be cached in write through mode (might be a skyeye bug, I'll have to check). Notes: svn path=/head/; revision=152654
* Add an alternate ID for the arm920t (the real solution is to haveOlivier Houchard2005-11-212-0/+3
| | | | | | | per-cpu class masks, but oh well). Notes: svn path=/head/; revision=152653
* Eliminate pmap_init2(). It's no longer used.Alan Cox2005-11-201-5/+0
| | | | Notes: svn path=/head/; revision=152630
* There's no need to include <machine/asmacros.h> here.Olivier Houchard2005-11-081-1/+0
| | | | Notes: svn path=/head/; revision=152189
* MFi386 rev 1.536 (sort of)Olivier Houchard2005-11-063-30/+24
| | | | | | | | | | | Move what can be moved (UMA zones creation, pv_entry_* initialization) from pmap_init2() to pmap_init(). Create a new function, pmap_postinit(), called from cpu_startup(), to do the L1 tables allocation. pmap_init2() is now empty for arm as well. Notes: svn path=/head/; revision=152128
* Normalize a significant number of kernel malloc type names:Robert Watson2005-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | - Prefer '_' to ' ', as it results in more easily parsed results in memory monitoring tools such as vmstat. - Remove punctuation that is incompatible with using memory type names as file names, such as '/' characters. - Disambiguate some collisions by adding subsystem prefixes to some memory types. - Generally prefer lower case to upper case. - If the same type is defined in multiple architecture directories, attempt to use the same name in additional cases. Not all instances were caught in this change, so more work is required to finish this conversion. Similar changes are required for UMA zone names. Notes: svn path=/head/; revision=151897
* Reorganize the interrupt handling code a bit to make a few things cleanerJohn Baldwin2005-10-251-22/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and increase flexibility to allow various different approaches to be tried in the future. - Split struct ithd up into two pieces. struct intr_event holds the list of interrupt handlers associated with interrupt sources. struct intr_thread contains the data relative to an interrupt thread. Currently we still provide a 1:1 relationship of events to threads with the exception that events only have an associated thread if there is at least one threaded interrupt handler attached to the event. This means that on x86 we no longer have 4 bazillion interrupt threads with no handlers. It also means that interrupt events with only INTR_FAST handlers no longer have an associated thread either. - Renamed struct intrhand to struct intr_handler to follow the struct intr_foo naming convention. This did require renaming the powerpc MD struct intr_handler to struct ppc_intr_handler. - INTR_FAST no longer implies INTR_EXCL on all architectures except for powerpc. This means that multiple INTR_FAST handlers can attach to the same interrupt and that INTR_FAST and non-INTR_FAST handlers can attach to the same interrupt. Sharing INTR_FAST handlers may not always be desirable, but having sio(4) and uhci(4) fight over an IRQ isn't fun either. Drivers can always still use INTR_EXCL to ask for an interrupt exclusively. The way this sharing works is that when an interrupt comes in, all the INTR_FAST handlers are executed first, and if any threaded handlers exist, the interrupt thread is scheduled afterwards. This type of layout also makes it possible to investigate using interrupt filters ala OS X where the filter determines whether or not its companion threaded handler should run. - Aside from the INTR_FAST changes above, the impact on MD interrupt code is mostly just 's/ithread/intr_event/'. - A new MI ddb command 'show intrs' walks the list of interrupt events dumping their state. It also has a '/v' verbose switch which dumps info about all of the handlers attached to each event. - We currently don't destroy an interrupt thread when the last threaded handler is removed because it would suck for things like ppbus(8)'s braindead behavior. The code is present, though, it is just under #if 0 for now. - Move the code to actually execute the threaded handlers for an interrrupt event into a separate function so that ithread_loop() becomes more readable. Previously this code was all in the middle of ithread_loop() and indented halfway across the screen. - Made struct intr_thread private to kern_intr.c and replaced td_ithd with a thread private flag TDP_ITHREAD. - In statclock, check curthread against idlethread directly rather than curthread's proc against idlethread's proc. (Not really related to intr changes) Tested on: alpha, amd64, i386, sparc64 Tested on: arm, ia64 (older version of patch by cognet and marcel) Notes: svn path=/head/; revision=151658
* Unbreak for !__XSCALE__.Olivier Houchard2005-10-233-0/+5
| | | | Notes: svn path=/head/; revision=151596
* Cleanup.Olivier Houchard2005-10-201-13/+1
| | | | Notes: svn path=/head/; revision=151524
* Use the clock count register as a timecounter, as it's more accurate.Olivier Houchard2005-10-171-16/+13
| | | | Notes: svn path=/head/; revision=151415
* Whitespace.John Baldwin2005-10-141-1/+1
| | | | Notes: svn path=/head/; revision=151340
* Change the userland atomic operations on arm to use memory operands forJohn Baldwin2005-10-141-16/+22
| | | | | | | | | | | | the modified memory rather than using register operands that held a pointer to the memory. The biggest effect is that we now correctly tell the compiler that these functions change the memory that these functions modify. Reviewed by: cognet Notes: svn path=/head/; revision=151334
* 1. Change prototype of trapsignal and sendsig to use ksiginfo_t *, mostDavid Xu2005-10-143-22/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | changes in MD code are trivial, before this change, trapsignal and sendsig use discrete parameters, now they uses member fields of ksiginfo_t structure. For sendsig, this change allows us to pass POSIX realtime signal value to user code. 2. Remove cpu_thread_siginfo, it is no longer needed because we now always generate ksiginfo_t data and feed it to libpthread. 3. Add p_sigqueue to proc structure to hold shared signals which were blocked by all threads in the proc. 4. Add td_sigqueue to thread structure to hold all signals delivered to thread. 5. i386 and amd64 now return POSIX standard si_code, other arches will be fixed. 6. In this sigqueue implementation, pending signal set is kept as before, an extra siginfo list holds additional siginfo_t data for signals. kernel code uses psignal() still behavior as before, it won't be failed even under memory pressure, only exception is when deleting a signal, we should call sigqueue_delete to remove signal from sigqueue but not SIGDELSET. Current there is no kernel code will deliver a signal with additional data, so kernel should be as stable as before, a ksiginfo can carry more information, for example, allow signal to be delivered but throw away siginfo data if memory is not enough. SIGKILL and SIGSTOP have fast path in sigqueue_add, because they can not be caught or masked. The sigqueue() syscall allows user code to queue a signal to target process, if resource is unavailable, EAGAIN will be returned as specification said. Just before thread exits, signal queue memory will be freed by sigqueue_flush. Current, all signals are allowed to be queued, not only realtime signals. Earlier patch reviewed by: jhb, deischen Tested on: i386, amd64 Notes: svn path=/head/; revision=151316
* Export PAGE_SIZE from genassym.c, and include assym.s in bcopy_page.S,Olivier Houchard2005-10-062-1/+5
| | | | | | | instead of <machine/param.h>. Notes: svn path=/head/; revision=150996
* Remove a never reached RET.Olivier Houchard2005-10-041-1/+0
| | | | Notes: svn path=/head/; revision=150944
* strd needs the destination to be double-word aligned, but the pointer passedOlivier Houchard2005-10-041-6/+0
| | | | | | | | to savectx isn't always, so always use stmia, savectx isn't called enough to need that kind of optimization. Notes: svn path=/head/; revision=150943
* dump_avail has nothing to do with ARM_USE_SMALL_ALLOC, so move itsOlivier Houchard2005-10-041-1/+1
| | | | | | | declaration out of the #ifdef. Notes: svn path=/head/; revision=150936
* Remove duplicate entry for DDB.Olivier Houchard2005-10-042-2/+0
| | | | Notes: svn path=/head/; revision=150919
* Fix build when DDB isn't defined.Olivier Houchard2005-10-041-0/+2
| | | | Notes: svn path=/head/; revision=150916
* Bring in the good version of this file.Olivier Houchard2005-10-031-44/+2
| | | | Notes: svn path=/head/; revision=150893
* Add dma and aau.Olivier Houchard2005-10-031-0/+2
| | | | Notes: svn path=/head/; revision=150873
* Import dummy drivers for the i80321 DMA controller and AAU.Olivier Houchard2005-10-035-2/+628
| | | | | | | | | The DMA controller driver only knows how to do memory to memory copies, and the AAU driver how to zero a chunk of memory. Use them to process big (>=1KB) copying/zeroing. Notes: svn path=/head/; revision=150872
* Make mem.c know about the pages allocated with ARM_USE_SMALL_ALLOC.Olivier Houchard2005-10-031-2/+12
| | | | Notes: svn path=/head/; revision=150871
* Export the variables needed for the copy/zero API.Olivier Houchard2005-10-031-0/+5
| | | | Notes: svn path=/head/; revision=150870
* Make sure the interrupt is masked before processing it, or bad thingsOlivier Houchard2005-10-031-3/+3
| | | | | | | can happen. Notes: svn path=/head/; revision=150869
* If a thread already tries to allocate a new memory range, wait for itOlivier Houchard2005-10-031-7/+22
| | | | | | | instead of trying to do the same. Notes: svn path=/head/; revision=150868