summaryrefslogtreecommitdiffstats
path: root/sys/arch/armv7/include (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Give armv7 a <machine/cpufunc.h> header and use it to add a prototypekettenis2020-11-291-0/+16
| | | | | | for smc_call(). ok patrick@
* Re-work intr_barrier(9) on arm64 to remove layer violation. So far wepatrick2020-07-171-1/+2
| | | | | | | | | | | have stored the struct cpu_info * in the wrapper around the interrupt handler cookie, but since we can have a few layers inbetween, this does not seem very nice. Instead have each and every interrupt controller provide a barrier function. This means that intr_barrier(9) will in the end be executed by the interrupt controller that actually wired the pin to a core. And that's the only place where the information is stored. ok kettenis@
* Extend the interrupt API on arm64 and armv7 to be able to pass aroundpatrick2020-07-141-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | a struct cpu_info *. From a driver point of view the fdt_intr_establish_* API now also exist same functions with a *_cpu suffix. Internally the "old" functions now call their *_cpu counterparts, passing NULL as ci. NULL will be interpreted as primary CPU in the interrupt controller code. The internal framework for interrupt controllers has been changed so that the establish methods provided by an interrupt controller function always takes a struct cpu_info *. Some drivers, like imxgpio(4) and rkgpio(4), only have a single interrupt line for multiple pins. On those we simply disallow trying to establish an interrupt on a non-primary CPU, returning NULL. Since we do not have MP yet on armv7, all armv7 interrupt controllers do return NULL if an attempt is made to establish an interrupt on a different CPU. That said, so far there's no way this can happen. If we ever gain MP support, this is a reminder that the interrupt controller drivers have to be adjusted. Prompted by dlg@ ok kettenis@
* Add support for timeconting in userland.pirofti2020-07-061-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | This diff exposes parts of clock_gettime(2) and gettimeofday(2) to userland via libc eliberating processes from the need for a context switch everytime they want to count the passage of time. If a timecounter clock can be exposed to userland than it needs to set its tc_user member to a non-zero value. Tested with one or multiple counters per architecture. The timing data is shared through a pointer found in the new ELF auxiliary vector AUX_openbsd_timekeep containing timehands information that is frequently updated by the kernel. Timing differences between the last kernel update and the current time are adjusted in userland by the tc_get_timecount() function inside the MD usertc.c file. This permits a much more responsive environment, quite visible in browsers, office programs and gaming (apparently one is are able to fly in Minecraft now). Tested by robert@, sthen@, naddy@, kmos@, phessler@, and many others! OK from at least kettenis@, cheloha@, naddy@, sthen@
* Remove obsolete <machine/stdarg.h> header. Nowadays the varargvisa2020-06-301-4/+0
| | | | | | | | functionality is provided by <sys/stdarg.h> using compiler builtins. Tested in a ports bulk build on amd64 by naddy@ OK naddy@ mpi@
* Add IPI support. Taken ftrom arm64.kettenis2019-09-291-23/+33
| | | | ok patrick@
* Whitespace removalmlarkin2019-05-063-6/+6
| | | | Pointed out by Jerome Pinot
* change marks[] array to uint64_t, so the code can track full 64-bitderaadt2019-04-101-2/+2
| | | | | details from the ELF header instead of faking it. Proposal from mlarkin, tested on most architectures already
* Remove unused spllock().visa2018-08-201-2/+1
| | | | OK deraadt@ mpi@
* Define __HAVE_ACPI on arm64 and __HAVE_FDT on arm64, armv7 and octeonpatrick2018-08-091-1/+5
| | | | | | | | so that we can include firmware-dependant code in generic drivers to be able to extract metadata information like MAC addresses and out-of-band interrupts from the ACPI/FDT tables. ok kettenis@
* Extend the FDT interrupt API to support masking and unmasking IRQs.patrick2018-08-081-1/+5
| | | | Discussed with kettenis@
* Make it possible to build a MULTIPROCESSOR kernel on armv7. While thiskettenis2018-08-061-0/+3
| | | | | | | | doesn't actually spin up any secondary CPUs, it does run. Mostly a cleanup of <machine/cpu.h> along the lines of what I did earlier on arm64. Makes armv7 use the MI mplock implementation and implements copyin32. ok patrick@
* Add PCI machdep headers based on the arm64 port.patrick2018-07-091-0/+3
| | | | ok kettenis@
* Implement an API for establishing legacy PCI interrupts. This specificpatrick2018-07-061-1/+7
| | | | | | | | | | | | | | | | establish function parses the device tree's interrupt map to discover the correct interrupt controller node and interrupt cells for the given PCI node. After retrieving that information we can do the same the normal FDT establish API already does. MSI interrupts are established in a different way as well. Instead of simply hooking up the interrupt handler and returning an MD cookie, we need to pass back information for the PCI controller to configure its interrupt correctly. For this, add another establish routine into the FDT-based interrupt API which looks up msi-controller nodes and calls their MSI-specific establish function if requested. ok kettenis@
* Define IPL_MPFLOOR on SP archs.mpi2018-05-301-1/+2
| | | | From Mathieu <naabed at poolp.org>, ok visa@
* This file only includes <arm/elf_abi.h> which was removed in 2008, so kill it.mpi2017-10-271-3/+0
| | | | ok jsg@
* Unifdef KGDB.mpi2017-04-301-2/+2
| | | | | | It doesn't compile und hasn't been working during the last decade. ok kettenis@, deraadt@
* Set VM_PHYSSEG_MAX to 32 and use VM_PSTRAT_BSEARCH as the sort/search optionkettenis2017-03-101-3/+3
| | | | | | | like we do on macppc and sparc64. This makes our kernel recognize all the memory on the Odroid XU4. ok jsg@
* Add interrupt routing API like we have on arm64.kettenis2017-03-091-1/+5
|
* Use the same stack size as on i386jca2017-01-241-2/+8
| | | | ok kettenis@ deraadt@
* Now that all non-ARMv7 platforms are gone, tedu the legacy atomicpatrick2017-01-051-6/+2
| | | | | | locking code. ok kettenis@
* Remove unused headers.jca2016-12-302-17/+0
| | | | | ISA and PIO don't really fit in the ARM landscape. Suggested by patrick@ and kettenis@, ok deraadt@
* Increase MSGBUFSIZE to 8 pages.kettenis2016-08-201-2/+2
| | | | ok deraadt@
* Extend the interrupt controller API with a disestablish functionality.patrick2016-08-061-1/+4
| | | | | | | This will be helpful for interrupt combiner that need to re-establish their main interrupt when their interrupt priorities change. ok kettenis@
* Add support for pre-registering interrupts. This allows device drivers tokettenis2016-08-041-1/+5
| | | | | | | | | | establish interrupts before their interrupt controller attaches, solving dependency problems in various device trees. Also add support for handing interrupt handlers over to parent interrupt controllers. ok jsg@ patrick@ (on an earlier diff)
* Implement an FDT-aware interrupt establish API. This means the driverspatrick2016-08-011-1/+18
| | | | | | | | | | don't need to know where to attach to. Instead the API will take care of finding the correct interrupt establish for a given device node and will call it with the correct data. Adapted from the OFW GPIO framework. ok kettenis@
* Implement openprom(4) for armv7.kettenis2016-05-211-0/+3
| | | | ok deraadt@
* Load the kernel at the address pre-allocated by the EFI bootloader.kettenis2016-05-141-2/+4
|
* Rework mainbus and implement simplebus to be able to span a tree-likepatrick2016-05-021-0/+3
| | | | | | | topology based on device tree information. Introduce a common attach args structure to be used for all fdt-capable bus devices. ok jsg@ kettenis@
* intr_barrier(9) for armjsg2015-09-191-1/+3
| | | | ok kettenis@
* Remove {LOAD,COUNT}_TEXTA from libsa loadfile, it only made sense for a.outmiod2015-07-171-3/+3
| | | | kernels and we no longer have any.
* Make ARM_KERNEL_BASE explicitely unsignedmiod2015-06-241-2/+2
|
* Raise VM_PHYSSEG_MAX to two and load an additional physical memoryjsg2015-05-121-2/+2
| | | | | | | segment if u-boot reports it. Needed for the utilite where u-boot reports two 1GB segments of physical memory. From Patrick Wildt in bitrig with some additional sanity checks added.
* VM_MAX_KERNEL_ADDRESS is the end of the kva range not the end ofjsg2015-05-101-1/+3
| | | | | | | | | | | | | | addressable virtual memory space but arm ports were using a value of 0xffffffff for this. Instead of using a shared VM_MAX_KERNEL_ADDRESS define add md VM_KERNEL_SPACE_SIZE defines based on the KERNEL_VM_SIZE values from the respective machdep.c files. djm's novena was hitting "panic: bufinit: can't reserve VM for buffers" without a similiar change. ok miod@
* remove useless headersaalm2013-10-241-4/+0
| | | | ok jasper@, patrick@
* Remove a.out leftovers now that libsa loadfile() will only boot ELF binaries.miod2013-10-171-2/+1
|
* In the future, we shouldn't have one port port ARM SoC, that's justpatrick2013-09-0447-0/+676
ridiculous. This is the first step for a common and generic ARM port for ARMv7 SoCs.