summaryrefslogtreecommitdiffstats
path: root/sys/arm/xscale/i8134x
Commit message (Collapse)AuthorAgeFilesLines
* MFC r277454, r277460, r277465, r277466, r277467, r277469, r277470, r277471,ian2015-02-137-265/+26
| | | | | | | | | | | | | | | | | | | | | r277472, r277473, r277474, r277475, r277476, r277477, r277478, r277479, r277480, r277512, r277516: Add inline implementations of arm bus_space_read/write_N(). Revise the arm bus_space implementation to avoid dereferencing the tag on every operation to retrieve the bs_cookie value almost nothing actually uses. Use the explicit member initializer style to init the bus_space struct. Use arm/bus_space-v6.c for all armv6 systems Consolidate many identical implementations of bus_space to a single common tag and implementation shared by armv4 and armv6. Micro-optimize the new arm inline bus_space implementation by grouping all the data the inline functions access together at the start of the bus_space struct so that they all fit in a single cache line.
* MFC r271394, r271398:ian2015-02-121-1/+2
| | | | | | | Add more register values to armreg.h and remove CPU_CONTROL_32BP_ENABLE from asm.h as they were already defined in armreg.h. Unify interrupts bit definition and usage. While here remove PSR_C_bit.
* MFC 265852: Map device memory using PTE_DEVICE rather than PTE_NOCACHE.ian2014-05-181-3/+3
|
* MFC 262952, 262958, 262966, 262979, 262980, 262986, 262987, 262995, 262997,ian2014-05-172-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 263030, 263033, 263034, 263056, 263057, Remove all the redundant external declarations of exception vectors and runtime setting of the pointers that's scattered around various places. Remove all traces of support for ARM chips prior to the arm9 series. Make the default exception handler vectors point to where I thought they were already pointing: the default handlers (not a panic that says there is no default handler). Eliminate irq_dispatch.S. Move the data items it contained into arm/intr.c and the functionality it provided into arm/exception.S. Move the exception vector table (so-called "page0" data) into exception.S and eliminate vectors.S. Change the way the asm GET_CURTHREAD_PTR() macro is defined so that code using it doesn't have to have an "AST_LOCALS" macro somewhere in the file. Arrange for arm fork_trampoline() to return to userland via the standard swi_exit code in exception.S instead of having its own inline expansion of the DO_AST and PULLFRAME macros. Now that the PUSHFRAME and PULLFRAME macros are used only in the swi entry/exit code, they don't need to be macros. Except that didn't work and the whole change was reverted. Remove some unnecessary indirection and jump right to the handler functions. Use panic rather than printf to "handle" an arm26 address exception (should never happen on arm32). Remove the unreferenced DATA() macro. Remove #include <machine/asmacros.h> from files that don't need it.
* MFC r261643, r261646, r261648, r261649, r261651, r261656, r261657, r261663,ian2014-05-151-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r261676, r261677, r261698, r261778 Consolidate code related to setting up physical memory configuration into a new physmem.c file. Replace compile-time constant KERNPHYSADDR with abp_physaddr Calculate the kernel's load address from the PC in the elf / gzip trampoline instead of relying on KERNPHYSADDR as a compile-time constant. It turns out a global variable is the only straightforward way to communicate the kernel's physical load address from where it's known in initarm() into cpu_mp_start() which is called from non-arm code and takes no parameters. Remove the now unused MMU_INIT macro. Use vm_paddr_t, not vm_offset_t, when dealing with physical addresses. No need to set physmem in each initarm() instance anymore, it's handled in common code now. Pass the pagetable used from locore.S to initarm to allow it to map data in as required. Fix the physmem exclude-region clipping logic for the edge-trim case. Add some extra debugging output when DEBUG is defined. Update legacy platforms to use new arm_physmem helper routines.
* MFC r257549, r261642ian2014-05-151-36/+1
| | | | | | | | | Don't create a distinct free page pool for segregating allocations that are accessed through the direct map unless the kernel configuration actually includes a direct map. Only a few configurations do, and for the rest the unnecessary free page pool is a small pessimization. Remove the ARM_USE_SMALL_ALLOC option and code related to it.
* MFC r258779,r258780,r258787,r258822:eadler2014-02-041-5/+5
| | | | | | | | | | | | | Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this shifts into the sign bit. Instead use (1U << 31) which gets the expected result. Similar to the (1 << 31) case it is not defined to do (2 << 30). This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases. A similar change was made in OpenBSD.
* MFC r258392, r258412:ian2013-12-141-0/+2
| | | | | | | | | | | | Call cpu_setup() immediately after the page tables are installed. This enables data cache and other chip-specific features. It was previously done via an early SYSINIT, but it was being done after pmap and vm setup, and those setups need to use mutexes. On some modern ARM platforms, the ldrex/strex instructions that implement mutexes require the data cache to be enabled. Call cpu_setup() from the initarm() routine on platforms that don't use the common FDT-aware initarm() in arm/machdep.c.
* MFC r257648, r257649, r257660:ian2013-12-131-2/+3
| | | | | | | | | | | | | | | | | Begin reducing code duplication in arm pmap.c and pmap-v6.c by factoring out common code related to mapping device memory into a new devmap.c file. Remove the growing duplication of code that used pmap_devmap_find_pa() and then did some math with the returned results to generate a virtual address, and likewise in reverse to get a physical address. Now there are a pair of functions, arm_devmap_vtop() and arm_devmap_ptov(), to do that. The bus_space_map() implementations are rewritten in terms of these. Move remaining code and data related to static device mapping into the new devmap.[ch] files. Emphasize the MD nature of these things by using the prefix arm_devmap_ on the function and type names (already a few of these things found their way into MI code, hopefully it will be harder to do by accident in the future).
* MFC r257199, r257200, r257217:ian2013-12-131-1/+0
| | | | | | | | | | | | | | | Remove all #include <machine/pmap.h> from arm code. It's already included by vm/pmap.h, which is a prerequisite for arm/machine/pmap.h so there's no reason to ever include it directly. Remove #include <machine/frame.h> from all the arm code that doesn't really need it. That would be almost everywhere it was included. Add it in a couple files that really do need it and were previously getting it by accident via another header. Remove the last dregs of trapframe_t. It turns out only arm was using this type, so remove it to make arm code more consistant with other platforms.
* Replace kernel virtual address space allocation with vmem. This providesjeff2013-08-071-1/+1
| | | | | | | | | | | | | transparent layering and better fragmentation. - Normalize functions that allocate memory to use kmem_* - Those that allocate address space are named kva_* - Those that operate on maps are named kmap_* - Implement recursive allocation handling for kmem_arena in vmem. Reviewed by: alc Tested by: pho Sponsored by: EMC / Isilon Storage Division
* Eliminate a redundant #include: machine/pmap.h is already includedalc2013-03-011-1/+0
| | | | through vm/pmap.h.
* Complete r247297:attilio2013-02-281-2/+0
| | | | | | Remove unused inclusions of vm/vm_pager.h and vm/vnode_pager.h. Sponsored by: EMC / Isilon storage division
* Initialize vm_max_kernel_address on non-FDT platforms. (This should havealc2013-02-201-2/+2
| | | | | | | | been included in r246926.) The second parameter to pmap_bootstrap() is redundant. Eliminate it. Reviewed by: andrew
* Create a common set_stackptrs in sys/arm/machdep.c.andrew2012-09-221-14/+1
| | | | | | | On single core devices set_stackptrs is only ever called with cpu = 0 in initarm and will be identical to the existing function. On SMP this needs to be implemented for sys/arm/mp_machdep.c, but the implementations are identical for each SoC.
* Set machine correctly on ARM. This allows universe to use the correct worldandrew2012-08-181-1/+1
| | | | | | when building each kernel. Reviewed by: imp
* Merging projects/armv6, part 1gonzo2012-08-151-3/+0
| | | | | | | | | Cummulative patch of changes that are not vendor-specific: - ARMv6 and ARMv7 architecture support - ARM SMP support - VFP/Neon support - ARM Generic Interrupt Controller driver - Simplification of startup code for all platforms
* Move unmask IRQ function call up to nexus device level.gonzo2012-07-171-1/+0
| | | | | | | | | | FDT-enabled targets were broken after r238043 that relies on device up the hierarchy to properly setup interrupt. nexus device for ARM platforms did job only partially: setting handler but not unmasking interrupt. Unmasking was performed by platform code. Reviewed by: andrew@
* Remove some unused variables/externs that have been copied too many times...imp2012-07-101-2/+0
|
* Modify all the arm platform files to call parse_boot_param passing inimp2012-06-141-1/+1
| | | | | | | | | | | | | the boot parameters from initarm first thing. parse_boot_param parses the boot arguments and converts them to the /boot/loader metadata the rest of the kernel uses. parse_boot_param is a weak alias to fake_preload_metadata, which all the platforms use now, but may become more extensive in the future. Since it is a weak symbol, specific boards may define their own parse_boot_param to interface to custom boot loaders. Reviewed by: cognet@, Ian Lapore
* Remove leakage of other patches into last commit.imp2012-06-131-1/+1
|
* trim trailing spaces that have accumulated over the years (these filesimp2012-06-139-26/+26
| | | | served as the basis for too many other platforms).
* Pull out the common code to initialise proc0 & thread0 from initarm to aandrew2012-06-101-9/+1
| | | | | | common function. Reviewed by: imp
* Minor rearrangement of the locore <-> initarm interface. Pass in aimp2012-06-031-1/+1
| | | | | | structure with the first 4 registers to allow a wider range of boot loaders to work. Future commits will make use of this to centralize support for the different loaders.
* Make sure we do not provide the page 0 to the VM. It can't handle it properly,cognet2012-02-291-2/+2
| | | | | | | because pmap_extract() returns 0 when there's no mapping. PR: arm/154227 MFC after: 1 week
* - There's no need to overwrite the default device method with the defaultmarius2011-11-221-2/+1
| | | | | | | | | | one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID.
* Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.ed2011-11-071-1/+1
| | | | | | The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static.
* Check the return value of BUS_SETUP_INTR()kevlo2011-10-271-3/+5
| | | | Reviewed by: imp
* Call init_param1() much earlier, so that msgbufsize is non-zero when we wantpluknet2011-04-191-2/+3
| | | | | | | to map and use the msgbuf. Reviewed by: cognet MFC after: 1 week
* Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize.pluknet2011-01-211-4/+2
| | | | | | | Submitted by: perryh pluto.rain.com (previous version) Reviewed by: jhb Approved by: kib (mentor) Tested by: universe
* Implement a facility for dynamic per-cpu variables.jeff2009-06-231-0/+5
| | | | | | | | | | | | | | | - Modules and kernel code alike may use DPCPU_DEFINE(), DPCPU_GET(), DPCPU_SET(), etc. akin to the statically defined PCPU_*. Requires only one extra instruction more than PCPU_* and is virtually the same as __thread for builtin and much faster for shared objects. DPCPU variables can be initialized when defined. - Modules are supported by relocating the module's per-cpu linker set over space reserved in the kernel. Modules may fail to load if there is insufficient space available. - Track space available for modules with a one-off extent allocator. Free may block for memory to allocate space for an extent. Reviewed by: jhb, rwatson, kan, sam, grehan, marius, marcel, stas
* Pass the previously returned IRQ back to arm_get_next_irq() so thatmarcel2009-06-091-1/+1
| | | | | | | | | the implementation can guarantee forward progress in the event of a stuck interrupt or interrupt storm. This is especially critical for fast interrupt handlers, as they can cause a hard hang in that case. When first called, arm_get_next_irq() is passed -1. Obtained from: Juniper Networks, Inc.
* Remove a duplicate #include.cognet2009-01-161-1/+0
|
* - Fix spelling error in comments.stas2008-12-011-1/+1
| | | | | | PR: arm/128891 Submitted by: Pavel Pankov <pankov_p@mail.ru> Approved by: kib (mentor)
* Eliminate unused global variables. (These global variables became fields ofalc2008-07-181-1/+0
| | | | struct kva_md_info many years ago.)
* Fix a typo: i80321_pci_probe -> i81342_pci_probekevlo2008-06-121-1/+1
|
* Remove sa1_cache_clean_addrkevlo2008-06-091-2/+0
|
* Remove some long-dead codekevlo2008-04-081-4/+0
| | | | Reviewed by: cognet
* Add bus_space_generic.c for the i81342 as well.cognet2008-04-051-0/+1
|
* Refactor certain ARM bus space methods: instead of having multiple copies ofraj2008-04-031-103/+6
| | | | | | | | the same code introduce sys/arm/arm/bus_space_generic.c for a shared set of routines. Reviewed by: sam Approved by: cognet (mentor)
* Take the first baby step towards unifying and cleaning up arminit():imp2008-04-031-54/+2
| | | | | | | | - Pull all the code to deal with the trampoline stuff into one centeralized place and use it from everywhere. - Some minor style tidiness Reviewed by: tinguely
* Remove kernel support for M:N threading.jeff2008-03-121-4/+0
| | | | | | | | While the KSE project was quite successful in bringing threading to FreeBSD, the M:N approach taken by the kse library was never developed to its full potential. Backwards compatibility will be provided via libmap.conf for dynamically linked binaries and static binaries will be broken.
* Fix for the panic("vm_thread_new: kstack allocation failed") andkib2007-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | silent NULL pointer dereference in the i386 and sparc64 pmap_pinit() when the kmem_alloc_nofault() failed to allocate address space. Both functions now return error instead of panicing or dereferencing NULL. As consequence, vmspace_exec() and vmspace_unshare() returns the errno int. struct vmspace arg was added to vm_forkproc() to avoid dealing with failed allocation when most of the fork1() job is already done. The kernel stack for the thread is now set up in the thread_alloc(), that itself may return NULL. Also, allocation of the first process thread is performed in the fork1() to properly deal with stack allocation failure. proc_linkup() is separated into proc_linkup() called from fork1(), and proc_linkup0(), that is used to set up the kernel process (was known as swapper). In collaboration with: Peter Holm Reviewed by: jhb
* Make the PCI code aware of PCI domains (aka PCI segments) so we canmarius2007-09-301-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | support machines having multiple independently numbered PCI domains and don't support reenumeration without ambiguity amongst the devices as seen by the OS and represented by PCI location strings. This includes introducing a function pci_find_dbsf(9) which works like pci_find_bsf(9) but additionally takes a domain number argument and limiting pci_find_bsf(9) to only search devices in domain 0 (the only domain in single-domain systems). Bge(4) and ofw_pcibus(4) are changed to use pci_find_dbsf(9) instead of pci_find_bsf(9) in order to no longer report false positives when searching for siblings and dupe devices in the same domain respectively. Along with this change the sole host-PCI bridge driver converted to actually make use of PCI domain support is uninorth(4), the others continue to use domain 0 only for now and need to be converted as appropriate later on. Note that this means that the format of the location strings as used by pciconf(8) has been changed and that consumers of <sys/pciio.h> potentially need to be recompiled. Suggested by: jhb Reviewed by: grehan, jhb, marcel Approved by: re (kensmith), jhb (PCI maintainer hat)
* Add various macros for the ADMA unit.cognet2007-09-221-0/+39
| | | | Approved by: re (blanket)
* Add a driver for the 7seg found on the CRB board, largely based on thecognet2007-09-227-0/+468
| | | | | | IQ31244 version. Approved by: re (blanket)
* Add initial IOP342 support.cognet2007-07-2716-0/+2869
Thanks to Intel for providing sample hardware. Approved by: re (blanket)
OpenPOWER on IntegriCloud