summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
Commit message (Collapse)AuthorAgeFilesLines
* Merge from vmc-playground branch:attilio2013-02-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Replace the sub-optimal uma_zone_set_obj() primitive with more modern uma_zone_reserve_kva(). The new primitive reserves before hand the necessary KVA space to cater the zone allocations and allocates pages with ALLOC_NOOBJ. More specifically: - uma_zone_reserve_kva() does not need an object to cater the backend allocator. - uma_zone_reserve_kva() can cater M_WAITOK requests, in order to serve zones which need to do uma_prealloc() too. - When possible, uma_zone_reserve_kva() uses directly the direct-mapping by uma_small_alloc() rather than relying on the KVA / offset combination. The removal of the object attribute allows 2 further changes: 1) _vm_object_allocate() becomes static within vm_object.c 2) VM_OBJECT_LOCK_INIT() is removed. This function is replaced by direct calls to mtx_init() as there is no need to export it anymore and the calls aren't either homogeneous anymore: there are now small differences between arguments passed to mtx_init(). Sponsored by: EMC / Isilon storage division Reviewed by: alc (which also offered almost all the comments) Tested by: pho, jhb, davide
* Merge from vmobj-rwlock branch:attilio2013-02-264-4/+0
| | | | | | | | Remove unused inclusion of vm/vm_pager.h and vm/vnode_pager.h. Sponsored by: EMC / Isilon storage division Tested by: pho Reviewed by: alc
* Eliminate an unused #define.alc2013-02-221-5/+0
|
* Introduce PLATFORMMETHOD_END and use it.rpaulo2013-02-135-5/+6
|
* Reform the busdma API so that new types may be added without modifyingkib2013-02-122-299/+238
| | | | | | | | | | | | | | | | | | | | | every architecture's busdma_machdep.c. It is done by unifying the bus_dmamap_load_buffer() routines so that they may be called from MI code. The MD busdma is then given a chance to do any final processing in the complete() callback. The cam changes unify the bus_dmamap_load* handling in cam drivers. The arm and mips implementations are updated to track virtual addresses for sync(). Previously this was done in a type specific way. Now it is done in a generic way by recording the list of virtuals in the map. Submitted by: jeff (sponsored by EMC/Isilon) Reviewed by: kan (previous version), scottl, mjacob (isp(4), no objections for target mode changes) Discussed with: ian (arm changes) Tested by: marius (sparc64), mips (jmallet), isci(4) on x86 (jharris), amd64 (Fabian Keil <freebsd-listen@fabiankeil.de>)
* Use DEVMETHOD_END.rpaulo2013-02-113-3/+3
|
* Enable the UFS quotas for big-iron GENERIC kernels.kib2013-01-032-0/+2
| | | | | Discussed with: mckusick MFC after: 2 weeks
* As discussed on -current last October, remove the firewire drivers fromdes2013-01-031-6/+0
| | | | GENERIC.
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-051-2/+2
| | | | | | | | | malloc(9) flags within sys. Exceptions: - sys/contrib not touched - sys/mbuf.h edited manually
* Setup BAT0 and BAT1 on the Wii.adrian2012-11-213-22/+171
| | | | | | | | | | | | This is the missing piece for FreeBSD/Wii, but there's still a lot of work ahead. We have to reset the MMU in locore before continuing the boot process because we don't know how the boot loaders might have setup the BATs. We also disable the PCI BAT because there's no PCI bus on the Wii. Thanks to Nathan Whitehorn and Peter Grenhan for their help. Submitted by: Margarida Gouveia
* Flip the semantic of M_NOWAIT to only require the allocation to notkib2012-11-143-19/+6
| | | | | | | | | | | | | | | | | | | | sleep, and perform the page allocations with VM_ALLOC_SYSTEM class. Previously, the allocation was also allowed to completely drain the reserve of the free pages, being translated to VM_ALLOC_INTERRUPT request class for vm_page_alloc() and similar functions. Allow the caller of malloc* to request the 'deep drain' semantic by providing M_USE_RESERVE flag, now translated to VM_ALLOC_INTERRUPT class. Previously, it resulted in less aggressive VM_ALLOC_SYSTEM allocation class. Centralize the translation of the M_* malloc(9) flags in the single inline function malloc2vm_flags(). Discussion started by: "Sears, Steven" <Steven.Sears@netapp.com> Reviewed by: alc, mdf (previous version) Tested by: pho (previous version) MFC after: 2 weeks
* Allow this file to be used in LOCORE sections of the kernel.rpaulo2012-11-121-1/+3
|
* Add DTrace to 32-bit PowerPC GENERIC now.jhibbits2012-11-081-0/+3
| | | | MFC after: 1 month
* Implement DTrace for PowerPC. This includes both 32-bit and 64-bit.jhibbits2012-11-075-0/+97
| | | | | | | | | | | There is one known issue: Some probes will display an error message along the lines of: "Invalid address (0)" I tested this with both a simple dtrace probe and dtruss on a few different binaries on 32-bit. I only compiled 64-bit, did not run it, but I don't expect problems without the modules loaded. Volunteers are welcome. MFC after: 1 month
* Replace all uses of the page queues lock by a R/W lock that is privatealc2012-11-031-34/+40
| | | | | | | | to this pmap. Eliminate two redundant #include's. Tested by: marcel
* Rework the known rwlock to benefit about staying on their ownattilio2012-11-031-10/+1
| | | | | | | cache line in order to avoid manual frobbing but using struct rwlock_padalign. Reviewed by: alc, jimharris
* 1. Have the APs initialize the TLB1 entries from what has beenmarcel2012-11-034-58/+89
| | | | | | | | | | | | | | programmed on the BSP during (early) boot. This makes sure that the APs get configured the same as the BSP, irrspective of how FreeBSD was loaded. 2. Make sure to flush the dcache after writing the TLB1 entries to the boot page. The APs aren't part of the coherency domain just yet. 3. Set pmap_bootstrapped after calling pmap_bootstrap(). The FDT code now maps the devices (like OF), and this resulted in a panic. 4. Since we pre-wire the CCSR, make sure not to map chunks of it in pmap_mapdev().
* Work around broken device tree on last-generation PowerPC iMacsnwhitehorn2012-10-291-0/+4
| | | | | | | | | (PowerMac12,1), which have a mac-io MPIC cell that indifies itself as the root PIC despite the actual root PIC being on the northbridge. No CPC945 systems have a mac-io PIC that does anything so just don't attach on CPC945 (U4) systems. MFC after: 3 days
* Remove compat options.rpaulo2012-10-231-4/+0
| | | | Submitted by: netchild
* Fix the memory regions to include the 64MB DDR3 memory slot.rpaulo2012-10-221-6/+14
|
* Increase the I/O memory area to 0xc20000.rpaulo2012-10-221-1/+1
|
* Fix the top comment.rpaulo2012-10-211-1/+1
|
* Add a config file for the Wii.rpaulo2012-10-211-0/+115
|
* Add "options WII".rpaulo2012-10-211-0/+1
|
* Eliminate a stale comment. It describes another use case for the pmap inalc2012-09-282-10/+0
| | | | Mach that doesn't exist in FreeBSD.
* Move the prototype for savectx from cpu.h to pcb.h, as it is on othernwhitehorn2012-09-232-3/+1
| | | | | | platforms, as well as putting it in an #ifdef KERNEL block. MFC after: 2 weeks
* Remove leftover from r215163.andreast2012-09-211-1/+0
|
* Align the PCI Express #defines with the style used for the PCI-Xgavin2012-09-181-6/+6
| | | | | | | | | | | | | | | | | #defines. This also has the advantage that it makes the names more compact, iand also allows us to correct the non-uniform naming of the PCIM_LINK_* defines, making them all consistent amongst themselves. This is a mostly mechanical rename: s/PCIR_EXPRESS_/PCIER_/g s/PCIM_EXP_/PCIEM_/g s/PCIM_LINK_/PCIEM_LINK_/g When this is MFC'd, #defines will be added for the old names to assist out-of-tree drivers. Discussed with: jhb MFC after: 1 week
* userret() already checks for td_locks when INVARIANTS is enabled, soattilio2012-09-082-2/+0
| | | | | | | there is no need to check if Giant is acquired after it. Reviewed by: kib MFC after: 1 week
* Add IRQ support to the resource list handling functions.rpaulo2012-09-081-3/+7
|
* Unbreak tinderbox.rpaulo2012-08-251-1/+4
|
* Set mdp only under #ifdef WII.rpaulo2012-08-251-0/+3
|
* phandle_t is unsigned, and OF_finddevice() returns (phandle_t)(-1) onjhibbits2012-08-212-3/+3
| | | | | | | | | failure, so check for that instead of 0. While here, provide a better description for ATI backlight driver. Reported by: jchandra@ MFC after: 3 days
* On Nintendo Wii CPUs, the mdp value will be garbage. Set it to NULLadrian2012-08-212-1/+10
| | | | | | so as to not confuse things. Submitted by: Margarida Gouveia
* Don't probe the openfirmware framebuffer if the system is a Wii or itadrian2012-08-211-0/+6
| | | | | | will crash. Submitted by: Margarida Gouveia
* Initial support for running FreeBSD on the Nintendo Wii. We're able toadrian2012-08-2112-0/+2973
| | | | | | | | | | | | | | | | | | | reach single user mode using a memory disk device as the file system. This port includes the framebuffer driver, the PIC driver, a platform driver and the GPIO driver. The IPC driver (to talk to IOS kernels) is not yet written but there's a placeholder for it. There are still some MMU problems and to get a working system you need to patch locore32.S. Since we haven't found the best way yet to address that problem, we're not committing those changes yet. The problem is related to the different BAT layout on the Wii and to the fact that the Homebrew loader doesn't clean up the special registers (including the 8 BATs) before passing control to us. You'll need a Wii with Homebrew loader and a TV that can do NTSC (for now). Submitted by: Margarida Gouveia
* Add the ds1631 temperature driver.andreast2012-08-193-0/+3
|
* Add backlight support for nVidia-based PowerBooks/iBooks/iMacs.jhibbits2012-08-043-0/+199
| | | | | Approved by: nwhitehorn (mentor) MFC after: 9.1-RELEASE
* Improve the handling of static DMA buffers that use non-default memoryjhb2012-08-031-19/+20
| | | | | | | | | | | | | | | | | | | | | | attributes (currently just BUS_DMA_NOCACHE): - Don't call pmap_change_attr() on the returned address, instead use kmem_alloc_contig() to ask the VM system for memory with the requested attribute. - As a result, always use kmem_alloc_contig() for non-default memory attributes, even for sub-page allocations. This requires adjusting bus_dmamem_free()'s logic for determining which free routine to use. - For x86, add a new dummy bus_dmamap that is used for static DMA buffers allocated via kmem_alloc_contig(). bus_dmamem_free() can then use the map pointer to determine which free routine to use. - For powerpc, add a new flag to the allocated map (bus_dmamem_alloc() always creates a real map on powerpc) to indicate which free routine should be used. Note that the BUS_DMA_NOCACHE handling in powerpc is currently #ifdef'd out. I have left it disabled but updated it to match x86. Reviewed by: scottl MFC after: 1 month
* Avoid recursion on the pvh global lock in the aim oea pmap.alc2012-07-104-16/+28
| | | | | | | Correct the return type of the pmap_ts_referenced() implementations. Reported by: jhibbits [1] Tested by: andreast
* Replace all uses of the vm page queues lock by a r/w lock that is privatealc2012-07-061-29/+46
| | | | | | to this pmap. Tested by: andreast, jhibbits
* Support lbc interrupts:marcel2012-07-032-34/+108
| | | | | | | | | | | | | | | | | o Save and clear the LTESR register in the interrupt handler. o In lbc_read_reg(), return the saved LTESR register value if applicable (i.e. when the saved value is not invalid (read: ~0U)). o In lbc_write_reg(), clear the bits in the saved register when when it's written to and when the asved value is not invalid. o Also in lbc_write_reg(), the LTESR register is unlocked (in H/W) when bit 1 of LTEATR is cleared. We use this to invalidate our saved LTESR register value. Subsequent reads and write go to H/W directly. While here: o In lbc_read_reg() & lbc_write_reg(), add some belts and suspenders to catch when register offsets are out of range. o In lbc_attach(), initialize completely and don't leave something left for lbc_banks_enable().
* Properly implement the bus_config_intr, bus_setup_intr and bus_teardown_intrmarcel2012-07-021-2/+58
| | | | | | methods so that MI drvers can depend on us doing the right thing instead of having to go around us and call MD code directly. See the FDT code for example (not for long though).
* Remove device uart_z8530 and options GEOM_PART_APM from DEFAULTS and insteadmarcel2012-07-023-2/+4
| | | | | add them to GENERIC and GENERIC64. They are applicable to Apple H/W and not at all for Book-E platforms.
* Fix a typo that resulted in or-ing PTE_UW twice whrn PTE_SW was needed.marcel2012-07-021-1/+1
| | | | | | Note that setting the PTE_MODIFIED bit based on whether write is possible is incorrect. We should set PTE_MODIFIED based on whether the access is a write operation.
* Handle traps from the debugger. We need to catch them and re-entermarcel2012-07-021-0/+7
| | | | the debugger where they're being taken care of.
* Invalidate any TLB1 entries we don't need. The firmware (e.g. U-Boot)marcel2012-07-021-0/+4
| | | | may have added entries that conflict with TLB0 entries.
* Implement cpu_flush_dcache(). This allows us to optimize __syncicache()marcel2012-07-021-1/+18
| | | | for the common case in chich D-caches are coherent by virtue of busdma.
* Remove bogus __unused attribute from hrowpic_eoi().rpaulo2012-07-011-1/+1
|
* Now that the mps(4) driver is endian-safe, add it to the powerpc 32-bitken2012-07-011-0/+1
| | | | | | | GENERIC config file. MFC after: 3 days Reqested by: nwhitehorn
OpenPOWER on IntegriCloud