summaryrefslogtreecommitdiffstats
path: root/sys/arm
Commit message (Collapse)AuthorAgeFilesLines
* Accept r1 as having the metadata pointer argument if r0 is 0.marcel2011-02-031-4/+10
| | | | | | This provides backward compatibility with Juniper loaders. Sponsored by: Juniper Networks
* Put the general logic for being a CPU hog into a new functionmdf2011-02-021-2/+1
| | | | | | | | | | should_yield(). Use this in various places. Encapsulate the common case of check-and-yield into a new function maybe_yield(). Change several checks for a magic number of iterations to use should_yield() instead. MFC after: 1 week
* Introduce macro FDT_MAP_IRQ to map from an interrupt controller andmarcel2011-01-291-0/+3
| | | | | interrupt pin pair to a global IRQ number. When multiple PICs exist on a board, the interrupt pin alone is not unique.
* Move the load address of the kernel to the start of KVA as theandrew2011-01-291-4/+4
| | | | | | s3c24x0 copy of initarm expects the kernel to be loaded there. Approved by: imp (mentor)
* Fix r217688. We need to call init_param1() before we use msgbufsize,marcel2011-01-221-1/+3
| | | | now that the size of the message buffer is a tunable.
* Fix backtraces by defining ksym_start & ksym_end if DDB ismarcel2011-01-221-0/+8
| | | | | | | | defined. The kernel linker doesn't deal with symbols of type NOTYPE and typically gives the wrong symbol ($a) for local symbols. Obtained from: Juniper Networks, Inc.
* Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize.pluknet2011-01-219-36/+21
| | | | | | | Submitted by: perryh pluto.rain.com (previous version) Reviewed by: jhb Approved by: kib (mentor) Tested by: universe
* For architectures not using direct map , and requiring real KVA page forkib2011-01-181-1/+1
| | | | | | | | | | | | | | sf buf allocation, use wakeup() instead of wakeup_one() to notify sf buffer waiters about free buffer. sf_buf_alloc() calls msleep(PCATCH) when SFB_CATCH flag was given, and for simultaneous wakeup and signal delivery, msleep() returns EINTR/ERESTART despite the thread was selected for wakeup_one(). As result, we loose a wakeup, and some other waiter will not be woken up. Reported and tested by: az Reviewed by: alc, jhb MFC after: 1 week
* Remove empty dev_mem_md_init() stubs.jkim2011-01-171-5/+0
|
* Add reader/writer lock around mem_range_attr_get() and mem_range_attr_set().jkim2011-01-172-1/+6
| | | | | | | | | Compile sys/dev/mem/memutil.c for all supported platforms and remove now unnecessary dev_mem_md_init(). Consistently define mem_range_softc from mem.c for all platforms. Add missing #include guards for machine/memdev.h and sys/memrange.h. Clean up some nearby style(9) nits. MFC after: 1 month
* Don't re-use MODINFOMD_BOOTINFO as MODINFOMD_DTBP. It breaksmarcel2011-01-111-1/+2
| | | | | compatibility without any means for the kernel to work with an older loader.
* Remove unneeded includes of <sys/linker_set.h>. Other headers that usejhb2011-01-112-2/+0
| | | | | | it internally contain nested includes. Reviewed by: bde
* Move repeated MAXSLP definition from machine/vmparam.h to sys/vmmeter.h.kib2011-01-091-1/+0
| | | | | | | Update the outdated comments describing MAXSLP and the process selection algorithm for swap out. Comments wording and reviewed by: alc
* On mixed 32/64 bit architectures (mips, powerpc) use __LP64__ rather thantijl2011-01-081-2/+2
| | | | | | | | | | | | | architecture macros (__mips_n64, __powerpc64__) when 64 bit types (and corresponding macros) are different from 32 bit. [1] Correct the type of INT64_MIN, INT64_MAX and UINT64_MAX. Define (U)INTMAX_C as an alias for (U)INT64_C matching the type definition for (u)intmax_t. Do this on all architectures for consistency. Suggested by: bde [1] Approved by: kib (mentor)
* On 32 bit architectures define (u)int64_t as (unsigned) long long insteadtijl2011-01-081-6/+6
| | | | | | | | | | | | | | | | of (unsigned) int __attribute__((__mode__(__DI__))). This aligns better with macros such as (U)INT64_C, (U)INT64_MAX, etc. which assume (u)int64_t has type (unsigned) long long. The mode attribute was used because long long wasn't standardised until C99. Nowadays compilers should support long long and use of the mode attribute is discouraged according to GCC Internals documentation. The type definition has to be marked with __extension__ to support compilation with "-std=c89 -pedantic". Discussed with: bde Approved by: kib (mentor)
* Fix types of some values in machine/_limits.h.tijl2011-01-081-3/+1
| | | | | | | | | | | | | | | | | On some architectures UCHAR_MAX and USHRT_MAX had type unsigned int. However, lacking integer suffixes for types smaller than int, their type should correspond to that of an object of type unsigned char (or short) when used in an expression with objects of type int. In that case unsigned char (short) are promoted to int (i.e. signed) so the type of UCHAR_MAX and USHRT_MAX should also be int. Where MIN/MAX constants implicitly have the correct type the suffix has been removed. While here, correct some comments. Reviewed by: bde Approved by: kib (mentor)
* Remove unused support for 64 bit long on 32 bit architectures.tijl2011-01-071-11/+0
| | | | | | | | It was used mainly to discover and fix some 64-bit portability problems before 64-bit arches were widely available. Discussed with: bde Approved by: kib (mentor)
* Add AT_STACKPROT elf aux vector. Will be used to inform rtld about thekib2011-01-071-1/+2
| | | | initial stack protection set by the kernel image activator.
* Remove bogus usage of INTR_FAST. "Fast" interrupts are now indicated byjhb2011-01-061-1/+1
| | | | | registering a filter handler rather than a threaded handler. Also remove a bogus use of INTR_MPSAFE for a filter.
* - Add a proper return value to mv_gpio_intr().jhb2011-01-061-4/+5
| | | | - Remove an obsolete use of INTR_FAST.
* - Use macbstart_locked() directly instead of deferring it to a task.jhb2011-01-061-16/+14
| | | | | | | - Expand locking scope in interrupt handler. - Flesh out the detach routine. Reviewed by: cognet
* Remove support for SKYEYE simulatorimp2011-01-055-52/+0
|
* Remove ancient simulation code. Skyeye simulation never really workedimp2011-01-052-90/+0
| | | | | | | | quite right and hasn't been used in ages and is likely broken. QEMU with GUMSTIX is a more promising road to FreeBSD/arm in emulation anyway. Reviewed by: cognet@
* IXP4XX_GPIO_{,UN}LOCK() don't take args. Remove the sc here to makeimp2010-12-231-10/+10
| | | | this compile again.
* Fix double ;;kevlo2010-12-061-1/+1
|
* Revert r216134. This checkin broke platforms where bus_space are macros:brucec2010-12-031-59/+8
| | | | | they need to be a single statement, and do { } while (0) doesn't work in this situation so revert until a solution can be devised.
* Disallow passing in a count of zero bytes to the bus_space(9) functions.brucec2010-12-021-8/+59
| | | | | | | | | Passing a count of zero on i386 and amd64 for [I386|AMD64]_BUS_SPACE_MEM causes a crash/hang since the 'loop' instruction decrements the counter before checking if it's zero. PR: kern/80980 Discussed with: jhb
* Provide a mutex around the read/modify/write of the IXP425_GPIO_*thompsa2010-11-146-45/+35
| | | | registers. Giant was used in some places, but not all.
* Add a GPIO driver for the Gateworks Cambria platform.thompsa2010-11-114-0/+480
| | | | | | | | | The external gpio pins are connected to a PLD on the i2c bus, unfortunatley this device does not conform by failing to send an ack after each byte written. The iicbb driver will abort the transfer when the address is not ack'd and it would introduce a lot of churn to be able to pass a flag down to iicbb_start/iicbb_write. Instead we do bad things by grabbing the iicbus but then doing our own bit banging.
* add hint for at45d flash device sitting of spibus0ticso2010-11-111-0/+4
|
* - Remove <machine/mutex.h>. Most of the headers were empty, and thejhb2010-11-091-32/+0
| | | | | | | | | | | | contents of the ones that were not empty were stale and unused. - Now that <machine/mutex.h> no longer exists, there is no need to allow it to override various helper macros in <sys/mutex.h>. - Rename various helper macros for low-level operations on mutexes to live in the _mtx_* or __mtx_* namespaces. While here, change the names to more closely match the real API functions they are backing. - Drop support for including <sys/mutex.h> in assembly source files. Suggested by: bde (1, 2)
* Fix typos.brucec2010-11-091-2/+2
| | | | | PR: bin/148894 Submitted by: olgeni
* Minor cosmetic changeskevlo2010-11-091-4/+4
|
* Intel IXP425 SoC is based on the ARMv5TE architecturekevlo2010-11-081-2/+3
| | | | MFC after: 3 days
* Remove line for the uncommitted Cambria gpio drive that snuck in with r214946.thompsa2010-11-071-1/+0
|
* Hook up the five gpio pins on the Avila board to the gpio framework. There arethompsa2010-11-075-0/+391
| | | | | | | | | | | | actually 16 I/O lines but the other ones are used for system devices and interrupts. The IXP4XX platform can set interrupts on these pins for high/low/rising/falling/transitional but this is not implemented yet. The Cambria has the same interface but as all the pins are assigned to system functions the gpio header is toggled via a PLD on the i2c bus and is not supported by this commit.
* Adjust the order of operations in spinlock_enter() and spinlock_exit() tojhb2010-11-051-4/+10
| | | | | | | | | | | | | | | | | | work properly with single-stepping in a kernel debugger. Specifically, these routines have always disabled interrupts before increasing the nesting count and restored the prior state of interrupts after decreasing the nesting count to avoid problems with a nested interrupt not disabling interrupts when acquiring a spin lock. However, trap interrupts for single-stepping can still occur even when interrupts are disabled. Now the saved state of interrupts is not saved in the thread until after interrupts have been disabled and the nesting count has been increased. Similarly, the saved state from the thread cannot be read once the nesting count has been decreased to zero. To fix this, use temporary variables to store interrupt state and shuffle it between the thread's MD area and the appropriate registers. In cooperation with: bde MFC after: 1 month
* Try to be a little smart at guessing where _start is located in flash, insteadcognet2010-11-011-2/+4
| | | | | | of relying on a binutils bug. Reported by: dim
* Set of legacy mode SATA enchancements:mav2010-10-181-1/+1
| | | | | | | | | | | | - Implement proper combined mode decoding for Intel controllers to properly identify SATA and PATA channels and associate ATA channels with SATA ports. This fixes wrong reporting and in some cases hard resets to wrong SATA ports. - Improve SATA registers support to handle hot-plug events and potentially interface errors. For ICH5/6300ESB chipsets these registers accessible via PCI config space. For later ones they may be accessible via PCI BAR(5). - For controllers not generating interrupts on hot-plug events, implement periodic status polling. Use it to detect hot-plug on Intel and VIA controllers. Same probably could also be used for Serverworks and SIS.
* Remove a device_printf() accidentally left in r213894.marius2010-10-151-1/+0
| | | | Submitted by: jhb
* Converted the remainder of the NIC drivers to use the mii_attach()marius2010-10-152-6/+8
| | | | | | | introduced in r213878 instead of mii_phy_probe(). Unlike r213893 these are only straight forward conversions though. Reviewed by: yongari
* Convert the PHY drivers to honor the mii_flags passed down and convertmarius2010-10-152-19/+14
| | | | | | | | | | | | | | | | | | | | | | | the NIC drivers as well as the PHY drivers to take advantage of the mii_attach() introduced in r213878 to get rid of certain hacks. For the most part these were: - Artificially limiting miibus_{read,write}reg methods to certain PHY addresses; we now let mii_attach() only probe the PHY at the desired address(es) instead. - PHY drivers setting MIIF_* flags based on the NIC driver they hang off from, partly even based on grabbing and using the softc of the parent; we now pass these flags down from the NIC to the PHY drivers via mii_attach(). This got us rid of all such hacks except those of brgphy() in combination with bce(4) and bge(4), which is way beyond what can be expressed with simple flags. While at it, I took the opportunity to change the NIC drivers to pass up the error returned by mii_attach() (previously by mii_phy_probe()) and unify the error message used in this case where and as appropriate as mii_attach() actually can fail for a number of reasons, not just because of no PHY(s) being present at the expected address(es). Reviewed by: jhb, yongari
* Add the QILA9G20 config files.cognet2010-10-062-0/+162
| | | | Submitted by: Greg Ansley
* Add support for the AT91SAM9260cognet2010-10-0614-65/+826
| | | | Submitted by: Greg Ansley
* Add the AT91SAM9G20EK config files.cognet2010-10-062-0/+163
| | | | Submitted by: Greg Ansley
* if_ate.c:cognet2010-10-0640-2519/+3091
| | | | | | | | | | | | | | | | | | | | | | | * Support for sam9 "EMAC" controller. * Support for rmii interface to phy. at91.c & at91sam9.c: * Eliminate separate at91sam9.c file. * Add new devices to at91sam9_devs table. at91_machdep.c & at at91sam9_machdep.c: * Automatic chip type determination. * Remove compile time chip dependencies. * Eliminate separate at91sam9_machdep.c file. at91_pmc.c: * Corrected support for all of the sam926? and sam9g20 chips. * Remove compile time chip dependencies. My apologies to Greg for taking so long to take care of it.
* fix outdated commentticso2010-09-281-4/+1
|
* The TWI controller automatically stops if we don't fill up with new data inticso2010-09-271-3/+1
| | | | time.
* fix off by one error for twi reads with len != 1.ticso2010-09-271-1/+1
| | | | STOP must be requested before the last byte is received.
* Add basic cpu_sleep() support for Marvell SoCs. This drops my SheevaPlug'smav2010-09-183-1/+12
| | | | heatsink termperature in open air from 49C to 43C when idle.
OpenPOWER on IntegriCloud