summaryrefslogtreecommitdiff
path: root/sys/arch
AgeCommit message (Collapse)Author
2015-05-12Raise VM_PHYSSEG_MAX to two and load an additional physical memoryJonathan Gray
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-12Add missing braces.Jonathan Gray
Tested by and ok djm@
2015-05-11Remove support for ADPCM encoding which isn't used nowadays andAlexandre Ratchov
not available to programs anyway.
2015-05-11Remove all audio format conversion code from the kernel (btw holdingAlexandre Ratchov
the kernel_lock), as we already do better conversions in user-mode. Yet, no need for every single driver to fiddle with the conversion code as they are done transparently by common MI code. With help from armani and miod, support from mpi ok armani@
2015-05-11Convert from uiomovei() to uiomove() to prevent short tranfersPhilip Guenther
diff from natano@bitrig, with some additional format and cast tweaks
2015-05-10VM_MAX_KERNEL_ADDRESS is the end of the kva range not the end ofJonathan Gray
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@
2015-05-10limit physical memory to (paddr_t)-PAGE_SIZE (0xfffff000)Jonathan Gray
novena has 4GB of physical memory and it's u-boot tells us memstart: 0x10000000 memsize: 0xf0000000 which would previously cause an overflow leading to "panic: initarm: out of memory" tweak from and ok miod@
2015-05-09Cleanup/rejig GPT code to be more readable, support different endianKenneth R Westerback
archs and different sized disk sectors. Make MBR have higher priority than GPT. Add many paranoia checks and associated DPRINTF's to make further development easier. Keep everything hidden behind #ifdef GPT. Tested and ok doug@ mpi@. Nothing bad seen by millert@.
2015-05-08Need explicit <sys/kcore.h> include now.Miod Vallat
2015-05-08Add missing sabresd case statements. As sabresd_devs[] includes imxgpioJonathan Gray
an attempt to boot on sabresd would have tried to deref NULL function pointers.
2015-05-08Add initial board specific parts of novena support, tested by djm@Jonathan Gray
While novena has it's own board id it's u-boot does not set it. "setenv machid 10ad" in u-boot will set the novena board id (0x10ad/4269).
2015-05-07remove badly indented printf and it's preceeding testJonathan Gray
as suggested by miod@
2015-05-07fix indentationJonathan Gray
ok miod@
2015-05-07add missing bracesJonathan Gray
ok miod@
2015-05-06put mpi's atomics back in, but with the return value of add (and therefore ↵David Gwynne
sub, inc, and dec) fixed. the asm read the value from memory into a register, added to it, and then tried to write it back. after succeeding it doesnt have to add again before returning. this splits sub, inc, and dec off from add. sub can use the subf opcode, and inc and dec can use the addic opcode. explicitely identify where the modified memory is so we can avoid using "memory" as a clobber. ok mpi@
2015-05-06Add missing braces so this will correctly fall back to the "name"Jonathan Gray
property of a node if "device_type" is not present. ok mpi@ miod@
2015-05-05no need to swizzle load/store addresses for 32bit values on big endian systemsJonathan Matthew
ok miod@
2015-05-05emul_native is only used for kernel threads which can't dump core, soPhilip Guenther
delete coredump_trad(), uvm_coredump(), cpu_coredump(), struct md_coredump, and various #includes that are superfluous. This leaves compat_linux processes without a coredump callback. If that ability is desired, someone should update it to use coredump_elf32() and verify the results... ok kettenis@
2015-05-04fix device numbering comments, no binary changeJonathan Matthew
2015-05-04Print irq informations in pckbc_set_inputhandler().Martin Pieuchot
ok miod@
2015-05-04Fix some misuse of the | operator. In particular | has higherJonathan Gray
precedence than ?: ok guenther@ krw@ miod@
2015-05-02fix build with option DEBUGMiod Vallat
2015-05-02add missing splx callsJonathan Gray
ok miod@
2015-05-02rework hppa mutexes.David Gwynne
this is largely based on src/sys/arch/alpha/alpha/mutex.c r1.14 and src/sys/arch/sgi/sgi/mutex.c r1.15 always and explicitely record which cpu owns the lock (or NULL if noone owns it). improve the mutex diagnostics/asserts so they operate on the mtx_owner field rather than mtx_lock. previously the asserts would assume the lock cpu owns the lock if any of them own the lock, which blows up badly. hppa hasnt got good atomic cpu opcodes, so this still relies on ldcws to serialise access to the lock. while im here i also shuffled the code. on MULTIPROCESSOR systems instead of duplicating code between mtx_enter and mtx_enter_try, mtx_enter simply loops on mtx_enter_try until it succeeds. this also provides an alternative implementation of mutexes on !MULTIPROCESSOR systems that avoids interlocking opcodes. mutexes wont contend on UP boxes, theyre basically wrappers around spls. we can just do the splraise, stash the owner as a guard value for DIAGNOSTIC and return. similarly, mtx_enter_try on UP will never fail, so we can just call mtx_enter and return 1. tested by and ok kettenis@ jsing@
2015-05-01Do not grab the kernel lock for clock interrupts. Help and ok kettenis@Miod Vallat
2015-04-30Convert to if_input().Martin Pieuchot
Tested by jmatthew@
2015-04-30Clean up some spacing. No functional changeMike Larkin
2015-04-30Remove SIZE_MAX from limits.h. It was added years ago before weTodd C. Miller
had a proper stdint.h. No ports fallout. OK guenther@ miod@
2015-04-29Remove a check for NULL that would have been after a NULL dereferenceJonathan Gray
if callers of save_vec() weren't expected to pass a non NULL pointer as an argument. ok kettenis@
2015-04-29Move a variable's initialisation so a panic will work as intended.Jonathan Gray
ok guenther@ deraadt@
2015-04-28Explicitly include .codepatch and .codepatchend in .rodata such thatMark Kettenis
the binutils 2.17 linker doesn't make them disappear. ok deraadt@, guenther@
2015-04-28Don't grab the kernel lock for clock interrupts. The way we use mutexesMark Kettenis
these days is incompatible with that practice and leads to deadlocks. ok jsing@
2015-04-27Correctly write the 64bits of the HID 1, 4 and 5 registers.Martin Pieuchot
This makes the secondary cpu of my PowerMac as fast as the primary one, and divide the build time by 3 with a GENERIC.MP kernel on MP G5s Found thanks to MP kernel profiling. ok dlg@, miod@
2015-04-26Get dwc2 working on octeon.Jonathan Matthew
- transplant the clock setup code from octhci - add a bus space tag to deal with dwc2 using little endian addressing - bump up the rx fifo size, necessary for umass/sd to work tested on an edgerouter lite, which can almost boot by itself now ok uebayasi@ (various parts), miod@ (bus space bits)
2015-04-26Disable PAE when switching to the hibernate resume pagetables. This involvesMark Kettenis
a slightly conmplicated dance where we stash the PAE PDPTEs into the hibernate resume pagetables and use those before turning off PAE. Makes (un)hibernate work with the new PAE pmap. ok mlarkin@
2015-04-26Enable NX support in the resume path. Makes suspend/resume work with theMark Kettenis
PAE pmap. ok deraadt@, mlarkin@
2015-04-26Only enable PAE if the CPU we're running on has NX support. Without NXMark Kettenis
support we're only wasting memory on the larger PAE page tables without any real benefit. This allows some simplifications of the low-level assembly code. ok mlarkin@, deraadt@
2015-04-26bump i386 MAXDSIZ to 3GB. - "If you're running this, and presumably actuallyStuart Henderson
using that much memory, go for it" tedu@ "I don't see any immediate downsides" kettenis@
2015-04-25We now following the ABI and always clear cld on function entry, so removePhilip Guenther
the extra CLD instructions from when that wasn't true testing miod@ krw@
2015-04-25cpu_busy_cycle_fcn callback has never been usedPhilip Guenther
2015-04-25Repair boot device detection when booting off the second SCSI controller onMiod Vallat
AV530.
2015-04-24Enable PAE mode for those CPUs that support it. This allows us to use theMike Larkin
NX bit for userland and kernel W^X. Unlike the previous c.2008 PAE experiment, this does not provide > 4GB phys ram on i386 - PAE is solely being used for NX capability this time. If you need > 4GB phys, use amd64. Userland W^X was committed yesterday by kettenis@, and we will shortly start reworking the kernel like we did for amd64 a few months back to get kernel W^X. This has been in snaps for a few days and tested by kettenis and myself as well. ok deraadt@, kettenis@
2015-04-24Make sure we keep the whole recursive mapping of the PDP instead of just theMark Kettenis
mapping for the first page when tearing things down. Seems to fix the last bug mlarkin@ has been chasing for a while. ok mlarkin@
2015-04-24Revert back to using GCC builtins. This code triggers an off by one inMartin Pieuchot
device_unref() as found by deraadt@.
2015-04-24Enable the NX bit and use it in the PAE pmap code. PAE is still disabledMark Kettenis
while we're chasing at least one remaining bug. ok mlarkin@, deraadt@
2015-04-24Use "softintr_pic0" instead of "softintr_fakepic" when faking aJonathan Gray
struct device so there is enough space in the buffer for a NUL and the unit is included in the string. discussed with deraadt and millert
2015-04-23Fix 13 years old typo that should be responsible for the unhappinessMartin Pieuchot
of UVM on PowerPC architectures by breaking pmap_is_referenced() and friends. ok kettenis@
2015-04-22Init a variable to zero so values aren't or'd into uninitialised memory.Jonathan Gray
From jeundery at gmail dot com
2015-04-22Implement the MI atomic API for PowerPC to avoid using gcc builtins thatMartin Pieuchot
include extra sync operations. ok kettenis@
2015-04-22Reduce differences between pae and no-pae modes.Mike Larkin
discussed with deraadt