All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/8] MIPS queue for February 21st, 2019
@ 2019-02-21 12:45 Aleksandar Markovic
  2019-02-21 12:45 ` [Qemu-devel] [PULL 1/8] hw/misc: mips_itu: Fix 32/64 bit issue in a line involving shift operator Aleksandar Markovic
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Aleksandar Markovic @ 2019-02-21 12:45 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, amarkovic

From: Aleksandar Markovic <amarkovic@wavecomp.com>

  Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-4.0-20190219' into staging (2019-02-18 16:20:13 +0000)

are available in the git repository at:

  https://github.com/AMarkovic/qemu tags/mips-queue-feb-21-2019

for you to fetch changes up to 6cc0280153901ecf74a97905b36b56e2b2d59daa:

  target/mips: fulong2e: Dynamically generate SPD EEPROM data (2019-02-21 13:36:30 +0100)

----------------------------------------------------------------

MIPS queue for February 21st, 2019

  - misc fixes for target/mips
  - add QMP query-cpu-definitions command for mips
  - improve MIPS Fulong 2E machine

----------------------------------------------------------------

Aleksandar Markovic (4):
  hw/misc: mips_itu: Fix 32/64 bit issue in a line involving shift
    operator
  tests/tcg: target/mips: Correct path to headers in some test source
    files
  tests/tcg: target/mips: Change directory name 'bit-counting' to
    'bit-count'
  tests/tcg: target/mips: Add wrappers for MSA integer compare
    instructions

BALATON Zoltan (3):
  hw/pci-host/bonito.c: Add PCI mem region mapped at the correct address
  target/mips: fulong2e: Fix bios flash size
  target/mips: fulong2e: Dynamically generate SPD EEPROM data

Pavel Dovgalyuk (1):
  target/mips: implement QMP query-cpu-definitions command

 hw/mips/mips_fulong2e.c                            | 40 +++++++++-------------
 hw/misc/mips_itu.c                                 |  2 +-
 hw/pci-host/bonito.c                               |  7 +++-
 qapi/target.json                                   |  4 +--
 target/mips/helper.c                               | 33 ++++++++++++++++++
 tests/tcg/mips/include/wrappers_msa.h              | 25 ++++++++++++++
 .../{bit-counting => bit-count}/test_msa_nloc_b.c  |  6 ++--
 .../{bit-counting => bit-count}/test_msa_nloc_d.c  |  6 ++--
 .../{bit-counting => bit-count}/test_msa_nloc_h.c  |  6 ++--
 .../{bit-counting => bit-count}/test_msa_nloc_w.c  |  6 ++--
 .../{bit-counting => bit-count}/test_msa_nlzc_b.c  |  6 ++--
 .../{bit-counting => bit-count}/test_msa_nlzc_d.c  |  6 ++--
 .../{bit-counting => bit-count}/test_msa_nlzc_h.c  |  6 ++--
 .../{bit-counting => bit-count}/test_msa_nlzc_w.c  |  6 ++--
 .../{bit-counting => bit-count}/test_msa_pcnt_b.c  |  6 ++--
 .../{bit-counting => bit-count}/test_msa_pcnt_d.c  |  6 ++--
 .../{bit-counting => bit-count}/test_msa_pcnt_h.c  |  6 ++--
 .../{bit-counting => bit-count}/test_msa_pcnt_w.c  |  6 ++--
 18 files changed, 120 insertions(+), 63 deletions(-)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nloc_b.c (98%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nloc_d.c (98%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nloc_h.c (98%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nloc_w.c (98%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nlzc_b.c (98%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nlzc_d.c (98%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nlzc_h.c (98%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nlzc_w.c (98%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_pcnt_b.c (98%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_pcnt_d.c (98%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_pcnt_h.c (98%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_pcnt_w.c (98%)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PULL 1/8] hw/misc: mips_itu: Fix 32/64 bit issue in a line involving shift operator
  2019-02-21 12:45 [Qemu-devel] [PULL 0/8] MIPS queue for February 21st, 2019 Aleksandar Markovic
@ 2019-02-21 12:45 ` Aleksandar Markovic
  2019-02-21 12:45 ` [Qemu-devel] [PULL 2/8] tests/tcg: target/mips: Correct path to headers in some test source files Aleksandar Markovic
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Aleksandar Markovic @ 2019-02-21 12:45 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, amarkovic

From: Aleksandar Markovic <amarkovic@wavecomp.com>

Fix 32/64 bit issue in a line involving shift operator. "1 << ..."
calculation of size is done as a 32-bit signed integer which may
then be unintentionally sign-extended into the 64-bit result. The
problem was discovered by Coverity (CID 1398648). Using "1ULL"
instead of "1" on the LHS of the shift fixes this problem.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/misc/mips_itu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/misc/mips_itu.c b/hw/misc/mips_itu.c
index 1257d8f..3afdbe6 100644
--- a/hw/misc/mips_itu.c
+++ b/hw/misc/mips_itu.c
@@ -94,7 +94,7 @@ void itc_reconfigure(MIPSITUState *tag)
 
     if (tag->saar_present) {
         address = ((*(uint64_t *) tag->saar) & 0xFFFFFFFFE000ULL) << 4;
-        size = 1 << ((*(uint64_t *) tag->saar >> 1) & 0x1f);
+        size = 1ULL << ((*(uint64_t *) tag->saar >> 1) & 0x1f);
         is_enabled = *(uint64_t *) tag->saar & 1;
     }
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PULL 2/8] tests/tcg: target/mips: Correct path to headers in some test source files
  2019-02-21 12:45 [Qemu-devel] [PULL 0/8] MIPS queue for February 21st, 2019 Aleksandar Markovic
  2019-02-21 12:45 ` [Qemu-devel] [PULL 1/8] hw/misc: mips_itu: Fix 32/64 bit issue in a line involving shift operator Aleksandar Markovic
@ 2019-02-21 12:45 ` Aleksandar Markovic
  2019-02-21 12:45 ` [Qemu-devel] [PULL 3/8] tests/tcg: target/mips: Change directory name 'bit-counting' to 'bit-count' Aleksandar Markovic
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Aleksandar Markovic @ 2019-02-21 12:45 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, amarkovic

From: Aleksandar Markovic <amarkovic@wavecomp.com>

Correct path to headers in tests/tcg/mips/user/ase/msa/bit-counting/*
source files.

Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com>
---
 tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_b.c | 6 +++---
 tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_d.c | 6 +++---
 tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_h.c | 6 +++---
 tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_w.c | 6 +++---
 tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_b.c | 6 +++---
 tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_d.c | 6 +++---
 tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_h.c | 6 +++---
 tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_w.c | 6 +++---
 tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_b.c | 6 +++---
 tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_d.c | 6 +++---
 tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_h.c | 6 +++---
 tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_w.c | 6 +++---
 12 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_b.c b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_b.c
index eb46290..d629431 100644
--- a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_b.c
+++ b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_b.c
@@ -22,9 +22,9 @@
 #include <sys/time.h>
 #include <stdint.h>
 
-#include "../../../include/wrappers_msa.h"
-#include "../../../include/test_inputs.h"
-#include "../../../include/test_utils.h"
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_d.c b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_d.c
index bb1c0cf..fad220c 100644
--- a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_d.c
+++ b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_d.c
@@ -22,9 +22,9 @@
 #include <sys/time.h>
 #include <stdint.h>
 
-#include "../../../include/wrappers_msa.h"
-#include "../../../include/test_inputs.h"
-#include "../../../include/test_utils.h"
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_h.c b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_h.c
index da1cd83..84cf974 100644
--- a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_h.c
+++ b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_h.c
@@ -22,9 +22,9 @@
 #include <sys/time.h>
 #include <stdint.h>
 
-#include "../../../include/wrappers_msa.h"
-#include "../../../include/test_inputs.h"
-#include "../../../include/test_utils.h"
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_w.c b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_w.c
index a059763..a0ed202 100644
--- a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_w.c
+++ b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_w.c
@@ -22,9 +22,9 @@
 #include <sys/time.h>
 #include <stdint.h>
 
-#include "../../../include/wrappers_msa.h"
-#include "../../../include/test_inputs.h"
-#include "../../../include/test_utils.h"
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_b.c b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_b.c
index 9616d6e..9906eae 100644
--- a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_b.c
+++ b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_b.c
@@ -22,9 +22,9 @@
 #include <sys/time.h>
 #include <stdint.h>
 
-#include "../../../include/wrappers_msa.h"
-#include "../../../include/test_inputs.h"
-#include "../../../include/test_utils.h"
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_d.c b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_d.c
index 801c4bc..21222e3 100644
--- a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_d.c
+++ b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_d.c
@@ -22,9 +22,9 @@
 #include <sys/time.h>
 #include <stdint.h>
 
-#include "../../../include/wrappers_msa.h"
-#include "../../../include/test_inputs.h"
-#include "../../../include/test_utils.h"
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_h.c b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_h.c
index 03cb4cd..fbab9c3 100644
--- a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_h.c
+++ b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_h.c
@@ -22,9 +22,9 @@
 #include <sys/time.h>
 #include <stdint.h>
 
-#include "../../../include/wrappers_msa.h"
-#include "../../../include/test_inputs.h"
-#include "../../../include/test_utils.h"
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_w.c b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_w.c
index 2ca93de..dc33366 100644
--- a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_w.c
+++ b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_w.c
@@ -22,9 +22,9 @@
 #include <sys/time.h>
 #include <stdint.h>
 
-#include "../../../include/wrappers_msa.h"
-#include "../../../include/test_inputs.h"
-#include "../../../include/test_utils.h"
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_b.c b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_b.c
index b4cad43..f9033c7 100644
--- a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_b.c
+++ b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_b.c
@@ -22,9 +22,9 @@
 #include <sys/time.h>
 #include <stdint.h>
 
-#include "../../../include/wrappers_msa.h"
-#include "../../../include/test_inputs.h"
-#include "../../../include/test_utils.h"
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_d.c b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_d.c
index d6a8b0d..132b4d0 100644
--- a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_d.c
+++ b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_d.c
@@ -22,9 +22,9 @@
 #include <sys/time.h>
 #include <stdint.h>
 
-#include "../../../include/wrappers_msa.h"
-#include "../../../include/test_inputs.h"
-#include "../../../include/test_utils.h"
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_h.c b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_h.c
index 1cdcabd..f469c09 100644
--- a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_h.c
+++ b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_h.c
@@ -22,9 +22,9 @@
 #include <sys/time.h>
 #include <stdint.h>
 
-#include "../../../include/wrappers_msa.h"
-#include "../../../include/test_inputs.h"
-#include "../../../include/test_utils.h"
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_w.c b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_w.c
index 38ddc14..d73eff7 100644
--- a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_w.c
+++ b/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_w.c
@@ -22,9 +22,9 @@
 #include <sys/time.h>
 #include <stdint.h>
 
-#include "../../../include/wrappers_msa.h"
-#include "../../../include/test_inputs.h"
-#include "../../../include/test_utils.h"
+#include "../../../../include/wrappers_msa.h"
+#include "../../../../include/test_inputs.h"
+#include "../../../../include/test_utils.h"
 
 #define TEST_COUNT_TOTAL (PATTERN_INPUTS_COUNT + RANDOM_INPUTS_COUNT)
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PULL 3/8] tests/tcg: target/mips: Change directory name 'bit-counting' to 'bit-count'
  2019-02-21 12:45 [Qemu-devel] [PULL 0/8] MIPS queue for February 21st, 2019 Aleksandar Markovic
  2019-02-21 12:45 ` [Qemu-devel] [PULL 1/8] hw/misc: mips_itu: Fix 32/64 bit issue in a line involving shift operator Aleksandar Markovic
  2019-02-21 12:45 ` [Qemu-devel] [PULL 2/8] tests/tcg: target/mips: Correct path to headers in some test source files Aleksandar Markovic
@ 2019-02-21 12:45 ` Aleksandar Markovic
  2019-02-21 12:45 ` [Qemu-devel] [PULL 4/8] tests/tcg: target/mips: Add wrappers for MSA integer compare instructions Aleksandar Markovic
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Aleksandar Markovic @ 2019-02-21 12:45 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, amarkovic

From: Aleksandar Markovic <amarkovic@wavecomp.com>

Change directory name 'bit-counting' to 'bit-count'. This is just for
cosmetic and consistency sake. This was the only subdirectory in MSA
test directory that uses ending 'ing'.

Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nloc_b.c | 0
 tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nloc_d.c | 0
 tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nloc_h.c | 0
 tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nloc_w.c | 0
 tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nlzc_b.c | 0
 tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nlzc_d.c | 0
 tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nlzc_h.c | 0
 tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nlzc_w.c | 0
 tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_pcnt_b.c | 0
 tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_pcnt_d.c | 0
 tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_pcnt_h.c | 0
 tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_pcnt_w.c | 0
 12 files changed, 0 insertions(+), 0 deletions(-)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nloc_b.c (100%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nloc_d.c (100%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nloc_h.c (100%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nloc_w.c (100%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nlzc_b.c (100%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nlzc_d.c (100%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nlzc_h.c (100%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_nlzc_w.c (100%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_pcnt_b.c (100%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_pcnt_d.c (100%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_pcnt_h.c (100%)
 rename tests/tcg/mips/user/ase/msa/{bit-counting => bit-count}/test_msa_pcnt_w.c (100%)

diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_b.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_b.c
similarity index 100%
rename from tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_b.c
rename to tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_b.c
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_d.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_d.c
similarity index 100%
rename from tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_d.c
rename to tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_d.c
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_h.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_h.c
similarity index 100%
rename from tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_h.c
rename to tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_h.c
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_w.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_w.c
similarity index 100%
rename from tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nloc_w.c
rename to tests/tcg/mips/user/ase/msa/bit-count/test_msa_nloc_w.c
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_b.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_b.c
similarity index 100%
rename from tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_b.c
rename to tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_b.c
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_d.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_d.c
similarity index 100%
rename from tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_d.c
rename to tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_d.c
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_h.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_h.c
similarity index 100%
rename from tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_h.c
rename to tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_h.c
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_w.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_w.c
similarity index 100%
rename from tests/tcg/mips/user/ase/msa/bit-counting/test_msa_nlzc_w.c
rename to tests/tcg/mips/user/ase/msa/bit-count/test_msa_nlzc_w.c
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_b.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_b.c
similarity index 100%
rename from tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_b.c
rename to tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_b.c
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_d.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_d.c
similarity index 100%
rename from tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_d.c
rename to tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_d.c
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_h.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_h.c
similarity index 100%
rename from tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_h.c
rename to tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_h.c
diff --git a/tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_w.c b/tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_w.c
similarity index 100%
rename from tests/tcg/mips/user/ase/msa/bit-counting/test_msa_pcnt_w.c
rename to tests/tcg/mips/user/ase/msa/bit-count/test_msa_pcnt_w.c
-- 
2.7.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PULL 4/8] tests/tcg: target/mips: Add wrappers for MSA integer compare instructions
  2019-02-21 12:45 [Qemu-devel] [PULL 0/8] MIPS queue for February 21st, 2019 Aleksandar Markovic
                   ` (2 preceding siblings ...)
  2019-02-21 12:45 ` [Qemu-devel] [PULL 3/8] tests/tcg: target/mips: Change directory name 'bit-counting' to 'bit-count' Aleksandar Markovic
@ 2019-02-21 12:45 ` Aleksandar Markovic
  2019-02-21 12:45 ` [Qemu-devel] [PULL 5/8] target/mips: implement QMP query-cpu-definitions command Aleksandar Markovic
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Aleksandar Markovic @ 2019-02-21 12:45 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, amarkovic

From: Aleksandar Markovic <amarkovic@wavecomp.com>

Add wrappers for MSA integer compare instructions.

Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com>
---
 tests/tcg/mips/include/wrappers_msa.h | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/tests/tcg/mips/include/wrappers_msa.h b/tests/tcg/mips/include/wrappers_msa.h
index 7a77fb9..3280f9b 100644
--- a/tests/tcg/mips/include/wrappers_msa.h
+++ b/tests/tcg/mips/include/wrappers_msa.h
@@ -97,5 +97,30 @@ DO_MSA__WD__WS_WT(NOR_V, nor.v)
 DO_MSA__WD__WS_WT(OR_V, or.v)
 DO_MSA__WD__WS_WT(XOR_V, xor.v)
 
+DO_MSA__WD__WS_WT(CEQ_B, ceq.b)
+DO_MSA__WD__WS_WT(CEQ_H, ceq.h)
+DO_MSA__WD__WS_WT(CEQ_W, ceq.w)
+DO_MSA__WD__WS_WT(CEQ_D, ceq.d)
+
+DO_MSA__WD__WS_WT(CLE_S_B, cle_s.b)
+DO_MSA__WD__WS_WT(CLE_S_H, cle_s.h)
+DO_MSA__WD__WS_WT(CLE_S_W, cle_s.w)
+DO_MSA__WD__WS_WT(CLE_S_D, cle_s.d)
+
+DO_MSA__WD__WS_WT(CLE_U_B, cle_u.b)
+DO_MSA__WD__WS_WT(CLE_U_H, cle_u.h)
+DO_MSA__WD__WS_WT(CLE_U_W, cle_u.w)
+DO_MSA__WD__WS_WT(CLE_U_D, cle_u.d)
+
+DO_MSA__WD__WS_WT(CLT_S_B, clt_s.b)
+DO_MSA__WD__WS_WT(CLT_S_H, clt_s.h)
+DO_MSA__WD__WS_WT(CLT_S_W, clt_s.w)
+DO_MSA__WD__WS_WT(CLT_S_D, clt_s.d)
+
+DO_MSA__WD__WS_WT(CLT_U_B, clt_u.b)
+DO_MSA__WD__WS_WT(CLT_U_H, clt_u.h)
+DO_MSA__WD__WS_WT(CLT_U_W, clt_u.w)
+DO_MSA__WD__WS_WT(CLT_U_D, clt_u.d)
+
 
 #endif
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PULL 5/8] target/mips: implement QMP query-cpu-definitions command
  2019-02-21 12:45 [Qemu-devel] [PULL 0/8] MIPS queue for February 21st, 2019 Aleksandar Markovic
                   ` (3 preceding siblings ...)
  2019-02-21 12:45 ` [Qemu-devel] [PULL 4/8] tests/tcg: target/mips: Add wrappers for MSA integer compare instructions Aleksandar Markovic
@ 2019-02-21 12:45 ` Aleksandar Markovic
  2019-02-21 12:45 ` [Qemu-devel] [PULL 6/8] hw/pci-host/bonito.c: Add PCI mem region mapped at the correct address Aleksandar Markovic
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Aleksandar Markovic @ 2019-02-21 12:45 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, amarkovic

From: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>

This patch enables QMP-based querying of the available CPU types for
MIPS and MIPS64 platforms.

Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
---
 qapi/target.json     |  4 ++--
 target/mips/helper.c | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/qapi/target.json b/qapi/target.json
index da7b4be..1d4d54b 100644
--- a/qapi/target.json
+++ b/qapi/target.json
@@ -499,7 +499,7 @@
             'static': 'bool',
             '*unavailable-features': [ 'str' ],
             'typename': 'str' },
-  'if': 'defined(TARGET_PPC) || defined(TARGET_ARM) || defined(TARGET_I386) || defined(TARGET_S390X)' }
+  'if': 'defined(TARGET_PPC) || defined(TARGET_ARM) || defined(TARGET_I386) || defined(TARGET_S390X) || defined(TARGET_MIPS)' }
 
 ##
 # @query-cpu-definitions:
@@ -511,4 +511,4 @@
 # Since: 1.2.0
 ##
 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'],
-  'if': 'defined(TARGET_PPC) || defined(TARGET_ARM) || defined(TARGET_I386) || defined(TARGET_S390X)' }
+  'if': 'defined(TARGET_PPC) || defined(TARGET_ARM) || defined(TARGET_I386) || defined(TARGET_S390X) || defined(TARGET_MIPS)' }
diff --git a/target/mips/helper.c b/target/mips/helper.c
index 944f094..c44cdca 100644
--- a/target/mips/helper.c
+++ b/target/mips/helper.c
@@ -24,6 +24,7 @@
 #include "exec/cpu_ldst.h"
 #include "exec/log.h"
 #include "hw/mips/cpudevs.h"
+#include "qapi/qapi-commands-target.h"
 
 enum {
     TLBRET_XI = -6,
@@ -1470,3 +1471,35 @@ void QEMU_NORETURN do_raise_exception_err(CPUMIPSState *env,
 
     cpu_loop_exit_restore(cs, pc);
 }
+
+static void mips_cpu_add_definition(gpointer data, gpointer user_data)
+{
+    ObjectClass *oc = data;
+    CpuDefinitionInfoList **cpu_list = user_data;
+    CpuDefinitionInfoList *entry;
+    CpuDefinitionInfo *info;
+    const char *typename;
+
+    typename = object_class_get_name(oc);
+    info = g_malloc0(sizeof(*info));
+    info->name = g_strndup(typename,
+                           strlen(typename) - strlen("-" TYPE_MIPS_CPU));
+    info->q_typename = g_strdup(typename);
+
+    entry = g_malloc0(sizeof(*entry));
+    entry->value = info;
+    entry->next = *cpu_list;
+    *cpu_list = entry;
+}
+
+CpuDefinitionInfoList *qmp_query_cpu_definitions(Error **errp)
+{
+    CpuDefinitionInfoList *cpu_list = NULL;
+    GSList *list;
+
+    list = object_class_get_list(TYPE_MIPS_CPU, false);
+    g_slist_foreach(list, mips_cpu_add_definition, &cpu_list);
+    g_slist_free(list);
+
+    return cpu_list;
+}
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PULL 6/8] hw/pci-host/bonito.c: Add PCI mem region mapped at the correct address
  2019-02-21 12:45 [Qemu-devel] [PULL 0/8] MIPS queue for February 21st, 2019 Aleksandar Markovic
                   ` (4 preceding siblings ...)
  2019-02-21 12:45 ` [Qemu-devel] [PULL 5/8] target/mips: implement QMP query-cpu-definitions command Aleksandar Markovic
@ 2019-02-21 12:45 ` Aleksandar Markovic
  2019-02-21 12:45 ` [Qemu-devel] [PULL 7/8] target/mips: fulong2e: Fix bios flash size Aleksandar Markovic
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Aleksandar Markovic @ 2019-02-21 12:45 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, amarkovic

From: BALATON Zoltan <balaton@eik.bme.hu>

Stop using system memory as PCI memory otherwise devices such as VGA
that have regions mapped to PCI memory clash with RAM. Use a separate
memory region for PCI memory and map it to the correct address in
system memory which allows PCI mem regions to show at the correct
address where clients expect them.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/pci-host/bonito.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c
index 9f33582..dde4437 100644
--- a/hw/pci-host/bonito.c
+++ b/hw/pci-host/bonito.c
@@ -217,6 +217,7 @@ struct BonitoState {
     PCIHostState parent_obj;
     qemu_irq *pic;
     PCIBonitoState *pci_dev;
+    MemoryRegion pci_mem;
 };
 
 #define TYPE_BONITO_PCI_HOST_BRIDGE "Bonito-pcihost"
@@ -598,11 +599,15 @@ static const VMStateDescription vmstate_bonito = {
 static void bonito_pcihost_realize(DeviceState *dev, Error **errp)
 {
     PCIHostState *phb = PCI_HOST_BRIDGE(dev);
+    BonitoState *bs = BONITO_PCI_HOST_BRIDGE(dev);
 
+    memory_region_init(&bs->pci_mem, OBJECT(dev), "pci.mem", BONITO_PCILO_SIZE);
     phb->bus = pci_register_root_bus(DEVICE(dev), "pci",
                                      pci_bonito_set_irq, pci_bonito_map_irq,
-                                     dev, get_system_memory(), get_system_io(),
+                                     dev, &bs->pci_mem, get_system_io(),
                                      0x28, 32, TYPE_PCI_BUS);
+    memory_region_add_subregion(get_system_memory(), BONITO_PCILO_BASE,
+                                &bs->pci_mem);
 }
 
 static void bonito_realize(PCIDevice *dev, Error **errp)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PULL 7/8] target/mips: fulong2e: Fix bios flash size
  2019-02-21 12:45 [Qemu-devel] [PULL 0/8] MIPS queue for February 21st, 2019 Aleksandar Markovic
                   ` (5 preceding siblings ...)
  2019-02-21 12:45 ` [Qemu-devel] [PULL 6/8] hw/pci-host/bonito.c: Add PCI mem region mapped at the correct address Aleksandar Markovic
@ 2019-02-21 12:45 ` Aleksandar Markovic
  2019-02-21 12:46 ` [Qemu-devel] [PULL 8/8] target/mips: fulong2e: Dynamically generate SPD EEPROM data Aleksandar Markovic
  2019-02-21 17:52 ` [Qemu-devel] [PULL 0/8] MIPS queue for February 21st, 2019 Peter Maydell
  8 siblings, 0 replies; 11+ messages in thread
From: Aleksandar Markovic @ 2019-02-21 12:45 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, amarkovic

From: BALATON Zoltan <balaton@eik.bme.hu>

According to both the specifications on linux-mips.org referenced in a
comment at the beginning of the file and the flash chip part number
the bios size should be 512k not 1M.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/mips/mips_fulong2e.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
index 02549d5..10e6ed5 100644
--- a/hw/mips/mips_fulong2e.c
+++ b/hw/mips/mips_fulong2e.c
@@ -21,6 +21,7 @@
 #include "qemu/osdep.h"
 #include "qemu/units.h"
 #include "qapi/error.h"
+#include "cpu.h"
 #include "hw/hw.h"
 #include "hw/i386/pc.h"
 #include "hw/dma/i8257.h"
@@ -35,7 +36,6 @@
 #include "audio/audio.h"
 #include "qemu/log.h"
 #include "hw/loader.h"
-#include "hw/mips/bios.h"
 #include "hw/ide.h"
 #include "elf.h"
 #include "hw/isa/vt82c686.h"
@@ -51,6 +51,8 @@
 #define ENVP_NB_ENTRIES	 	16
 #define ENVP_ENTRY_SIZE	 	256
 
+/* fulong 2e has a 512k flash: Winbond W39L040AP70Z */
+#define BIOS_SIZE (512 * KiB)
 #define MAX_IDE_BUS 2
 
 /*
@@ -307,12 +309,9 @@ static void mips_fulong2e_init(MachineState *machine)
     /* fulong 2e has 256M ram. */
     ram_size = 256 * MiB;
 
-    /* fulong 2e has a 1M flash.Winbond W39L040AP70Z */
-    bios_size = 1 * MiB;
-
     /* allocate RAM */
     memory_region_allocate_system_memory(ram, NULL, "fulong2e.ram", ram_size);
-    memory_region_init_ram(bios, NULL, "fulong2e.bios", bios_size,
+    memory_region_init_ram(bios, NULL, "fulong2e.bios", BIOS_SIZE,
                            &error_fatal);
     memory_region_set_readonly(bios, true);
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PULL 8/8] target/mips: fulong2e: Dynamically generate SPD EEPROM data
  2019-02-21 12:45 [Qemu-devel] [PULL 0/8] MIPS queue for February 21st, 2019 Aleksandar Markovic
                   ` (6 preceding siblings ...)
  2019-02-21 12:45 ` [Qemu-devel] [PULL 7/8] target/mips: fulong2e: Fix bios flash size Aleksandar Markovic
@ 2019-02-21 12:46 ` Aleksandar Markovic
  2019-02-21 17:52 ` [Qemu-devel] [PULL 0/8] MIPS queue for February 21st, 2019 Peter Maydell
  8 siblings, 0 replies; 11+ messages in thread
From: Aleksandar Markovic @ 2019-02-21 12:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, amarkovic

From: BALATON Zoltan <balaton@eik.bme.hu>

The machine comes with 256M memory module by default but it's
upgradable so it could have different memory size. There was a TODO
comment to replace static SPD EEPROM data with dynamically generated
one to support this. Now that we have a function for that, it's easy
to do. Although this would allow larger RAM sizes, the peculiar memory
map of the machine may need some special handling to map it as low and
high memory. Because I don't know what the correct place would be for
highmem, I've left memory size fixed at 256M for now and TODO is moved
there instead.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/mips/mips_fulong2e.c | 31 +++++++++++++------------------
 1 file changed, 13 insertions(+), 18 deletions(-)

diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
index 10e6ed5..eec6fd0 100644
--- a/hw/mips/mips_fulong2e.c
+++ b/hw/mips/mips_fulong2e.c
@@ -214,20 +214,6 @@ static void main_cpu_reset(void *opaque)
     }
 }
 
-static const uint8_t eeprom_spd[0x80] = {
-    0x80,0x08,0x07,0x0d,0x09,0x02,0x40,0x00,0x04,0x70,
-    0x70,0x00,0x82,0x10,0x00,0x01,0x0e,0x04,0x0c,0x01,
-    0x02,0x20,0x80,0x75,0x70,0x00,0x00,0x50,0x3c,0x50,
-    0x2d,0x20,0xb0,0xb0,0x50,0x50,0x00,0x00,0x00,0x00,
-    0x00,0x41,0x48,0x3c,0x32,0x75,0x00,0x00,0x00,0x00,
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-    0x00,0x00,0x00,0x9c,0x7b,0x07,0x00,0x00,0x00,0x00,
-    0x00,0x00,0x00,0x00,0x48,0x42,0x35,0x34,0x41,0x32,
-    0x35,0x36,0x38,0x4b,0x4e,0x2d,0x41,0x37,0x35,0x42,
-    0x20,0x30,0x20
-};
-
 static void vt82c686b_southbridge_init(PCIBus *pci_bus, int slot, qemu_irq intc,
                                        I2CBus **i2c_bus, ISABus **p_isa_bus)
 {
@@ -284,7 +270,6 @@ static void network_init (PCIBus *pci_bus)
 
 static void mips_fulong2e_init(MachineState *machine)
 {
-    ram_addr_t ram_size = machine->ram_size;
     const char *kernel_filename = machine->kernel_filename;
     const char *kernel_cmdline = machine->kernel_cmdline;
     const char *initrd_filename = machine->initrd_filename;
@@ -292,7 +277,10 @@ static void mips_fulong2e_init(MachineState *machine)
     MemoryRegion *address_space_mem = get_system_memory();
     MemoryRegion *ram = g_new(MemoryRegion, 1);
     MemoryRegion *bios = g_new(MemoryRegion, 1);
+    ram_addr_t ram_size = machine->ram_size;
     long bios_size;
+    uint8_t *spd_data;
+    Error *err = NULL;
     int64_t kernel_entry;
     PCIBus *pci_bus;
     ISABus *isa_bus;
@@ -306,7 +294,7 @@ static void mips_fulong2e_init(MachineState *machine)
 
     qemu_register_reset(main_cpu_reset, cpu);
 
-    /* fulong 2e has 256M ram. */
+    /* TODO: support more than 256M RAM as highmem */
     ram_size = 256 * MiB;
 
     /* allocate RAM */
@@ -359,8 +347,14 @@ static void mips_fulong2e_init(MachineState *machine)
     vt82c686b_southbridge_init(pci_bus, FULONG2E_VIA_SLOT, env->irq[5],
                                &smbus, &isa_bus);
 
-    /* TODO: Populate SPD eeprom data.  */
-    smbus_eeprom_init(smbus, 1, eeprom_spd, sizeof(eeprom_spd));
+    /* Populate SPD eeprom data */
+    spd_data = spd_data_generate(DDR, ram_size, &err);
+    if (err) {
+        warn_report_err(err);
+    }
+    if (spd_data) {
+        smbus_eeprom_init_one(smbus, 0x50, spd_data);
+    }
 
     mc146818_rtc_init(isa_bus, 2000, NULL);
 
@@ -374,6 +368,7 @@ static void mips_fulong2e_machine_init(MachineClass *mc)
     mc->init = mips_fulong2e_init;
     mc->block_default_type = IF_IDE;
     mc->default_cpu_type = MIPS_CPU_TYPE_NAME("Loongson-2E");
+    mc->default_ram_size = 256 * MiB;
 }
 
 DEFINE_MACHINE("fulong2e", mips_fulong2e_machine_init)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PULL 0/8] MIPS queue for February 21st, 2019
  2019-02-21 12:45 [Qemu-devel] [PULL 0/8] MIPS queue for February 21st, 2019 Aleksandar Markovic
                   ` (7 preceding siblings ...)
  2019-02-21 12:46 ` [Qemu-devel] [PULL 8/8] target/mips: fulong2e: Dynamically generate SPD EEPROM data Aleksandar Markovic
@ 2019-02-21 17:52 ` Peter Maydell
  2019-02-21 18:32   ` Aleksandar Markovic
  8 siblings, 1 reply; 11+ messages in thread
From: Peter Maydell @ 2019-02-21 17:52 UTC (permalink / raw)
  To: Aleksandar Markovic; +Cc: QEMU Developers, Aleksandar Markovic

On Thu, 21 Feb 2019 at 12:46, Aleksandar Markovic
<aleksandar.markovic@rt-rk.com> wrote:
>
> From: Aleksandar Markovic <amarkovic@wavecomp.com>
>
>   Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-4.0-20190219' into staging (2019-02-18 16:20:13 +0000)
>
> are available in the git repository at:
>
>   https://github.com/AMarkovic/qemu tags/mips-queue-feb-21-2019
>
> for you to fetch changes up to 6cc0280153901ecf74a97905b36b56e2b2d59daa:
>
>   target/mips: fulong2e: Dynamically generate SPD EEPROM data (2019-02-21 13:36:30 +0100)
>
> ----------------------------------------------------------------
>
> MIPS queue for February 21st, 2019
>
>   - misc fixes for target/mips
>   - add QMP query-cpu-definitions command for mips
>   - improve MIPS Fulong 2E machine
>
> ----------------------------------------------------------------

> BALATON Zoltan (3):
>   hw/pci-host/bonito.c: Add PCI mem region mapped at the correct address
>   target/mips: fulong2e: Fix bios flash size
>   target/mips: fulong2e: Dynamically generate SPD EEPROM data

Hi -- this pullreq passes my build tests, but it looks like
these three patches are missing a signed-off-by line from
you as the maintainer. Could you fix that and resubmit, please?

(you might want to look at automatically scripting this check;
the script I use to create pull requests has some code to
do the "check all commits have my signoff" which you can
borrow if you like:
https://git.linaro.org/people/peter.maydell/misc-scripts.git/tree/make-pullreq#n98
)

thanks
-- PMM

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PULL 0/8] MIPS queue for February 21st, 2019
  2019-02-21 17:52 ` [Qemu-devel] [PULL 0/8] MIPS queue for February 21st, 2019 Peter Maydell
@ 2019-02-21 18:32   ` Aleksandar Markovic
  0 siblings, 0 replies; 11+ messages in thread
From: Aleksandar Markovic @ 2019-02-21 18:32 UTC (permalink / raw)
  To: Peter Maydell, Aleksandar Markovic; +Cc: QEMU Developers

> Hi -- this pullreq passes my build tests, but it looks like
> these three patches are missing a signed-off-by line from
> you as the maintainer. Could you fix that and resubmit, please?
> 
> (you might want to look at automatically scripting this check;
> the script I use to create pull requests has some code to
> do the "check all commits have my signoff" which you can
> borrow if you like:
> https://git.linaro.org/people/peter.maydell/misc-scripts.git/tree/make-pullreq#n98
> )

Sorry about that. I will resubmit the pull request shortly.

Thanks for scripting suggestion!
Aleksandar

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-02-21 18:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-21 12:45 [Qemu-devel] [PULL 0/8] MIPS queue for February 21st, 2019 Aleksandar Markovic
2019-02-21 12:45 ` [Qemu-devel] [PULL 1/8] hw/misc: mips_itu: Fix 32/64 bit issue in a line involving shift operator Aleksandar Markovic
2019-02-21 12:45 ` [Qemu-devel] [PULL 2/8] tests/tcg: target/mips: Correct path to headers in some test source files Aleksandar Markovic
2019-02-21 12:45 ` [Qemu-devel] [PULL 3/8] tests/tcg: target/mips: Change directory name 'bit-counting' to 'bit-count' Aleksandar Markovic
2019-02-21 12:45 ` [Qemu-devel] [PULL 4/8] tests/tcg: target/mips: Add wrappers for MSA integer compare instructions Aleksandar Markovic
2019-02-21 12:45 ` [Qemu-devel] [PULL 5/8] target/mips: implement QMP query-cpu-definitions command Aleksandar Markovic
2019-02-21 12:45 ` [Qemu-devel] [PULL 6/8] hw/pci-host/bonito.c: Add PCI mem region mapped at the correct address Aleksandar Markovic
2019-02-21 12:45 ` [Qemu-devel] [PULL 7/8] target/mips: fulong2e: Fix bios flash size Aleksandar Markovic
2019-02-21 12:46 ` [Qemu-devel] [PULL 8/8] target/mips: fulong2e: Dynamically generate SPD EEPROM data Aleksandar Markovic
2019-02-21 17:52 ` [Qemu-devel] [PULL 0/8] MIPS queue for February 21st, 2019 Peter Maydell
2019-02-21 18:32   ` Aleksandar Markovic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.