summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/booke/platform_bare.c
Commit message (Collapse)AuthorAgeFilesLines
* Rearchitect platform memory map parsing to make it lessnwhitehorn2013-12-011-4/+4
| | | | | | | | | | Open Firmware-centric: - Keep the static list of regions in platform.c instead of ofw_machdep.c - Move various merging and sorting operations to platform.c as well - Move apple_hacks code out of ofw_machdep.c and into platform_powermac.c, where it belongs - Move CHRP-specific dynamic-reconfiguration memory parsing into platform_chrp.c instead of pretending it is shared code
* Rename the "bare" platform "mpc85xx", which is what it actually is, andnwhitehorn2013-11-111-214/+9
| | | | | | | | | add actual platform probing based on PVR. Still needs a little more work: in particular, the CCRS setup should move here. Also turn "bare" into a truly bare platform that doesn't pretend to know how to do anything except get the memory map. This should also be enhanced to process the FDT reserved memory list, but that is for another day.
* A quick addendum: the standard says that timebase-frequency can be eithernwhitehorn2013-10-231-3/+18
| | | | 32 or 64 bits, so allow either.
* If the device tree directly contains the timebase frequency, use it. Thisnwhitehorn2013-10-231-0/+4
| | | | | | | property is required by ePAPR, but maintain the fallback to bus-frequency for compatibility. MFC after: 2 weeks
* Introduce PLATFORMMETHOD_END and use it.rpaulo2013-02-131-1/+1
|
* 1. Have the APs initialize the TLB1 entries from what has beenmarcel2012-11-031-9/+31
| | | | | | | | | | | | | | 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().
* Panic openly if we cannot retrieve memory information from the device tree.raj2012-05-301-3/+3
| | | | | | | | This is a critical condition and can lead to all sorts of misterious hangs if not handled. Obtained from: Semihalf Also reported by: thompsa
* Retrieve CPU number info from the device tree.raj2012-05-261-18/+8
| | | | Obtained from: Freescale, Semihalf.
* Rename e500 prefix to match other Book-E CPU variations. CPU id tidbits forraj2012-05-261-4/+5
| | | | | | the new cores. Obtained from: Freescale, Semihalf.
* o Rename kernload_ap to bp_kernelload. This to introduce a common prefixmarcel2012-05-241-4/+16
| | | | | | | | | | | | | | | | for variables that live in the boot page. o Add bp_trace (yes, it's in the boot page) that gets zeroed before we try to wake a core and to which the core being woken can write markers so that we know where the core was in case it doesn't wake up. The boot code does not yet write markers (too follow). o Disable the boot page translation to allow the last 4K page to be used for whatever we please. It would get mapped otherwise. o Fix kernstart in the case of SMP. The start argument is typically page aligned due to the alignment requirements that come with having a boot page. The point of using trunc_page is that we get the actual load address given that the entry point is immediately following the ELF headers. In the SMP case this ended up exactly 4K after the load address. Hence subtracting 1 from start.
* Fix OF_finddevice error return value in case of FDT.jchandra2011-12-021-1/+1
| | | | | | | | | | | | | | | | | | | According to the open firmware standard, finddevice call has to return a phandle with value of -1 in case of error. This commit is to: - Fix the FDT implementation of this interface (ofw_fdt_finddevice) to return (phandle_t)-1 in case of error, instead of 0 as it does now. - Fix up the callers of OF_finddevice() to compare the return value with -1 instead of 0 to check for errors. - Since phandle_t is unsigned, the return value of OF_finddevice should be checked with '== -1' rather than '<= 0' or '> 0', fix up these cases as well. Reported by: nwhitehorn Reviewed by: raj Approved by: raj, nwhitehorn
* Cross a T and dot an I:marcel2011-08-021-2/+3
| | | | | | | | | | o Fix awkward use of braces in combination with mis-indentation. A mistake, that happened to yield the right behaviour? o Fix typo in comment. No functional change. Approved by: re (blanket)
* Add support for Juniper's loader. The difference between FreeBSD's andmarcel2011-08-021-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Juniper's loader is that Juniper's loader maps all of the kernel and preloaded modules at the right virtual address before jumping into the kernel. FreeBSD's loader simply maps 16MB using the physical address and expects the kernel to jump through hoops to relocate itself to it's virtual address. The problem with the FreeBSD loader's approach is that it typically maps too much or too little. There's no harm if it's too much (other than wasting space), but if it's too little then the kernel will simply not boot, because the first thing the kernel needs is the bootinfo structure, which is never mapped in that case. The page fault that early is fatal. The changes constitute: 1. Do not remap the kernel in locore.S. We're mapped where we need to be so we can pretty much call into C code after setting up the stack. 2. With kernload and kernload_ap not set in locore.S, we need to set them in pmap.c: kernload gets defined when we preserve the TLB1. Here we also determine the size of the kernel mapped. kernload_ap is set first thing in the pmap_bootstrap() method. 3. Fix tlb1_map_region() and its use to properly externd the mapped kernel size to include low-level data structures. Approved by: re (blanket) Obtained from: Juniper Networks, Inc
* MFCattilio2011-05-291-20/+31
|\
| * o The P1020(E) & P2020(E) also have two cores. This conditional hasmarcel2011-05-271-18/+20
| | | | | | | | | | | | | | | | | | | | a tendency to grow unwieldy so we may want to revisit this in due time. o Simplify the CPU reset function by writing to the reset control register irrespective of whether the CPU has one and automatically falling back to the debug control register if we didn't reset the CPU. The side-effect is that we now properly reset future processors without first having to add the system version to the list.
* | MFCattilio2011-05-271-2/+5
|\ \ | |/
| * Don't assume we have a valid bootinfo pointer.marcel2011-05-261-2/+5
| |
| * Revert r222069,222068 as they were intended to be committed to theattilio2011-05-181-3/+2
| | | | | | | | | | | | largeSMP branch. Reported by: pluknet
| * Fix newly introduced code.attilio2011-05-181-2/+3
| | | | | | | | Reported by: sbruno
* | Fix usage of cpumask that cannot be used like that anymore.attilio2011-05-181-2/+2
|/ | | | Reported by: pluknet
* Support booting non FDT-capable loaders:marcel2011-01-171-2/+11
| | | | | | 1. Allow embedding the FDT into the kernel, just like PowerPC/book-E. 2. If the loader passes us a pointer to the bootinfo structure, save it and use it to fill in the gaps (e.g. bus frequencies, etc).
* Update PowerPC event timer code to use new event timers infrastructure.mav2010-09-111-1/+1
| | | | | | Reviewed by: nwitehorn Tested by: andreast H/W donated by: Gheorghe Ardelean
* Restructure how reset and poweroff are handled on PowerPC systems, sincenwhitehorn2010-08-311-0/+31
| | | | | | | | | | | | | | | | | the existing code was very platform specific, and broken for SMP systems trying to reboot from KDB. - Add a new PLATFORM_RESET() method to the platform KOBJ interface, and migrate existing reset functions into platform modules. - Modify the OF_reboot() routine to submit the request by hand to avoid the IPIs involved in the regular openfirmware() routine. This fixes reboot from KDB on SMP machines. - Move non-KDB reset and poweroff functions on the Powermac platform into the relevant power control drivers (cuda, pmu, smu), instead of using them through the Open Firmware backdoor. - Rename platform_chrp to platform_powermac since it has become increasingly Powermac specific. When we gain support for IBM systems, we will grow a new platform_chrp.
* Convert Freescale PowerPC platforms to FDT convention.raj2010-07-111-19/+50
| | | | | | | | | | | | | | | | | | | | | | | | | The following systems are affected: - MPC8555CDS - MPC8572DS This overhaul covers the following major changes: - All integrated peripherals drivers for Freescale MPC85XX SoC, which are currently in the FreeBSD source tree are reworked and adjusted so they derive config data out of the device tree blob (instead of hard coded / tabelarized values). - This includes: LBC, PCI / PCI-Express, I2C, DS1553, OpenPIC, TSEC, SEC, QUICC, UART, CFI. - Thanks to the common FDT infrastrucutre (fdtbus, simplebus) we retire ocpbus(4) driver, which was based on hard-coded config data. Note that world for these platforms has to be built WITH_FDT. Reviewed by: imp Sponsored by: The FreeBSD Foundation
* Discover and handle the number of E500 CPUs in run time.raj2009-06-051-2/+9
|
* Initial support for SMP on PowerPC MPC85xx.raj2009-05-211-0/+39
| | | | | | Tested with Freescale dual-core MPC8572DS development system. Obtained from: Freescale, Semihalf
* Factor out platform dependent things unrelated to device drivers into anwhitehorn2009-05-141-0/+185
new platform module. These are probed in early boot, and have the responsibility of determining the layout of physical memory, determining the CPU timebase frequency, and handling the zoo of SMP mechanisms found on PowerPC. Reviewed by: marcel, raj Book-E parts by: raj
OpenPOWER on IntegriCloud