History log of /kvm-unit-tests/lib/powerpc/processor.c (Results 1 – 15 of 15)
Revision Date Author Comments
# 93c847c1 12-Jun-2024 Nicholas Piggin <npiggin@gmail.com>

powerpc: add usermode support

The biggest difficulty for user mode is MMU support. Otherwise it is
a simple matter of setting and clearing MSR[PR] with rfid and sc
respectively.

Some common harness

powerpc: add usermode support

The biggest difficulty for user mode is MMU support. Otherwise it is
a simple matter of setting and clearing MSR[PR] with rfid and sc
respectively.

Some common harness operations will fail in usermode, so some workarounds
are reqiured (e.g., puts() can't be used directly).

A usermode privileged instruction interrupt test is added.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-ID: <20240612052322.218726-8-npiggin@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# d4c8e725 12-Jun-2024 Nicholas Piggin <npiggin@gmail.com>

powerpc: Add MMU support

Add support for radix MMU, 4kB and 64kB pages.

This also adds MMU interrupt test cases, and runs the interrupts
test entirely with MMU enabled if it is available (aside fro

powerpc: Add MMU support

Add support for radix MMU, 4kB and 64kB pages.

This also adds MMU interrupt test cases, and runs the interrupts
test entirely with MMU enabled if it is available (aside from
machine check tests).

Acked-by: Andrew Jones <andrew.jones@linux.dev> (configure changes)
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-ID: <20240612052322.218726-5-npiggin@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# c76b0d0a 04-May-2024 Nicholas Piggin <npiggin@gmail.com>

powerpc: add SMP and IPI support

powerpc SMP support is very primitive and does not set up a first-class
runtime environment for secondary CPUs.

This reworks SMP support, and provides a complete C

powerpc: add SMP and IPI support

powerpc SMP support is very primitive and does not set up a first-class
runtime environment for secondary CPUs.

This reworks SMP support, and provides a complete C and harness
environment for the secondaries, including interrupt handling, as well
as IPI support.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-ID: <20240504122841.1177683-17-npiggin@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# 610c5a9c 04-May-2024 Nicholas Piggin <npiggin@gmail.com>

powerpc: Support powernv machine with QEMU TCG

Add support for QEMU's powernv machine. This uses standard firmware
(skiboot) rather than a minimal firmware shim.

Reviewed-by: Cédric Le Goater <clg@

powerpc: Support powernv machine with QEMU TCG

Add support for QEMU's powernv machine. This uses standard firmware
(skiboot) rather than a minimal firmware shim.

Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-ID: <20240504122841.1177683-10-npiggin@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# ac6e1abf 05-Apr-2024 Nicholas Piggin <npiggin@gmail.com>

powerpc: interrupt stack backtracing

Add support for backtracing across interrupt stacks, and add
interrupt frame backtrace for unhandled interrupts.

This requires a back-chain created from initial

powerpc: interrupt stack backtracing

Add support for backtracing across interrupt stacks, and add
interrupt frame backtrace for unhandled interrupts.

This requires a back-chain created from initial interrupt stack
frame to the r1 value of the interrupted context. A label is
added at the return location of the exception handler call, so
the unwinder can recognize the initial interrupt frame.

The additional cstart entry-frame is no longer required because
the unwinder now looks for frame == 0 as well as address == 0.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-ID: <20240405083539.374995-11-npiggin@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# 8b10d4fa 26-Feb-2024 Nicholas Piggin <npiggin@gmail.com>

powerpc: add asm/time.h header with delay and get_clock_us/ms

This matches s390x clock and delay APIs, so common test code can start
using time facilities.

Signed-off-by: Nicholas Piggin <npiggin@g

powerpc: add asm/time.h header with delay and get_clock_us/ms

This matches s390x clock and delay APIs, so common test code can start
using time facilities.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-ID: <20240226093832.1468383-5-npiggin@gmail.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# 8791cea0 16-Dec-2023 Nicholas Piggin <npiggin@gmail.com>

powerpc: Make interrupt handler error more readable

Installing the same handler twice reports a shifted trap vector
address which is hard to decipher. Print the unshifted address.

Signed-off-by: Ni

powerpc: Make interrupt handler error more readable

Installing the same handler twice reports a shifted trap vector
address which is hard to decipher. Print the unshifted address.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-ID: <20231216134257.1743345-14-npiggin@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# 0ec01e27 16-Dec-2023 Nicholas Piggin <npiggin@gmail.com>

powerpc: Expand exception handler vector granularity

Exception handlers are currently indexed in units of 0x100, but
powerpc can have vectors that are aligned to as little as 0x20
bytes. Increase gr

powerpc: Expand exception handler vector granularity

Exception handlers are currently indexed in units of 0x100, but
powerpc can have vectors that are aligned to as little as 0x20
bytes. Increase granularity of the handler functions before
adding support for those vectors.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-ID: <20231216134257.1743345-15-npiggin@gmail.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# ba33a96f 08-Jun-2023 Nicholas Piggin <npiggin@gmail.com>

powerpc: Abstract H_CEDE calls into a sleep functions

This consolidates several implementations, and it no longer leaves
MSR[EE] enabled after the decrementer interrupt is handled, but
rather disabl

powerpc: Abstract H_CEDE calls into a sleep functions

This consolidates several implementations, and it no longer leaves
MSR[EE] enabled after the decrementer interrupt is handled, but
rather disables it on return.

The handler no longer allows a continuous ticking, but rather dec
has to be re-armed and EE re-enabled (e.g., via H_CEDE hcall) each
time.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-Id: <20230608075826.86217-4-npiggin@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# 5d571097 08-Jun-2023 Nicholas Piggin <npiggin@gmail.com>

powerpc: Add some checking to exception handler install

Check to ensure exception handlers are not being overwritten or
invalid exception numbers are used.

Signed-off-by: Nicholas Piggin <npiggin@g

powerpc: Add some checking to exception handler install

Check to ensure exception handlers are not being overwritten or
invalid exception numbers are used.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230608075826.86217-3-npiggin@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# 8e458b76 08-Jun-2023 Nicholas Piggin <npiggin@gmail.com>

powerpc: Report instruction address and MSR in unhandled exception error

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-Id: <20230608075826.86217-2-npiggin@gmail.com>
Signed-off-by: Thom

powerpc: Report instruction address and MSR in unhandled exception error

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-Id: <20230608075826.86217-2-npiggin@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


# fd6aada0 17-May-2017 Radim Krčmář <rkrcmar@redhat.com>

use %# instead of 0x% in all format strings

It's one character shorter, properly prefixed, and also provides error
detection: %#d triggers a warning.

Done with `sed -i 's/0x%/%#/g' **/*.[ch]` to mo

use %# instead of 0x% in all format strings

It's one character shorter, properly prefixed, and also provides error
detection: %#d triggers a warning.

Done with `sed -i 's/0x%/%#/g' **/*.[ch]` to motivate the use of %#,
existing padding was raised by 2 to account for the counted "0x" (output
should be the same).

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>

show more ...


# b1a6fd7d 03-May-2017 Thomas Huth <thuth@redhat.com>

Add LGPL information to some ARM and PPC specific library files

Some files are still lacking license information, so add the default LGPL
statement here to make it clear under which conditions the c

Add LGPL information to some ARM and PPC specific library files

Some files are still lacking license information, so add the default LGPL
statement here to make it clear under which conditions the code can be used.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1493812229-21037-2-git-send-email-thuth@redhat.com>
Acked-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# f4d8d939 19-Aug-2016 Suraj Jitindar Singh <sjitindarsingh@gmail.com>

lib/powerpc: Implement generic delay function for use in unit tests

It would be nice if we had a generic delay function which could be used
in unit tests, add one.

Add the variable tb_hz used to st

lib/powerpc: Implement generic delay function for use in unit tests

It would be nice if we had a generic delay function which could be used
in unit tests, add one.

Add the variable tb_hz used to store the time base frequency which is read
from the device tree on setup.

Add functions mdelay, udelay and delay in processor.c to delay for a given
number of milliseconds, microseconds and time base ticks respectively.

Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>

show more ...


# 6842bc34 21-Mar-2016 Laurent Vivier <lvivier@redhat.com>

powerpc: add exception handler

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <dgibson@redhat.com>
Message-Id: <1458560014-28862-2-git-send-email-lvivier@redhat.com>
Si

powerpc: add exception handler

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <dgibson@redhat.com>
Message-Id: <1458560014-28862-2-git-send-email-lvivier@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...