qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH qemu] spapr: Stop providing RTAS blob


From: Alexey Kardashevskiy
Subject: Re: [Qemu-devel] [RFC PATCH qemu] spapr: Stop providing RTAS blob
Date: Mon, 22 Jul 2019 15:07:52 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0



On 16/07/2019 15:35, Alexey Kardashevskiy wrote:
SLOF implements one itself so let's remove it from QEMU. It is one less
image and simpler setup as the RTAS blob never stays in its initial place
anyway as the guest OS always decides where to put it.

This totally depends on https://patchwork.ozlabs.org/patch/1132440/ ,
hence RFC.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
---
  configure                       |   6 +----
  Makefile                        |   2 +-
  pc-bios/spapr-rtas/Makefile     |  27 ---------------------
  include/hw/ppc/spapr.h          |   2 --
  hw/ppc/spapr.c                  |  32 ++-----------------------
  hw/ppc/spapr_rtas.c             |  41 --------------------------------
  MAINTAINERS                     |   2 --
  pc-bios/spapr-rtas.bin          | Bin 20 -> 0 bytes
  pc-bios/spapr-rtas/spapr-rtas.S |  37 ----------------------------
  9 files changed, 4 insertions(+), 145 deletions(-)
  delete mode 100644 pc-bios/spapr-rtas/Makefile
  delete mode 100644 pc-bios/spapr-rtas.bin
  delete mode 100644 pc-bios/spapr-rtas/spapr-rtas.S

diff --git a/configure b/configure
index 4983c8b53300..a132d2eb5666 100755
--- a/configure
+++ b/configure
@@ -6205,9 +6205,6 @@ if { test "$cpu" = "i386" || test "$cpu" = "x86_64"; } && 
\
          fi
      done
  fi
-if test "$ARCH" = "ppc64" && test "$targetos" != "Darwin" ; then
-  roms="$roms spapr-rtas"
-fi
# Only build s390-ccw bios if we're on s390x and the compiler has -march=z900
  if test "$cpu" = "s390x" ; then
@@ -7919,14 +7916,13 @@ fi
  DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32 tests/libqos tests/qapi-schema 
tests/tcg/xtensa tests/qemu-iotests tests/vm"
  DIRS="$DIRS tests/fp tests/qgraph"
  DIRS="$DIRS docs docs/interop fsdev scsi"
-DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas pc-bios/s390-ccw"
+DIRS="$DIRS pc-bios/optionrom pc-bios/s390-ccw"
  DIRS="$DIRS roms/seabios roms/vgabios"
  LINKS="Makefile tests/tcg/Makefile"
  LINKS="$LINKS tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
  LINKS="$LINKS tests/tcg/lm32/Makefile tests/tcg/xtensa/Makefile po/Makefile"
  LINKS="$LINKS tests/fp/Makefile"
  LINKS="$LINKS pc-bios/optionrom/Makefile pc-bios/keymaps"
-LINKS="$LINKS pc-bios/spapr-rtas/Makefile"
  LINKS="$LINKS pc-bios/s390-ccw/Makefile"
  LINKS="$LINKS roms/seabios/Makefile roms/vgabios/Makefile"
  LINKS="$LINKS pc-bios/qemu-icon.bmp"
diff --git a/Makefile b/Makefile
index 1fcbaed62c76..d780f4eebceb 100644
--- a/Makefile
+++ b/Makefile
@@ -764,7 +764,7 @@ efi-e1000e.rom efi-vmxnet3.rom \
  bamboo.dtb canyonlands.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \
  multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin \
  s390-ccw.img s390-netboot.img \
-spapr-rtas.bin slof.bin skiboot.lid \
+slof.bin skiboot.lid \
  palcode-clipper \
  u-boot.e500 u-boot-sam460-20100605.bin \
  qemu_vga.ndrv \
diff --git a/pc-bios/spapr-rtas/Makefile b/pc-bios/spapr-rtas/Makefile
deleted file mode 100644
index 4b9bb1230658..000000000000
--- a/pc-bios/spapr-rtas/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-all: build-all
-# Dummy command so that make thinks it has done something
-       @true
-
-include ../../config-host.mak
-include $(SRC_PATH)/rules.mak
-
-$(call set-vpath, $(SRC_PATH)/pc-bios/spapr-rtas)
-
-.PHONY : all clean build-all
-
-#CFLAGS += -I$(SRC_PATH)
-#QEMU_CFLAGS = $(CFLAGS)
-
-build-all: spapr-rtas.bin
-
-%.o: %.S
-       $(call quiet-command,$(CCAS) -mbig -c -o $@ $<,"CCAS","$(TARGET_DIR)$@")
-
-%.img: %.o
-       $(call quiet-command,$(CC) -nostdlib -mbig -o $@ 
$<,"Building","$(TARGET_DIR)$@")
-
-%.bin: %.img
-       $(call quiet-command,$(OBJCOPY) -O binary -j .text $< 
$@,"Building","$(TARGET_DIR)$@")
-
-clean:
-       rm -f *.o *.d *.img *.bin *~
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 60553d32c4fa..b6640370c839 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -152,8 +152,6 @@ struct SpaprMachineState {
hwaddr rma_size;
      int vrma_adjust;
-    ssize_t rtas_size;
-    void *rtas_blob;
      uint32_t fdt_size;
      uint32_t fdt_initial_size;
      void *fdt_blob;
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 8783b433960c..36cd45bd78b3 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -89,7 +89,6 @@
   * We load our kernel at 4M, leaving space for SLOF initial image
   */
  #define FDT_MAX_SIZE            0x100000
-#define RTAS_MAX_SIZE           0x10000
  #define RTAS_MAX_ADDR           0x80000000 /* RTAS must stay below that */
  #define FW_MAX_SIZE             0x400000
  #define FW_FILE_NAME            "slof.bin"
@@ -1704,8 +1703,7 @@ static void spapr_machine_reset(MachineState *machine)
  {
      SpaprMachineState *spapr = SPAPR_MACHINE(machine);
      PowerPCCPU *first_ppc_cpu;
-    uint32_t rtas_limit;
-    hwaddr rtas_addr, fdt_addr;
+    hwaddr fdt_addr;
      void *fdt;
      int rc;
@@ -1783,14 +1781,10 @@ static void spapr_machine_reset(MachineState *machine)
       * or just below 2GB, whichever is lower, so that it can be
       * processed with 32-bit real mode code if necessary
       */
-    rtas_limit = MIN(spapr->rma_size, RTAS_MAX_ADDR);
-    rtas_addr = rtas_limit - RTAS_MAX_SIZE;
-    fdt_addr = rtas_addr - FDT_MAX_SIZE;
+    fdt_addr = RTAS_MAX_ADDR - FDT_MAX_SIZE;



Meanwhile a bug is here, should have been:

+    fdt_addr = MIN(spapr->rma_size, RTAS_MAX_ADDR) - FDT_MAX_SIZE;


Appears only on p9 (radix?). Thanks,


--
Alexey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]