#
330446 |
|
05-Mar-2018 |
eadler |
MFC r327231,r327232:
kernel: Fix several typos and minor errors lib: Fix several typos and minor errors
- duplicate words - typos - references to old versions of FreeBSD
|
#
310440 |
|
22-Dec-2016 |
jhibbits |
MFC r304047,r304068:
r304047: Add ePAPR boot support for PowerPC book-E (MPC85xx) hardware r304068: Only flush bp_kernload from the dcache, no need to sync the icache on the boot CPU.
|
#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
298237 |
|
18-Apr-2016 |
jhibbits |
Fix SMP booting for PowerPC Book-E
Summary: PowerPC Book-E SMP is currently broken for unknown reasons. Pull in Semihalf changes made c2012 for e500mc/e5500, which enables booting SMP.
This eliminates the shared software TLB1 table, replacing it with tlb1_read_entry() function.
This does not yet support ePAPR SMP booting, and doesn't handle resetting CPUs already released (ePAPR boot releases APs to a spin loop waiting on a specific address). This will be addressed in the near future by using the MPIC to reset the AP into our own alternate boot address.
This does include a change to the dpaa/dtsec(4) driver, to mark the portals as CPU-private.
Test Plan: Tested on Amiga X5000/20 (P5020). Boots, prints the following messages:
Adding CPU 0, pir=0, awake=1 Waking up CPU 1 (dev=1) Adding CPU 1, pir=20, awake=1 SMP: AP CPU #1 launched
top(1) shows CPU1 active.
Obtained from: Semihalf Relnotes: Yes Differential Revision: https://reviews.freebsd.org/D5945
|
#
293641 |
|
10-Jan-2016 |
nwhitehorn |
Remove dead code and dead comments, most notably the implemenation of the now-obsolete setfault(). No NetBSD code exists in the AIM locore files, so update the copyrights there.
|
#
292903 |
|
30-Dec-2015 |
jhibbits |
Add platform support for QorIQ SoCs.
This includes the following changes: * SMP kickoff for QorIQ (tested on P5020) * Errata fixes for some silicon revisions * Enables L2 (and L3 if available) caches Obtained from: Semihalf Sponsored by: Alex Perez/Inertial Computing
|
#
292900 |
|
30-Dec-2015 |
jhibbits |
Rewrite tid_flush() in C.
There's no need for it to be in asm. Also, by writing in C, and marking it static in pmap.c, it saves a branch to the function itself, as it's only used in one location. The generated asm is virtually identical to the handwritten code.
|
#
286977 |
|
21-Aug-2015 |
jhibbits |
Add initial boot support for e500mc and e5500.
* Since r257190 the kernel must actually be loaded at a 64MB boundary, not 16MB. * Don't program HID1 register on e500mc or e5500, they don't have this SPR. * Set proper HID0 defaults for these new architectures.
There is still more work to be done for the various SoCs, and the PMAP code still needs to be extended to 36-bit paddr, coming soon.
Obtained from: Semihalf Sponsored by: Alex Perez/Inertial Computing
|
#
286917 |
|
19-Aug-2015 |
jhibbits |
Fix copy&paste.
|
#
286916 |
|
19-Aug-2015 |
jhibbits |
Save the registers at the correct offsets.
When merging the AIM and BookE trap.c files, the offsets for BookE's setfault inadvertantly got munged.
|
#
281713 |
|
18-Apr-2015 |
jhibbits |
Implement hwpmc(4) for Freescale e500 core.
This supports e500v1, e500v2, and e500mc. Tested only on e500v2, but the performance counters are identical across all, with e500mc having some additional events.
Relnotes: Yes
|
#
281242 |
|
07-Apr-2015 |
jhibbits |
Unbreak book-e, broken by the trap.c merge (missed this file).
|
#
279750 |
|
07-Mar-2015 |
nwhitehorn |
Make 32-bit PowerPC kernels, like 64-bit PowerPC kernels, position-independent executables. The goal here, not yet accomplished, is to let the e500 kernel run under QEMU by setting KERNBASE to something that fits in low memory and then having the kernel relocate itself at runtime.
|
#
279623 |
|
05-Mar-2015 |
nwhitehorn |
Move IVOR setup from assembler to C, decreasing required assumptions about address formats for trap handlers.
|
#
277334 |
|
18-Jan-2015 |
nwhitehorn |
Refactor PowerPC (especially AIM) init sequence to be less baroque.
MFC after: 2 months
|
#
258002 |
|
11-Nov-2013 |
nwhitehorn |
Follow up r223485, which made AIM use the ABI thread pointer instead of PCPU fields for curthread, by doing the same to Book-E. This closes some potential races switching between CPUs. As a side effect, it turns out the AIM and Book-E swtch.S implementations were the same to within a few registers, so move that to powerpc/powerpc.
MFC after: 3 months
|
#
257190 |
|
26-Oct-2013 |
nwhitehorn |
Bump initial TLB size. The kernel is not necessarily less than 16 MB any more.
|
#
242526 |
|
03-Nov-2012 |
marcel |
1. Have the APs initialize the TLB1 entries from what has been 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().
|
#
236141 |
|
27-May-2012 |
raj |
Let us manage differences of Book-E PowerPC variations i.e. vendor / implementation specific vs. the common architecture definition.
Bring PPC4XX defines (PSL, SPR, TLB). Note the new definitions under BOOKE_PPC4XX are not used in the code yet.
This change set is not supposed to affect existing E500 support, it's just another reorg step before bringing support for E500mc, E5500 and PPC465.
Obtained from: AppliedMicro, Freescale, Semihalf
|
#
235932 |
|
24-May-2012 |
marcel |
o Rename kernload_ap to bp_kernelload. This to introduce a common prefix 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.
|
#
224617 |
|
02-Aug-2011 |
marcel |
It's invalid to use GLOBAL() for kernload_ap, as the macro switches to the .data section. We need kernload_ap in the boot page.
Approved by: re (blanket)
|
#
224616 |
|
02-Aug-2011 |
marcel |
There's no ':' after GLOBAL(). Missed due to no SMP testing.
Approved by: re (blanket)
|
#
224611 |
|
02-Aug-2011 |
marcel |
Add support for Juniper's loader. The difference between FreeBSD's and 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
|
#
224551 |
|
31-Jul-2011 |
marcel |
Fix r224187: .word defines a 16-bit object and size_t is defined as a 32-bit intergal. Use .long to define sintrcnt and sintrname.
Approved by: re (blanket)
|
#
224187 |
|
18-Jul-2011 |
attilio |
- Remove the eintrcnt/eintrnames usage and introduce the concept of sintrcnt/sintrnames which are symbols containing the size of the 2 tables. - For amd64/i386 remove the storage of intr* stuff from assembly files. This area can be widely improved by applying the same to other architectures and likely finding an unified approach among them and move the whole code to be MI. More work in this area is expected to happen fairly soon.
No MFC is previewed for this patch.
Tested by: pluknet Reviewed by: jhb Approved by: re (kib)
|
#
222400 |
|
28-May-2011 |
marcel |
Better support different kernel hand-offs. When loaded directly from U-Boot, the kernel is passed a standard argc/argv pair. The Juniper loader passes the metadata pointer as the second argument and passes 0 in the first. The FreeBSD loader passes the metadata pointer in the first argument.
As such, have locore preserve the first 2 arguments in registers r30 & r31. Change e500_init() to accept these arguments. Don't pass global offsets (i.e. kernel_text and _end) as arguments to e500_init(). We can reference those directly.
Rename e500_init() to booke_init() now that we're changing the prototype.
In booke_init(), "decode" arg1 and arg2 to obtain the metadata pointer correctly. For the U-Boot case, clear SBSS and BSS and bank on having a static FDT for now. This allows loading the ELF kernel and jumping to the entry point without trampoline.
|
#
222391 |
|
27-May-2011 |
marcel |
Wire the kernel using TLB1 entry 0 rather than entry 1. A more recent U-Boot as found on the P1020RDB doesn't like it when we use entry 1 (for some reason) whereas an older U-Boot doesn't mind if we use entry 0. If anything else, this simplifies the code a bit.
|
#
215052 |
|
09-Nov-2010 |
jhb |
Remove unused includes of <sys/mutex.h> and <machine/mutex.h>.
|
#
209975 |
|
13-Jul-2010 |
nwhitehorn |
MFppc64:
Kernel sources for 64-bit PowerPC, along with build-system changes to keep 32-bit kernels compiling (build system changes for 64-bit kernels are coming later). Existing 32-bit PowerPC kernel configurations must be updated after this change to specify their architecture.
|
#
209908 |
|
11-Jul-2010 |
raj |
Convert Freescale PowerPC platforms to FDT convention.
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
|
#
192533 |
|
21-May-2009 |
raj |
Improve style(9), clean up.
|
#
192532 |
|
21-May-2009 |
raj |
Initial support for SMP on PowerPC MPC85xx.
Tested with Freescale dual-core MPC8572DS development system.
Obtained from: Freescale, Semihalf
|
#
191375 |
|
22-Apr-2009 |
raj |
Centralize setting HID0/1 for E500. Rename HID defines which are specific to E500 rather than shared within Book-E family.
Obtained from: Freescale, Semihalf
|
#
187149 |
|
13-Jan-2009 |
raj |
Rework BookE pmap towards multi-core support.
o Eliminate tlb0[] (a s/w copy of TLB0) - The table contents cannot be maintained reliably in multiple MMU environments, where asynchronous events (invalidations from other cores) can change our local TLB0 contents underneath. - Simplify and optimize TLB flushing: system wide invalidations are performed using tlbivax instruction (propagates to other cores), for local MMU invalidations a new optimized routine (assembly) is introduced.
o Improve and simplify TID allocation and management. - Let each core keep track of its TID allocations. - Simplify TID recycling, eliminate dead code. - Drop the now unused powerpc/booke/support.S file.
o Improve page tables management logic.
o Simplify TLB1 manipulation routines.
o Other improvements and polishing.
Obtained from: Freescale, Semihalf
|
#
186289 |
|
18-Dec-2008 |
raj |
Minor spelling fix in E500 locore.
|
#
186230 |
|
17-Dec-2008 |
raj |
Fix E500 cache invalidation routines.
When invalidating the i/d-cache we need to wait until the core complex is really finished with the operation.
Obtained from: Semihalf
|
#
186229 |
|
17-Dec-2008 |
raj |
Rework E500 locore.
- split bootstrap code into more modular routines, which will also be used for the non-booting cores - clean up registers usage - improve comments to better reflect reality - eliminate dead or redundant code - other minor fixes
This refactoring is a preliminary step before importing dual-core (MPC8572) support.
Obtained from: Freescale, Semihalf
|
#
184319 |
|
27-Oct-2008 |
marcel |
Add support for kernel profiling for both AIM and BookE.
Obtained from: Juniper Networks, Inc (BookE support).
|
#
182198 |
|
26-Aug-2008 |
raj |
Improve kernel stack handling on e500.
- Allocate thread0.td_kstack in pmap_bootstrap(), provide guard page - Switch to thread0.td_kstack as soon as possible i.e. right after return from e500_init() and before mi_startup() happens - Clean up temp stack area - Other minor cosmetics in machdep.c
Obtained from: Semihalf
|
#
176771 |
|
03-Mar-2008 |
raj |
Initial support for Freescale PowerQUICC III MPC85xx system-on-chip family.
The PQ3 is a high performance integrated communications processing system based on the e500 core, which is an embedded RISC processor that implements the 32-bit Book E definition of the PowerPC architecture. For details refer to: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPC8555E
This port was tested and successfully run on the following members of the PQ3 family: MPC8533, MPC8541, MPC8548, MPC8555.
The following major integrated peripherals are supported:
* On-chip peripherals bus * OpenPIC interrupt controller * UART * Ethernet (TSEC) * Host/PCI bridge * QUICC engine (SCC functionality)
This commit brings the main functionality and will be followed by individual drivers that are logically separate from this base.
Approved by: cognet (mentor) Obtained from: Juniper, Semihalf MFp4: e500
|