summaryrefslogtreecommitdiff
path: root/sys/arch/arm
AgeCommit message (Collapse)Author
2017-12-11In uvm Chuck decided backing store would not be allocated proactivelyTheo de Raadt
for blocks re-fetchable from the filesystem. However at reboot time, filesystems are unmounted, and since processes lack backing store they are killed. Since the scheduler is still running, in some cases init is killed... which drops us to ddb [noted by bluhm]. Solution is to convert filesystems to read-only [proposed by kettenis]. The tale follows: sys_reboot() should pass proc * to MD boot() to vfs_shutdown() which completes current IO with vfs_busy VB_WRITE|VB_WAIT, then calls VFS_MOUNT() with MNT_UPDATE | MNT_RDONLY, soon teaching us that *fs_mount() calls a copyin() late... so store the sizes in vfsconflist[] and move the copyin() to sys_mount()... and notice nfs_mount copyin() is size-variant, so kill legacy struct nfs_args3. Next we learn ffs_mount()'s MNT_UPDATE code is sharp and rusty especially wrt softdep, so fix some bugs adn add ~MNT_SOFTDEP to the downgrade. Some vnodes need a little more help, so tie them to &dead_vnops. ffs_mount calling DIOCCACHESYNC is causing a bit of grief still but this issue is seperate and will be dealt with in time. couple hundred reboots by bluhm and myself, advice from guenther and others at the hut
2017-10-26Discard exception handling information as we do on other architectures.Mark Kettenis
ok patrick@, deraadt@
2017-10-01set MAXSSIZ to the same value as on all other architectures (32MB)Christian Weisgerber
ok deraadt@
2017-09-11Remove whitespace in inline assembly output constraint strings. WhileJonathan Gray
gcc is documented as ignoring whitespace in any position but the first clang gives "error: invalid output constraint '=r ' in asm".
2017-09-08If you use sys/param.h, you don't need sys/types.hTheo de Raadt
2017-09-05Move mutex, condvar, and thread-specific data routes, pthread_once, andPhilip Guenther
pthread_exit from libpthread to libc, along with low-level bits to support them. Major bump to both libc and libpthread. Requested by libressl team. Ports testing by naddy@ ok kettenis@
2017-08-27Add glass console support for arm64. This uses the "stdout-path" propertyMark Kettenis
of the /chosen node in the device tree to decide whether the framebuffer should be used as the console device. Most, if not all, machines will have that set to use a serial console and there is no easy way yet to change that. ok jsg@
2017-08-20Add Cortex-A55 and Cortex-A75 part numbers.Jonathan Gray
2017-08-17Fix typo in comments: s/return/returns/ in "a function that never return."Tom Cosgrove
2017-08-17tedu unused, vestigial, arm STACKCHECKS code that only fills and never checksTom Cosgrove
ok drahn@
2017-08-12remove apmwarn sysctl which is not usedTed Unangst
2017-07-31Use unsigned long instead of uint32_t, which is the appropriate integerMark Kettenis
type for storing pointers in our universe. Avoids an implicit dependence on <sys/types.h>. ok tom@
2017-07-25Print CPU type as we do on arm64. This is how ARM prints revisions in itsMark Kettenis
documentation. ok patrick@, tom@
2017-07-21Accessing a mmap(2)ed file behind its end should result in a SIGBUSMark Kettenis
according to POSIX. ok bluhm@, deraadt@
2017-07-12remove CPU_LIDSUSPEND/machdep.lidsuspendMartin Natano
"fire away!" tedu
2017-06-29kill RCSID macros; discussed with millertTheo de Raadt
2017-06-23Unbreak profiling assembly functions in userland by defining theMartin Pieuchot
correct prologue if compiled with -DPROF. ok deraadt@
2017-05-18Fix kernel build on armv7 and sh.Visa Hankala
Pointed out by deraadt@
2017-05-12Make atomic.h ready to be included in userland.Martin Pieuchot
- keep setbits/clearbits and virtio barriers inside _KERNEL - prefix def_atomic_xxx macros with underscores
2017-05-08add a BUS_DMA_64BIT flag to bus_dma on all our archs.David Gwynne
this is so drivers can advertise that they can handle 64 dma addresses to the platform. it may choose to handle dmamaps differently based on this flag. tweaks and ok tom@ ok kettenis@
2017-05-05Remove /* FALLTHROUGH */ that isn't (and shouldn't).Mark Kettenis
2017-05-02Remove check for compatible property. Turns out sunxi relied on the brokenMark Kettenis
check we had before rev 1.16. Suggested by jmatthew@
2017-04-30Make early attrbute work here as well. Remove unreachable panic while there.Mark Kettenis
ok visa@, patrick@, drahn@
2017-04-30Rename Debugger() into db_enter().Martin Pieuchot
Using a name with the 'db_' prefix makes it invisible from the dynamic profiler. ok deraadt@, kettenis@, visa@
2017-04-30Unifdef KGDB.Martin Pieuchot
It doesn't compile und hasn't been working during the last decade. ok kettenis@, deraadt@
2017-04-27Bring over the changes to mainbus(4) and simplebus(4) from arm64.Mark Kettenis
2017-04-27Use (32-bit) word-sized access in the a4x bus space routine even if onlyMark Kettenis
a byte or a half-word is needed. Certain implementations of the Synopsis Designware copy-and-paste logic blocks don't respond to transactions that are smaller than a word. Fixes the serial console on boards with a Rockchip RK3288.
2017-04-24Add support for Cortex-A12. Even though ARM rebranded these as Cortex-A17Mark Kettenis
they have a different ID from "real" Cortex-A17 cores. ok phessler@, patrick@
2017-04-20Hook up mutex(9) to witness(4).Visa Hankala
2017-04-13Provide mips64 with kernel-facing TCB_{GET,SET} macros that store itPhilip Guenther
in struct mdproc. With that, all archs have those and the __HAVE_MD_TCB macro can be unifdef'ed as always defined. ok kettenis@ visa@ jsing@
2017-03-21As a first step towards SMP, use an array for the destination masks withMark Kettenis
an element for each CPU. Use this mask directly instead of converting it into a cpu number and back into a mask again when routing interrupts. This avoids the need to handle uniprocessor systems in a special way as they will return 0 as the mask (the relevant register is defined as RAZ) and ignore what's written into the destination registers (the relevant registers are defined as WI). Future code that hatches the secondary CPUs will have to call into the driver to establish the masks for those CPUs. ok patrick@
2017-03-21Avoid panic in arm_sync_icache() by only flushing the parts of the addressMark Kettenis
space for which we have a userland mapping. ok jca@
2017-03-12Bring SROP mitigation to arm64. Make some small modifications to the armMark Kettenis
code as well to improve diffability. Changes the types used in the arm64 "struct sigcontext" to avoid having to include <sys/types.h>. ok deraadt@
2017-03-07Record the target mask for the boot CPU when we attach and use that to pickMark Kettenis
the target CPU interface when establishing an interrupt. Makes interrupts work on machines that boot up on a CPU that is attached to a CPU interface that isn't zero. Discussed with Dale Rahn.
2017-03-03Fix the lidsuspend sysctl name in arm/include/cpu.hTom Cosgrove
From Markus Hennecke, thanks
2017-03-02Add a new sysctl machdep.lidaction. The sysctl works as follows:Martin Natano
machdep.lidaction=0 # do nothing machdep.lidaction=1 # suspend machdep.lidaction=2 # hibernate lidsuspend is just an alias for lidaction, so if you change one, the other one will have the same value. The plan is to remove machdep.lidsuspend eventually when people have upgraded their /ets/sysctl.conf. discussed with deraadt, who came up with the new MIB name no objections mlarkin ok stsp halex jcs
2017-02-28Switch geteblks()'s size argument from int to size_t. It's called withMartin Natano
unsigned variables as argument in most places anyway. Decrease the chance of signedness/range mismatch issues. ok stefan
2017-02-15Bump MAXTSIZ to 64M on arm.Jeremie Courreges-Anglas
Needed for ports/devel/llvm which builds large executables with a .text section over 32M. Remove the comment about the +/-32M limitation of branch instructions, which can be lifted using other techniques (eg cc -mlong-calls) and should not be enforced by the kernel. ok guenther@ patrick@ jsg@ kettenis@
2017-02-12Split up fork1():Philip Guenther
- FORK_THREAD handling is a totally separate function, thread_fork(), that is only used by sys___tfork() and which loses the flags, func, arg, and newprocp parameters and gains tcb parameter to guarantee the new thread's TCB is set before the creating thread returns - fork1() loses its stack and tidptr parameters Common bits factor out: - struct proc allocation and initialization moves to thread_new() - maxthread handling moves to fork_check_maxthread() - setting the new thread running moves to fork_thread_start() The MD cpu_fork() function swaps its unused stacksize parameter for a tcb parameter. luna88k testing by aoyama@, alpha testing by dlg@ ok mpi@
2017-02-08In exec_elf.c: expand ELFNAME(), ELFNAME2(), and ELFNAMEEND() exceptPhilip Guenther
leaving out the size, so that ELFNAME2(exec,makecmds) becomes exec_elf_makecmds instead of exec_elf{32,64}_makecmds and then delete the ELFNAME2() and ELFNAMEEND() macros. Move the prototypes for functions local to exec_elf.c to there from exec_elf.h. Simplify the SMALL_KERNEL conditionals around the ELF coredump code. Change exec_conf.c to use the size-generic names and macros Remove exec_elf{32,64}.c and just build exec_elf.c; delete the _KERN_DO_ELF and _KERN_DO_ELF64 #defines. ok jca@, encouragement from deraadt@ and tom@
2017-02-07There are 1023 possible values for the interrupts, but our masks limitPatrick Wildt
these currently to 255. Thus making it impossible to use higher IRQs than that. The AMD Seattle SoC though seems to provide 448 IRQs, which is kind of out of bounds, so raise them to the proper values. This makes interrupts work on that machine.
2017-02-06add a license for the code in here, all of which i seem to have written.David Gwynne
this has been pointed out to me by a couple of people now.
2017-01-24Rename pfind(9) into tfind(9) to reflect that it deals with threads.Martin Pieuchot
While here document prfind(9. with and ok guenther@
2017-01-23remove #defines present in MI conf.h; ok kettenisTheo de Raadt
2017-01-23No need to explicitly use config_activate_children in the cfattach struct.Mark Kettenis
2017-01-21Move virtio config from files.pci to files.pciReyk Floeter
virtio itself is not PCI, it is a paravirtual bus on top of either PCI or MMIO (arm). This is the first step of moving the virtio files to dev/pv. No functional change. arm kernel changes tested by jsg@ and patrick@ no objections from sf@ mlarkin@
2017-01-21p_comm is the process's command and isn't per thread, so move it fromPhilip Guenther
struct proc to struct process. ok deraadt@ kettenis@
2017-01-13Ansify cpu_sysctl() on alpha, arm, arm64, luna88k and sparc64.Frederic Cambus
OK mpi@
2017-01-06there is no longer a need to ifdef __armv7__ armv6 rev instructionsJonathan Gray
2017-01-06unifdef CPU_ARMv7 and ARM_ARCH_7Jonathan Gray
ok kettenis@ patrick@