summaryrefslogtreecommitdiffstats
path: root/sys/arch/armv7/include
AgeCommit message (Collapse)AuthorFilesLines
2020-11-29Give armv7 a <machine/cpufunc.h> header and use it to add a prototypekettenis1-0/+16
for smc_call(). ok patrick@
2020-07-17Re-work intr_barrier(9) on arm64 to remove layer violation. So far wepatrick1-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@
2020-07-14Extend the interrupt API on arm64 and armv7 to be able to pass aroundpatrick1-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@
2020-07-06Add support for timeconting in userland.pirofti1-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@
2020-06-30Remove obsolete <machine/stdarg.h> header. Nowadays the varargvisa1-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@
2019-09-29Add IPI support. Taken ftrom arm64.kettenis1-22/+32
ok patrick@
2019-05-06Whitespace removalmlarkin3-6/+6
Pointed out by Jerome Pinot
2019-04-10change marks[] array to uint64_t, so the code can track full 64-bitderaadt1-2/+2
details from the ELF header instead of faking it. Proposal from mlarkin, tested on most architectures already
2018-08-20Remove unused spllock().visa1-2/+1
OK deraadt@ mpi@
2018-08-09Define __HAVE_ACPI on arm64 and __HAVE_FDT on arm64, armv7 and octeonpatrick1-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@
2018-08-08Extend the FDT interrupt API to support masking and unmasking IRQs.patrick1-1/+5
Discussed with kettenis@
2018-08-06Make it possible to build a MULTIPROCESSOR kernel on armv7. While thiskettenis1-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@
2018-07-09Add PCI machdep headers based on the arm64 port.patrick1-0/+3
ok kettenis@
2018-07-06Implement an API for establishing legacy PCI interrupts. This specificpatrick1-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@
2018-05-30Define IPL_MPFLOOR on SP archs.mpi1-1/+2
From Mathieu <naabed at poolp.org>, ok visa@
2017-10-27This file only includes <arm/elf_abi.h> which was removed in 2008, so kill it.mpi1-3/+0
ok jsg@
2017-04-30Unifdef KGDB.mpi1-2/+2
It doesn't compile und hasn't been working during the last decade. ok kettenis@, deraadt@
2017-03-10Set VM_PHYSSEG_MAX to 32 and use VM_PSTRAT_BSEARCH as the sort/search optionkettenis1-3/+3
like we do on macppc and sparc64. This makes our kernel recognize all the memory on the Odroid XU4. ok jsg@
2017-03-09Add interrupt routing API like we have on arm64.kettenis1-1/+5
2017-01-24Use the same stack size as on i386jca1-2/+8
ok kettenis@ deraadt@
2017-01-05Now that all non-ARMv7 platforms are gone, tedu the legacy atomicpatrick1-6/+2
locking code. ok kettenis@
2016-12-30Remove unused headers.jca2-17/+0
ISA and PIO don't really fit in the ARM landscape. Suggested by patrick@ and kettenis@, ok deraadt@
2016-08-20Increase MSGBUFSIZE to 8 pages.kettenis1-2/+2
ok deraadt@
2016-08-06Extend the interrupt controller API with a disestablish functionality.patrick1-1/+4
This will be helpful for interrupt combiner that need to re-establish their main interrupt when their interrupt priorities change. ok kettenis@
2016-08-04Add support for pre-registering interrupts. This allows device drivers tokettenis1-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)
2016-08-01Implement an FDT-aware interrupt establish API. This means the driverspatrick1-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@
2016-05-21Implement openprom(4) for armv7.kettenis1-0/+3
ok deraadt@
2016-05-14Load the kernel at the address pre-allocated by the EFI bootloader.kettenis1-2/+4
2016-05-02Rework mainbus and implement simplebus to be able to span a tree-likepatrick1-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@
2015-09-19intr_barrier(9) for armjsg1-1/+3
ok kettenis@
2015-07-17Remove {LOAD,COUNT}_TEXTA from libsa loadfile, it only made sense for a.outmiod1-3/+3
kernels and we no longer have any.
2015-06-24Make ARM_KERNEL_BASE explicitely unsignedmiod1-2/+2
2015-05-12Raise VM_PHYSSEG_MAX to two and load an additional physical memoryjsg1-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.
2015-05-10VM_MAX_KERNEL_ADDRESS is the end of the kva range not the end ofjsg1-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@
2013-10-24remove useless headersaalm1-4/+0
ok jasper@, patrick@
2013-10-17Remove a.out leftovers now that libsa loadfile() will only boot ELF binaries.miod1-2/+1
2013-09-04In the future, we shouldn't have one port port ARM SoC, that's justpatrick47-0/+676
ridiculous. This is the first step for a common and generic ARM port for ARMv7 SoCs.