Commit Graph

17 Commits

Author SHA1 Message Date
Thomas Huth 2ef6d1e52d Move the code for rfill into a separate function
The code from the FAST_RFILL macro uses a local array as a
temporary buffer - which gets allocated in the stack frame
of the engine() function. Since engine() can be called
recursively, this can cause stack overflows. So let's
move the rfill code into a separate function to avoid
these problems.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2015-12-01 17:02:04 +11:00
Thomas Huth 5f79afca64 Include make.rules in the library Makefiles
Make sure to include make.rules from the Makefiles in the common
lib folder to get some more sane console output during the build
process.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2015-03-23 11:43:20 +11:00
Nikunj A. Dadhania f9a60de304 Add private HCALL to inform updated RTAS base and entry
This patch adds a private HCALL to inform qemu the updated
rtas-base and rtas-entry address when OS invokes the call
"instantiate-rtas". This is required as qemu allocates the
error reporting structure in RTAS space upon a machine check
exception and hence needs to know the updated RTAS.

Enhancements to qemu to handle the private HCALL, prepare
error log and invoke machine check notification routine
are in a separate patch.

Signed-off-by: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-08-27 11:10:45 +05:30
Alexander Graf 9a44f99fa4 Isolate sc 1 detection logic
Under weird circumstances we ended up with unsynchronized data and text
section references between the stage1 and paflof binaries.

This patch moves the initial sc 1 detection logic to work without any
persistent state, making it properly reentrant regardless of the place
we end up hitting the code at.

This fixes broken sc 1 detection for me on PR KVM.

Signed-off-by: Alexander Graf <agraf@suse.de>
[aik: added r0 to clobber list and $(FLAG) to AS1FLAGS as suggested by agraf, tested on pHyp]
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2014-04-04 11:42:20 +11:00
Alexander Graf dd53579ae8 Work around missing sc 1 traps on pHyp
When running a pseries guest in PR KVM on top of pHyp, sc 1 instructions
are handled directly by pHyp, so we don't get to see them.

That means we need to get inventive. Invent a new instruction that behaves
like sc 1, but really is a reserved instruction that traps. This instruction
can be used by KVM to emulate sc 1 behavior.

This patch adds the SLOF support for it. With this, SLOF detects whether
it's running on such a broken setup and if so patches itself to execute
the fake sc 1 instruction instead of the real one.

Furthermore, we also hook into "quiesce" which Linux calls when it boots.
This gives us the chance to also patch Linux when it boots up, so it uses
the fake sc 1 too.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-12-17 11:01:46 +05:30
Nikunj A Dadhania 79f0600b9a Output banner and initial display output in VNC window
Initial display output does not show up in the VGA/VNC window.
Create replay buffer to store the initial output and when vga/vnc
console starts, dump the buffer there.

Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-12-16 11:56:42 +05:30
Nikunj A Dadhania 8fa0ee8b2b Add ibm,client-architecture-support method
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-09 14:07:02 +11:00
Nikunj A. Dadhania 0ad10f26c9 SLOF: Support PAPR NVRAM RTAS calls
BenH still need to ACK this though.

From: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>

* Determines size of the flash using device tree.
* Provides nvram access functions for RTAS_NVRAM
* Allocates temporary buffer of nvram in SLOF code and use that in C.
  (sbrk not available)
* NVRAM_LENGTH is used at various places, make sure it is well guarded
  and also use dynamically determined size once an RTAS-NVRAM is
  found.
* Use NVRAM_LENGTH as a variable in case of RTAS_NVRAM, not very
  elegant though

Signed-off-by: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>

--

Changelog from v1:
* #define cleanups suggested by Thomas/Benh
* Fix makefile which missed passing $FLAG for building llfw
* renamed vio-nvram.fs as rtas-nvram.fs
2012-10-17 16:30:58 +11:00
Benjamin Herrenschmidt e6aac8b56d Expose hv-logical-memop to forth code
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-02-22 10:34:00 +11:00
Benjamin Herrenschmidt ca610c931e Move virtio to a separate library
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-01-19 17:17:50 +11:00
Benjamin Herrenschmidt c90d5abd0d Fix virtio access size
We don't support 8-bytes PIO

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-01-11 11:54:24 +11:00
Michael Ellerman f7504aec1b hvterm: Update hvterm routines to take the termno as an argument
Currently the hvterm routines always use termno=0. This works because
QEMU has code that recognies termno=0 and chooses a "default" vty.

It would be more correct if the hvterm routines took the termno as an
argument. That way if we open a vty other than the default the output
will correctly go to that vty.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
2011-12-20 17:56:48 +01:00
Thomas Huth 008fe5610d Support for virtio-block PCI devices
The virtio devices are preferred way of providing virtualized devices on
KVM/qemu. Here's now the basic support for virtio block devices.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2011-11-24 11:32:35 +01:00
Thomas Huth 904abb4a8f Add wrapper for H_PUT_TCE hypervisor call
H_PUT_TCE is needed for getting the DMA transfers working in the virtual
environment.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2011-10-12 16:24:55 +02:00
Thomas Huth d38a1c54f5 Improved cache-inhibited access functions
Implemented the CI functions in cache.h (which are required by net-snk)
and fixed a bug in hv_logical_ci_store in libhvcall.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2011-10-12 13:20:00 +02:00
Benjamin Herrenschmidt 35fc16fee3 Move MMIO accessors to board-js2x and implement h-calls based ones for qemu
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2011-10-12 13:20:00 +02:00
Benjamin Herrenschmidt 39426bad55 Initial qemu/KVM board support
Added a new board for SLOF running on KVM/qemu.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2011-03-22 15:22:00 +01:00