summaryrefslogtreecommitdiff
path: root/sys/arch/macppc
AgeCommit message (Collapse)Author
2015-08-30Enable xhci(4) now that it attaches correctly on my G5.Martin Pieuchot
2015-08-30Map the whole config1 space based on the size read from theMartin Pieuchot
device-tree. With this change, supplementary PCIe cards are now properly detected. This should prevents the kernel from faulting when reading unmapped PCI addresses as reported by Donovan Watteau on ppc@. ok kettenis@
2015-08-24Workaround for slow bm(4) from NetBSD PR 33667 via Donovan Watteau onMartin Pieuchot
bugs@.
2015-08-14replace the asm mutexes with a c implementation.David Gwynne
there's no real functional advantage to this, except that it will make it easier to add deadlock detection to the code. this is modelled on the c mutex implementation thats on alpha, mips64, and hppa. ok mpi@ kettenis@
2015-07-2917 years ago, setfault() was modified to save the status register in theMiod Vallat
faultbuf. But 1/ sr was only restored for machine check exceptions, and 2/ the way it was saved was unsafe if interrupts were enabled, and could cause %r2 to be lost. Discussing this with deraadt@ at the end of c2k15, this was probably needed for the old VI boards which were the target of the original powerpc port, came with a worse-than-Genesi openfirmware. Since then, machine check exceptions have been unheard of; or, if they happen, they do not need the status register to be restored. ok mpi@ deraadt@
2015-07-21add braces to avoid an uninitialised variable useJonathan Gray
ok mpi@ looks correct miod@
2015-07-17remove obsolete INET kernel optionTed Unangst
2015-07-17Make sound cards work on older PowerMacs.Martin Pieuchot
On such machines the device-tree contains absolute addresses for the various sound buttons and the hardware was not properly initiliazed. Problem reported and fix tested by Fabian Frédérick.
2015-07-17Remove {LOAD,COUNT}_TEXTA from libsa loadfile, it only made sense for a.outMiod Vallat
kernels and we no longer have any.
2015-07-08MFREE(9) is dead, long live m_freem(9)!Martin Pieuchot
ok bluhm@, claudio@, dlg@
2015-06-26move the ppc mplock implementation from macppc to powerpc.David Gwynne
ok mpi@
2015-06-26Do not compare against a null string. When ofw_find_keyboard() is runMartin Pieuchot
hw_prod is not initialized. While here simply use "PowerBook" as model name, there's no "iBook" model in Apple device-trees. ok miod@ (who's cleaning one of his forests after 3 years)
2015-06-25OF_getprop() returns an int, so comparing its return value against sizeof castsMiod Vallat
it to unsigned, and we need to also check for negative values. All users of OF_getprop() did this but that one. ok mpi@
2015-06-25Use a single event counter for IPIs like other archs do.Martin Pieuchot
Even if this counter is subject to trashing it is a simple solution and gives an proximation "good enough" of the number of IPIs on Quad CPUs machine. ok deraadt@
2015-06-24Do not quiesce the firmware on Quad G5 to let it manage the fans.Martin Pieuchot
This also unbreak "bsd -cd" on such machine since we use OpenFirmware's input at this stage of the boot process.
2015-06-24IPL_MPSAFE bits for macppc with openpic(4).Martin Pieuchot
2015-06-24Increment if_ipackets in if_input().Martin Pieuchot
Note that pseudo-drivers not using if_input() are not affected by this conversion. ok mikeb@, kettenis@, claudio@, dlg@
2015-06-22document that boot.conf can contain comments;Jason McIntyre
from tilo stritzky thanks miod for help with the diff, and who also noted that leading whitespace gets stripped too;
2015-06-17crank to 5.8-betaTheo de Raadt
2015-06-13When investigating an uninitialised variable in the armv7 resettodr()Jonathan Gray
miod pointed out that time_second should be compared to 1 not 0 in the md resettodr() functions as it is initialised to 1. ok miod@ deraadt@
2015-06-05Put spaces and commas where they belong.Martin Pieuchot
2015-06-04The (no quite so) new kernel perfpolicy code calls cpu_setperf() from aMark Kettenis
timeout. Unfortunately the smu(4) CPU voltage slewing code sleeps, which causes a kernel panic. Prevent this by delegating the CPU frequency switching and voltage slewing to a task. ok mpi@
2015-06-03Support for U4, missed in previous.Martin Pieuchot
ok kettenis@, miod@, dlg@
2015-06-03Check for the correct bit in the interrupts property of the device-treeMartin Pieuchot
to determin if interrupts should be established as edge/level triggered. Fix audio interrupts on U4 systems. On such systems the "interrupts" fields in the device-tree has more bits set and cannot be compared to 0.
2015-06-03Add hpb(4), reminded by Brad.Martin Pieuchot
2015-06-02Add a new HT-PCI bridge driver and the necessary glue to openpic(4)Martin Pieuchot
to get interrupts working on U4 machines. With this OpenBSD can run on PowerMac11,2 (Quad G5). With inputs from and ok kettenis@, miod@, dlg@
2015-05-30Remove commented out DRMDEBUG/DRM_DEBUG lines. Other drivers don't haveJonathan Gray
similiar lines so drm shouldn't either.
2015-05-28when machdep.allowaperture sysctl is set to 3, allow concurrent accessJoshua Stein
2015-05-13test mbuf pointers against NULL not 0Jonathan Gray
ok krw@ miod@
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-07remove badly indented printf and it's preceeding testJonathan Gray
as suggested by miod@
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-04-16Enable ualea(4) where we have uhub(4), these USB device lists cry forMartin Pieuchot
unification...
2015-04-08Kill unused function.Martin Pieuchot
2015-04-07Remove a lie, the early boot console does not need any mapping.Martin Pieuchot
In fact we even use the firmware interface for "bsd -c" and "bsd -d". So do the necessary firmware calls before calling initppc() to be able to use printf() really early in the boot sequence.
2015-04-07Mark audio interrupt handlers as MPSAFE, they already grab the rightMartin Pieuchot
mutex when necessary. ok kettenis@, ratchov@
2015-04-07Use appropriate memory barriers.Martin Pieuchot
ok kettenis@, miod@
2015-04-02use correct capitalization of 'BlackBerry'Jasper Lievisse Adriaanse
"sure" deraadt@
2015-04-02Merge openpic_init() into openpic_attach(), no functional change.Martin Pieuchot
2015-04-02One function pointer per pic function is enough.Martin Pieuchot
2015-04-02Cleanup function definitions, use only one define for DEBUG and removeMartin Pieuchot
unused headers.
2015-03-31Make it possisble to disable block address translation mechanism onMartin Pieuchot
processors that support it. Due to the way trap code is patched it is currently not possible to enabled/disable BAT at runtime. ok miod@, kettenis@
2015-03-31Merge two versions of ppc_check_procid().Martin Pieuchot
ok miod@, kettenis@ as part of a larger diff
2015-03-31Tell the firmware to shut down the fan management thread on the lastMartin Pieuchot
generation of G5s. Without this my PowerMac11,2 hang when smu(4) attaches.
2015-03-30Always use the first value of the "interrupts" property the others doMartin Pieuchot
not correspond to the PCI function. Hopefully the first device that I find hitting this case is the second bge(4) interface of my PowerMac11,2.
2015-03-30Add defines for known offsets and magical values, map the correct pageMartin Pieuchot
and enable the mpic on G5 machines and finally introduce some helpers needed for suspend/resume. Is this called a rewrite? In my forest since s2k11, committing now that I need this for supporting Quad G5 machines.
2015-03-24Work around broken device-tree in PowerMac7,2 and PowerMac7,3 (K2 systems)Martin Pieuchot
and get the correct offsets from the "i2s" node. Also explicitly enable the clock in FCR1 as the firmware does not do it on such machine. Still not enough to get the sound working in such systems but get rid of the annoying "i2s_set_rate: timeout" message during boot and plugging an headphone is now correctly detected.
2015-03-24unwire lmc(4) and san(4).David Gwynne
they do "interesting" things with APIs i want to change, and i can't find any evidence anyone uses them anymore. instead of burning time on changes i cant test, ill take a chance that noone will miss them. no objections from anyone ok mpi@ deraadt@ henning@ sthen@
2015-03-23Fix buglet in previous ofdev change causing NFS boot to fail; found the hardMiod Vallat
way by mpi@. Bump version. ok mpi@
2015-03-14Allow for multiple concurrent devopen() calls, and fill the .readdir memberMiod Vallat
of fs_ops; makes the `ls' command finally work in the boot loader.