History log of /freebsd-current/sys/powerpc/ofw/ofwcall64.S
Revision Date Author Comments
# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 78599c32 04-Dec-2020 Conrad Meyer <cem@FreeBSD.org>

Add CFI start/end proc directives to arm64, i386, and ppc

Follow-up to r353959 and r368070: do the same for other architectures.

arm32 already seems to use its own .fnstart/.fnend directives, which
appear to be ARM-specific variants of the same thing. Likewise, MIPS
uses .frame directives.

Reviewed by: arichardson
Differential Revision: https://reviews.freebsd.org/D27387


# d20d17f6 22-Sep-2020 Brandon Bergren <bdragon@FreeBSD.org>

[PowerPC64LE] Fix RTAS LE calls in pseries.

Similar to OPAL calls, switch to big endian to do calls to RTAS.

(Missed this one when I was doing the bulk commit of PowerPC64LE support.)

Sponsored by: Tag1 Consulting, Inc.


# 4efb1ca7 22-Sep-2020 Brandon Bergren <bdragon@FreeBSD.org>

[PowerPC64LE] Work around qemu TCG bug in mtmsrd emulation.

The TCG implementation of mtmsrd in qemu blindly copies the entire register
to the MSR, instead of the specific bit positions listed in the ISA.

This means that qemu will prematurely switch endian out from under the
running code instead of waiting for the rfid, causing an immediate trap
as it attempts to interpret the next instruction in the wrong endianness.

To work around this, ensure PSL_LE is still set before doing the mtmsrd.

In the future, we may wish to just turn off translation and unconditionally
use rfid to switch to the ofmsr instead of quasi-switching to the ofmsr.

Add a new platform option so this can be disabled. (And so that we can
conditonalize additional QEMU-specific hacks in the platform code.)

Sponsored by: Tag1 Consulting, Inc.


# a6625592 22-Sep-2020 Brandon Bergren <bdragon@FreeBSD.org>

[PowerPC64LE] LE bringup work: locore / machdep / platform

This is the initial LE changes required in the machdep code to get as far
as platform attachment on qemu pseries.

Sponsored by: Tag1 Consulting, Inc.


# 0499e9c6 28-Mar-2019 Justin Hibbits <jhibbits@FreeBSD.org>

powerpc64: Use medium code model in asm files for TOC references

Summary:
With a sufficiently large TOC, it's possible to index out of range, as
the immediate load instructions only permit 16-bit indices, allowing up
to 64kB range (signed) from the base pointer. Allow +/- 2GB range, with
the medium code model TOC accesses in asm.

Patch originally by Brandon Bergren. The issue appears to impact ELFv2
more than ELFv1.

Reviewed by: luporl
Differential Revision: https://reviews.freebsd.org/D19708


# 8864f359 13-Mar-2018 Nathan Whitehorn <nwhitehorn@FreeBSD.org>

Execute PowerPC64/AIM kernel from direct map region when possible.

When the kernel can be in real mode in early boot, we can execute from
high addresses aliased to the kernel's physical memory. If that high
address has the first two bits set to 1 (0xc...), those addresses will
automatically become part of the direct map. This reduces page table
pressure from the kernel and it sets up the kernel to be used with
radix translation, for which it has to be up here.

This is accomplished by exploiting the fact that all PowerPC kernels are
built as position-independent executables and relocate themselves
on start. Before this patch, the kernel runs at 1:1 VA:PA, but that
VA/PA is random and set by the bootloader. Very early, it processes
its ELF relocations to operate wherever it happens to find itself.
This patch uses that mechanism to re-enter and re-relocate the kernel
a second time witha new base address set up in the early parts of
powerpc_init().

Reviewed by: jhibbits
Differential Revision: D14647


# 9cecb88c 18-Jan-2015 Nathan Whitehorn <nwhitehorn@FreeBSD.org>

Use TOC to look up all kernel globals on powerpc64 instead of doing the
non-relocatable lis @ha, ori @l dance and hoping they are below 4 GB.

MFC after: 2 months


# 9eab2f14 20-Jan-2012 Andreas Tobler <andreast@FreeBSD.org>

This commit adds profiling support for powerpc64. Now we can do application
profiling and kernel profiling. To enable kernel profiling one has to build
kgmon(8). I will enable the build once I managed to build and test powerpc
(32-bit) kernels with profiling support.

- add a powerpc64 PROF_PROLOGUE for _mcount.
- add macros to avoid adding the PROF_PROLOGUE in certain assembly entries.
- apply these macros where needed.
- add size information to the MCOUNT function.

MFC after: 3 weeks, together with r230291


# 17879090 02-Jun-2011 Nathan Whitehorn <nwhitehorn@FreeBSD.org>

MFpseries:
Renovate and improve the AIM Open Firmware support:
- Add RTAS (Run-Time Abstraction Services) support, found on all IBM systems
and some Apple ones
- Improve support for 32-bit real mode Open Firmware systems
- Pull some more OF bits over from the AIM directory
- Fix memory detection on IBM LPARs and systems with more than one /memory
node (by andreast@)