[Qemu-devel] [PATCH 1/1] etsec: fix IRQ (un)masking

2018-07-12 Thread Michael Davidsaver
update IRQ pins on reset. Signed-off-by: Michael Davidsaver Reviewed-by: Cédric Le Goater --- hw/net/fsl_etsec/etsec.c | 68 +++- hw/net/fsl_etsec/etsec.h | 2 ++ hw/net/fsl_etsec/registers.h | 10 +++ hw/net/fsl_etsec/rings.c | 12 +--

Re: [Qemu-devel] [PATCH] etsec: fix IRQ (un)masking

2018-07-07 Thread Michael Davidsaver
On 11/28/2017 05:35 PM, David Gibson wrote: > On Mon, Nov 27, 2017 at 08:42:13PM -0600, Michael Davidsaver wrote: >> Interrupt conditions occurring while masked are not being >> signaled when later unmasked. >> The fix is to raise/lower IRQs when IMASK is changed. >> >

Re: [Qemu-devel] [PATCH 03/14] timer: ds1338 persist 12-hour mode selection

2018-07-07 Thread Michael Davidsaver
On 07/05/2018 09:35 PM, Michael Davidsaver wrote: > Also, I though I had test coverage of this bug. That's actually how I > noticed it to begin with. But it seems my later change to allow for a > slow test runner also stopped testing readback of the 12/24 hour mode bit. > It j

[Qemu-devel] [PATCH v2 07/14] tests: ds-rtc test wday offset

2018-07-07 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver --- tests/ds-rtc-common.h | 10 +++--- tests/ds-rtc-current-test.c | 9 - tests/ds-rtc-set-test.c | 6 -- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/tests/ds-rtc-common.h b/tests/ds-rtc-common.h index 5bc7ab32a6

[Qemu-devel] [PATCH v2 06/14] tests: ds-rtc test 12 hour mode

2018-07-07 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver --- tests/ds-rtc-common.h | 9 --- tests/ds-rtc-current-test.c | 2 +- tests/ds-rtc-set-test.c | 58 +++-- 3 files changed, 63 insertions(+), 6 deletions(-) diff --git a/tests/ds-rtc-common.h b/tests/ds

Re: [Qemu-devel] [PATCH 03/14] timer: ds1338 persist 12-hour mode selection

2018-07-05 Thread Michael Davidsaver
On 07/05/2018 08:39 PM, David Gibson wrote: > On Thu, Jul 05, 2018 at 11:19:50AM -0700, Michael Davidsaver wrote: > 11;rgb://> Need to save HOUR[HOUR12] bit to keep >> track of guest selection of 12-hour mode. >> Write through current time registers to >

[Qemu-devel] [PATCH 14/14] tests: drop ds1338-test

2018-07-05 Thread Michael Davidsaver
redundant to ds-rtc-*-test.c Signed-off-by: Michael Davidsaver --- tests/Makefile.include | 2 -- tests/ds1338-test.c| 75 -- 2 files changed, 77 deletions(-) delete mode 100644 tests/ds1338-test.c diff --git a/tests/Makefile.include b

[Qemu-devel] [PATCH 13/14] timer: ds-rtc model ds1375

2018-07-05 Thread Michael Davidsaver
differences from ds1338 * Has alarms (not modeled) * different control register (not modeled) * smaller address space (0x20 vs. 0x40) Signed-off-by: Michael Davidsaver Reviewed-by: Peter Maydell --- hw/timer/ds-rtc.c | 30 -- 1 file changed, 28 insertions(+), 2

[Qemu-devel] [PATCH 09/14] timer: rename file ds1338.c -> ds-rtc.c

2018-07-05 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver Reviewed-by: Peter Maydell --- default-configs/arm-softmmu.mak | 2 +- hw/timer/Makefile.objs | 2 +- hw/timer/{ds1338.c => ds-rtc.c} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename hw/timer/{ds1338.c => ds-rtc.c} (100%) diff -

[Qemu-devel] [PATCH 06/14] tests: ds-rtc test 12 hour mode

2018-07-05 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver --- tests/ds-rtc-set-test.c | 52 + 1 file changed, 52 insertions(+) diff --git a/tests/ds-rtc-set-test.c b/tests/ds-rtc-set-test.c index 35e1a36281..c48406ee2c 100644 --- a/tests/ds-rtc-set-test.c +++ b/tests/ds

[Qemu-devel] [PATCH 12/14] timer: ds-rtc handle CENTURY bit

2018-07-05 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver Reviewed-by: Peter Maydell --- hw/timer/ds-rtc.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/timer/ds-rtc.c b/hw/timer/ds-rtc.c index 6d3a8b5586..9abac38628 100644 --- a/hw/timer/ds-rtc.c +++ b/hw/timer/ds-rtc.c @@ -70,6 +70,7

[Qemu-devel] [PATCH 10/14] timer: ds1338 remove vestige of un-modeled OSF

2018-07-05 Thread Michael Davidsaver
Oscillator stop has never been modeled, so the Oscillator Stop Flag can never be set. Signed-off-by: Michael Davidsaver --- hw/timer/ds-rtc.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/hw/timer/ds-rtc.c b/hw/timer/ds-rtc.c index 3c5781d53c..126566ce1f

[Qemu-devel] [PATCH 01/14] tests: more thorough tests of ds1338

2018-07-05 Thread Michael Davidsaver
Test current time and set+get round trip. Separate current time test from set/get tests to avoid test needing to impose order, or to have a magic handshaketo reset RTC to current time. Signed-off-by: Michael Davidsaver --- tests/Makefile.include | 4 ++ tests/ds-rtc-common.h | 67

[Qemu-devel] [PATCH 05/14] timer: ds1338 change write handling and fix wday_offset handling

2018-07-05 Thread Michael Davidsaver
and host timezones. Allow guest to use any day as start of week (day 1). eg. Monday instead of Sunday. Signed-off-by: Michael Davidsaver --- hw/timer/ds1338.c | 95 --- 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/hw/timer

[Qemu-devel] [PATCH 08/14] timer: rename ds1338 -> dsrtc

2018-07-05 Thread Michael Davidsaver
Prepare to generalize with a more generic name. Keep device name and vmstate name "ds1338" for compatibility. Signed-off-by: Michael Davidsaver Reviewed-by: Peter Maydell --- hw/timer/ds1338.c | 72 +++ 1 file changed, 36 inserti

[Qemu-devel] [PATCH 04/14] timer: ds1338 clarify HOUR handling

2018-07-05 Thread Michael Davidsaver
Simplify and comment the translation between registers and struct tm. Signed-off-by: Michael Davidsaver --- hw/timer/ds1338.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/timer/ds1338.c b/hw/timer/ds1338.c index b56db5852e..637a0f4246 100644 --- a/hw

[Qemu-devel] [PATCH 00/14] Generalize Dallas/Maxim I2C RTC devices v3

2018-07-05 Thread Michael Davidsaver
o CTRL register handling is split out as a seperate patch "timer: ds1338 remove vestige of un-modeled OSF" = timer: ds-rtc handle CENTURY bit Changed as suggested. Michael Davidsaver (14): tests: more thorough tests of ds1338 timer: ds1338 use registerfields.h timer: ds1338

[Qemu-devel] [PATCH 07/14] tests: ds-rtc test wday offset

2018-07-05 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver --- tests/ds-rtc-common.h | 10 +++--- tests/ds-rtc-current-test.c | 9 - tests/ds-rtc-set-test.c | 6 -- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/tests/ds-rtc-common.h b/tests/ds-rtc-common.h index c8e6c2bc5b

[Qemu-devel] [PATCH 03/14] timer: ds1338 persist 12-hour mode selection

2018-07-05 Thread Michael Davidsaver
Need to save HOUR[HOUR12] bit to keep track of guest selection of 12-hour mode. Write through current time registers to achieve this. Will be overwritten by the next read/latch. This was only being done in two of three arms of this conditional block. Signed-off-by: Michael Davidsaver --- hw

[Qemu-devel] [PATCH 02/14] timer: ds1338 use registerfields.h

2018-07-05 Thread Michael Davidsaver
Use names for registers and bits except for R_CTRL which will be dealt with later, and isn't modeled anyway. Signed-off-by: Michael Davidsaver Reviewed-by: Peter Maydell --- hw/timer/ds1338.c | 80 +-- 1 file changed, 54 insertions(+

Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc: move at24c to its own CONFIG_ symbol

2018-05-23 Thread Michael Davidsaver
On 05/22/2018 10:30 PM, Thomas Huth wrote: > On 22.05.2018 21:17, Paolo Bonzini wrote: >> AT24c EEPROM is currently gated by CONFIG_I2C, and as such it is >> being included in all emulators that use I2C, even if they do not >> really need it. Separate it and, since it was added for the e500 >> mac

Re: [Qemu-devel] [PATCH 01/14] tests: more thorough tests of ds1338

2018-03-26 Thread Michael Davidsaver
On 03/26/2018 02:18 AM, Paolo Bonzini wrote: > On 24/03/2018 20:24, Michael Davidsaver wrote: >> Test current time and set+get round trip. >> Separate current time test from set/get >> tests to avoid test order issues. > > What are these issues? You can start a d

[Qemu-devel] [PATCH 11/14] timer: generalize ds1338

2018-03-24 Thread Michael Davidsaver
Add class level handling for address space size and control register. Signed-off-by: Michael Davidsaver --- hw/timer/ds-rtc.c | 63 --- 1 file changed, 46 insertions(+), 17 deletions(-) diff --git a/hw/timer/ds-rtc.c b/hw/timer/ds-rtc.c index

[Qemu-devel] [PATCH 03/14] timer: ds1338 persist 12-hour mode selection

2018-03-24 Thread Michael Davidsaver
Need to save HOUR[HOUR12] bit to keep track of guest selection of 12-hour mode. Write through current time registers to achieve this. Will be overwritten by the next read/latch. Signed-off-by: Michael Davidsaver --- hw/timer/ds1338.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions

[Qemu-devel] [PATCH 13/14] timer: ds-rtc model ds1375

2018-03-24 Thread Michael Davidsaver
differences from ds1338 * Has alarms (not modeled) * different control register (not modeled) * smaller address space (0x20 vs. 0x40) Signed-off-by: Michael Davidsaver --- hw/timer/ds-rtc.c | 30 -- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH 07/14] timer: ds1338 fix wday_offset handling

2018-03-24 Thread Michael Davidsaver
Correctly handle different real weekday in guest and host timezones. Allow guest to use any day as start of week (day 1). eg. Monday instead of Sunday. Signed-off-by: Michael Davidsaver --- hw/timer/ds1338.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff

[Qemu-devel] [PATCH 01/14] tests: more thorough tests of ds1338

2018-03-24 Thread Michael Davidsaver
Test current time and set+get round trip. Separate current time test from set/get tests to avoid test order issues. Signed-off-by: Michael Davidsaver --- tests/Makefile.include | 4 ++ tests/ds-rtc-common.h | 67 + tests/ds-rtc-current-test.c | 59

Re: [Qemu-devel] [PATCH 2/5] tests: more thorough test of ds1338

2018-03-24 Thread Michael Davidsaver
> On 02/20/2018 09:44 AM, Michael Davidsaver wrote: >> On 02/18/2018 11:39 PM, Thomas Huth wrote: ... >> That magic (together with patch 1/5) is IMHO a little bit ugly. I've hit >> the same problem with the m48t59 test recently, and I solved it by >> moving the qte

[Qemu-devel] [PATCH 10/14] timer: rename file ds1338.c -> ds-rtc.c

2018-03-24 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver --- default-configs/arm-softmmu.mak | 2 +- hw/timer/Makefile.objs | 2 +- hw/timer/{ds1338.c => ds-rtc.c} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename hw/timer/{ds1338.c => ds-rtc.c} (100%) diff --git a/default-configs/arm-softm

[Qemu-devel] [PATCH 04/14] timer: ds1338 clarify HOUR handling

2018-03-24 Thread Michael Davidsaver
Simplify and comment the translation between registers and struct tm. Signed-off-by: Michael Davidsaver --- hw/timer/ds1338.c | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/hw/timer/ds1338.c b/hw/timer/ds1338.c index 72a4692d60

[Qemu-devel] [PATCH 09/14] timer: rename ds1338 -> dsrtc

2018-03-24 Thread Michael Davidsaver
Prepare to generalize with a more generic name. Keep device name and vmstate name "ds1338" for compatibility. Signed-off-by: Michael Davidsaver --- hw/timer/ds1338.c | 74 +++ 1 file changed, 37 insertions(+), 37 deletions(-) diff

[Qemu-devel] [PATCH 02/14] timer: ds1338 use registerfields.h

2018-03-24 Thread Michael Davidsaver
Use names for registers and bits except for R_CTRL which will be dealt with later, and isn't modeled anyway. Signed-off-by: Michael Davidsaver --- hw/timer/ds1338.c | 84 ++- 1 file changed, 58 insertions(+), 26 deletions(-) diff --git

[Qemu-devel] [PATCH 06/14] tests: ds-rtc test 12 hour mode

2018-03-24 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver --- tests/ds-rtc-set-test.c | 52 + 1 file changed, 52 insertions(+) diff --git a/tests/ds-rtc-set-test.c b/tests/ds-rtc-set-test.c index 35e1a36281..c48406ee2c 100644 --- a/tests/ds-rtc-set-test.c +++ b/tests/ds

[Qemu-devel] [PATCH 08/14] tests: ds-rtc test wday offset

2018-03-24 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver --- tests/ds-rtc-common.h | 10 +++--- tests/ds-rtc-current-test.c | 9 - tests/ds-rtc-set-test.c | 6 -- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/tests/ds-rtc-common.h b/tests/ds-rtc-common.h index c8e6c2bc5b

[Qemu-devel] [PATCH 12/14] timer: ds-rtc handle CENTURY bit

2018-03-24 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver --- hw/timer/ds-rtc.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/hw/timer/ds-rtc.c b/hw/timer/ds-rtc.c index 2df1bce3f8..5a4df1b115 100644 --- a/hw/timer/ds-rtc.c +++ b/hw/timer/ds-rtc.c @@ -70,6 +70,7 @@ typedef

[Qemu-devel] [PATCH 05/14] timer: ds1338 change write handling

2018-03-24 Thread Michael Davidsaver
instead of a read-modify-write, do direct translation of device registers to struct tm members. This new ds1338_update() is the reverse of the existing capture_current_time(). Simplifies later handling of CENTURY bit in similar Dallas RTC chips. Signed-off-by: Michael Davidsaver --- hw/timer

[Qemu-devel] [PATCH 14/14] tests: drop ds1338-test

2018-03-24 Thread Michael Davidsaver
redundant to ds-rtc-*-test.c Signed-off-by: Michael Davidsaver --- tests/Makefile.include | 2 -- tests/ds1338-test.c| 75 -- 2 files changed, 77 deletions(-) delete mode 100644 tests/ds1338-test.c diff --git a/tests/Makefile.include b

[Qemu-devel] [PATCH 00/14] Generalize Dallas/Maxim I2C RTC devices v2

2018-03-24 Thread Michael Davidsaver
', and 1 second otherwise. Comparision of day of the week is still exact, so there is a chance of a false positive if the test is running across midnight UTC. Michael Davidsaver (14): tests: more thorough tests of ds1338 timer: ds1338 use registerfields.h timer: ds1338 persist 12-hour mode sel

Re: [Qemu-devel] [PATCH 2/5] tests: more thorough test of ds1338

2018-02-20 Thread Michael Davidsaver
On 02/18/2018 11:39 PM, Thomas Huth wrote: > On 19.02.2018 05:03, Michael Davidsaver wrote: >> Test current time and set+get round trip. >> >> The set+get test is repeated 4 times. These cases are >> spread across a single day in an attempt to trigger some potential

[Qemu-devel] [PATCH 3/5] timer: generalize Dallas/Maxim RTC i2c devices

2018-02-18 Thread Michael Davidsaver
in 24 hour mode. 2. wday_offset is always stored for the local time zone. When the RTC is set and rtc_utc=1 and the local timezone has a different day than UTC, then wday_offset will be off by one. Signed-off-by: Michael Davidsaver --- default-configs/arm-softmmu.mak | 2 +- hw/timer/Makefile

[Qemu-devel] [PATCH 5/5] tests: drop ds1338-test

2018-02-18 Thread Michael Davidsaver
Now redundant to ds-rtc-i2c-test. Signed-off-by: Michael Davidsaver --- tests/Makefile.include | 2 -- tests/ds1338-test.c| 75 -- 2 files changed, 77 deletions(-) delete mode 100644 tests/ds1338-test.c diff --git a/tests/Makefile.include b

[Qemu-devel] [PATCH 1/5] timer: ds1338 add magic reset for test code

2018-02-18 Thread Michael Davidsaver
When running w/ QTest, allow the tester to reliably zero time offsets. Allows tests to read the current time, and set time, independent of test order. Signed-off-by: Michael Davidsaver --- hw/timer/ds1338.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/timer/ds1338.c b/hw

[Qemu-devel] [PATCH 2/5] tests: more thorough test of ds1338

2018-02-18 Thread Michael Davidsaver
Test current time and set+get round trip. The set+get test is repeated 4 times. These cases are spread across a single day in an attempt to trigger some potential issues regardless of the timezone of the machine running the tests. Signed-off-by: Michael Davidsaver --- tests/Makefile.include

[Qemu-devel] [PATCH 0/5] Generalize Dallas/Maxim I2C RTC devices

2018-02-18 Thread Michael Davidsaver
hese are described in the commit message for #3. So this series first adds those tests which pass with both old and new model. Then later adds some additional tests which only pass with the new model. Michael Davidsaver (5): timer: ds1338 add magic reset for test code tests: more thorou

[Qemu-devel] [PATCH 4/5] tests: ds-rtc-i2c-test test 12 hour mode and DoW

2018-02-18 Thread Michael Davidsaver
Test time set+get in 12 hour mode. Also test handling of day of week offset. Signed-off-by: Michael Davidsaver --- tests/ds-rtc-i2c-test.c | 54 - 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/tests/ds-rtc-i2c-test.c b/tests/ds-rtc

Re: [Qemu-devel] [PATCH 05/17] timer: generalize Dallas/Maxim RTC i2c devices

2017-12-27 Thread Michael Davidsaver
On 12/06/2017 05:14 AM, David Gibson wrote: > On Sun, Dec 03, 2017 at 03:15:10PM -0600, Michael Davidsaver wrote: >> On 11/29/2017 11:13 PM, David Gibson wrote: >>> On Sun, Nov 26, 2017 at 03:59:03PM -0600, Michael Davidsaver wrote: >>>> Support for: ds1307, ds133

Re: [Qemu-devel] [PATCH 13/17] e500: move PCI host bridge into CCSR

2017-12-26 Thread Michael Davidsaver
On 12/06/2017 05:11 AM, David Gibson wrote: > On Tue, Dec 05, 2017 at 10:42:25PM -0500, Michael Davidsaver wrote: >> On 12/05/2017 01:53 AM, David Gibson wrote: >>> On Sun, Nov 26, 2017 at 03:59:11PM -0600, Michael Davidsaver wrote: >>>> Signed-off-by: Michael Davi

Re: [Qemu-devel] [PATCH 13/17] e500: move PCI host bridge into CCSR

2017-12-05 Thread Michael Davidsaver
On 12/05/2017 01:53 AM, David Gibson wrote: > On Sun, Nov 26, 2017 at 03:59:11PM -0600, Michael Davidsaver wrote: >> Signed-off-by: Michael Davidsaver > > Hmm. Is there anything you're *not* planning to move under the CCSR. Well, the decrementer/timebase initialization

Re: [Qemu-devel] [PATCH 12/17] e500: add i2c controller to CCSR

2017-12-05 Thread Michael Davidsaver
On 12/05/2017 01:49 AM, David Gibson wrote: > On Sun, Nov 26, 2017 at 03:59:10PM -0600, Michael Davidsaver wrote: >> Add i2c controller found on mpc8540, >> mpc8544, and P2010 (newer ppc, unmodeled). > > This adds it unconditionally. Are there any E500 models where it >

Re: [Qemu-devel] [PATCH 02/12] e500: consolidate mpc8540 guts with e500-ccsr

2017-12-05 Thread Michael Davidsaver
On 12/05/2017 10:12 PM, David Gibson wrote: > On Wed, Nov 22, 2017 at 02:36:43PM +1100, David Gibson wrote: >> On Sun, Nov 19, 2017 at 09:24:10PM -0600, Michael Davidsaver wrote: >>> Preparation for adding more MPC control >>> registers. >>> >>> U

Re: [Qemu-devel] [PATCH 05/17] timer: generalize Dallas/Maxim RTC i2c devices

2017-12-03 Thread Michael Davidsaver
On 11/29/2017 11:13 PM, David Gibson wrote: > On Sun, Nov 26, 2017 at 03:59:03PM -0600, Michael Davidsaver wrote: >> Support for: ds1307, ds1337, ds1338, ds1339, >> ds1340, ds1375, ds1388, and ds3231. >> >> Tested with ds1338 and ds1375. >> >> Signed-off-b

[Qemu-devel] [PATCH] etsec: fix IRQ (un)masking

2017-11-27 Thread Michael Davidsaver
update IRQ pins on reset. Signed-off-by: Michael Davidsaver --- hw/net/fsl_etsec/etsec.c | 68 +++- hw/net/fsl_etsec/etsec.h | 2 ++ hw/net/fsl_etsec/registers.h | 10 +++ hw/net/fsl_etsec/rings.c | 12 +--- 4 files changed, 49 inserti

Re: [Qemu-devel] [PATCH 03/17] i2c: add mpc8540 i2c controller

2017-11-27 Thread Michael Davidsaver
On 11/27/2017 01:12 AM, David Gibson wrote: > On Sun, Nov 26, 2017 at 03:59:01PM -0600, Michael Davidsaver wrote: >> Signed-off-by: Michael Davidsaver >> --- >> hw/i2c/Makefile.objs | 1 + >> hw/i2c/mpc8540_i2c.c | 307 >> +++

[Qemu-devel] [PATCH 16/17] tests: run ds-rtc-i2c-test w/ ppc/mvme3100

2017-11-26 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver --- tests/Makefile.include | 3 ++- tests/ds-rtc-i2c-test.c | 8 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 56045cdf09..062d4e5b7b 100644 --- a/tests/Makefile.include +++ b/tests

[Qemu-devel] [PATCH 15/17] ppc: add mvme3100 machine

2017-11-26 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver --- default-configs/ppc-softmmu.mak | 1 + hw/ppc/Makefile.objs| 1 + hw/ppc/mvme3100.c | 740 hw/ppc/mvme3100_cpld.c | 192 +++ 4 files changed, 934 insertions(+) create

[Qemu-devel] [PATCH 12/17] e500: add i2c controller to CCSR

2017-11-26 Thread Michael Davidsaver
Add i2c controller found on mpc8540, mpc8544, and P2010 (newer ppc, unmodeled). Signed-off-by: Michael Davidsaver --- hw/ppc/e500_ccsr.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/hw/ppc/e500_ccsr.c b/hw/ppc/e500_ccsr.c index c479ed91ee..cd8216daaf 100644 --- a/hw/ppc

[Qemu-devel] [PATCH 17/17] tests: add mvme3100-test

2017-11-26 Thread Michael Davidsaver
Exercise some features of the mvme3100 CPLD logic and read from the eeprom w/ VPD. Signed-off-by: Michael Davidsaver --- tests/Makefile.include | 3 ++ tests/mvme3100-test.c | 79 ++ 2 files changed, 82 insertions(+) create mode 100644 tests

[Qemu-devel] [PATCH 14/17] e500: split mpc8544ds specific initialization

2017-11-26 Thread Michael Davidsaver
split off the remaining board specific parts of e500_init() as mpc85xx_init() which will be used by the existing mpc8544ds and generic e500 boards. Signed-off-by: Michael Davidsaver --- hw/ppc/e500.c | 49 - hw/ppc/e500.h | 3 ++- hw

[Qemu-devel] [PATCH 05/17] timer: generalize Dallas/Maxim RTC i2c devices

2017-11-26 Thread Michael Davidsaver
Support for: ds1307, ds1337, ds1338, ds1339, ds1340, ds1375, ds1388, and ds3231. Tested with ds1338 and ds1375. Signed-off-by: Michael Davidsaver --- default-configs/arm-softmmu.mak | 2 +- hw/timer/Makefile.objs | 2 +- hw/timer/ds-rtc-i2c.c | 461

[Qemu-devel] [PATCH 09/17] e500: move mpic under CCSR

2017-11-26 Thread Michael Davidsaver
ff-by: Michael Davidsaver --- hw/ppc/e500.c | 102 +++-- hw/ppc/e500_ccsr.c | 85 +--- 2 files changed, 84 insertions(+), 103 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index e22919f4f1..1872b

[Qemu-devel] [PATCH 13/17] e500: move PCI host bridge into CCSR

2017-11-26 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver --- hw/ppc/e500.c | 13 - hw/ppc/e500_ccsr.c | 27 +++ 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index cfd5ed0152..b0c8495aef 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc

[Qemu-devel] [PATCH 07/17] e500: fix pci host bridge class/type

2017-11-26 Thread Michael Davidsaver
ters don't have valid values. Signed-off-by: Michael Davidsaver --- hw/pci-host/ppce500.c | 5 - 1 file changed, 5 deletions(-) diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c index f2d108bc8a..8073d396ff 100644 --- a/hw/pci-host/ppce500.c +++ b/hw/pci-host/ppce500.c @@ -423,11 +

[Qemu-devel] [PATCH 08/17] e500: additional CCSR registers

2017-11-26 Thread Michael Davidsaver
Add CCSRBAR to allow CCSR region to be relocated. Guest memory size introspection via RAM config registers. Dummy RAM error controls. Clock introspection via Power on Reset PLL Status Register. Signed-off-by: Michael Davidsaver ccsrbase also update iack --- hw/ppc/e500.c | 5 ++- hw

[Qemu-devel] [PATCH 03/17] i2c: add mpc8540 i2c controller

2017-11-26 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver --- hw/i2c/Makefile.objs | 1 + hw/i2c/mpc8540_i2c.c | 307 +++ hw/i2c/trace-events | 6 + 3 files changed, 314 insertions(+) create mode 100644 hw/i2c/mpc8540_i2c.c diff --git a/hw/i2c/Makefile.objs b/hw

[Qemu-devel] [PATCH 06/17] tests: rewrite testing for DS RTC devices

2017-11-26 Thread Michael Davidsaver
Replace existing ds1338-test with more thorough test of time read and set. Signed-off-by: Michael Davidsaver --- tests/Makefile.include | 4 +- tests/ds-rtc-i2c-test.c | 162 tests/ds1338-test.c | 77 --- 3 files

[Qemu-devel] [PATCH 11/17] e500: derive baud from CCB clock

2017-11-26 Thread Michael Davidsaver
y (valid) CCB frequency of 333MHz in the device tree and for the UART. Signed-off-by: Michael Davidsaver --- hw/ppc/e500.c | 9 - hw/ppc/e500_ccsr.c | 16 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 2d87d9158

[Qemu-devel] [PATCH 01/17] openpic: debug w/ info_report()

2017-11-26 Thread Michael Davidsaver
Replace *printf() with *_report(). Remove trailing new lines. Signed-off-by: Michael Davidsaver --- hw/intc/openpic.c | 102 +++--- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c index

[Qemu-devel] [PATCH 04/17] qtest: add e500_i2c_create()

2017-11-26 Thread Michael Davidsaver
Add interface for testing i2c devices with PPC e500. Signed-off-by: Michael Davidsaver --- tests/Makefile.include | 1 + tests/libqos/i2c-e500.c | 66 + tests/libqos/i2c.h | 3 +++ 3 files changed, 70 insertions(+) create mode 100644

[Qemu-devel] [PATCH 10/17] e500: move uarts CCSR

2017-11-26 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver --- hw/ppc/e500.c | 13 - hw/ppc/e500_ccsr.c | 18 ++ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 1872bb8eaa..2d87d91582 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c

[Qemu-devel] [PATCH 02/17] i2c: start trace-events

2017-11-26 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver --- Makefile.objs | 1 + hw/i2c/trace-events | 1 + 2 files changed, 2 insertions(+) create mode 100644 hw/i2c/trace-events diff --git a/Makefile.objs b/Makefile.objs index 285c6f3c15..984ae8ecba 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -155,6

[Qemu-devel] [PATCH 00/17] Add MVME3100 PPC SBC v2

2017-11-26 Thread Michael Davidsaver
anged Michael Davidsaver (17): openpic: debug w/ info_report() i2c: start trace-events i2c: add mpc8540 i2c controller qtest: add e500_i2c_create() timer: generalize Dallas/Maxim RTC i2c devices tests: rewrite testing for DS RTC devices e500: fix pci host bridge class/type e500: addit

Re: [Qemu-devel] [PATCH 01/12] e500: add board config options

2017-11-22 Thread Michael Davidsaver
On 11/21/2017 09:28 PM, David Gibson wrote: > On Sun, Nov 19, 2017 at 09:24:09PM -0600, Michael Davidsaver wrote: >> allow board code to skip common NIC and guest image setup >> and configure decrementor frequency. >> Existing boards unchanged. >> >> Signed-of

Re: [Qemu-devel] [PATCH 08/12] e500: add mpc8540 i2c controller to ccsr

2017-11-22 Thread Michael Davidsaver
On 11/21/2017 10:08 PM, David Gibson wrote: > On Sun, Nov 19, 2017 at 09:24:16PM -0600, Michael Davidsaver wrote: >> Signed-off-by: Michael Davidsaver > > You're adding what seems to be a fairly specific device to the general > e500 init - this again suggests that it s

Re: [Qemu-devel] [PATCH 00/12] Add MVME3100 PPC SBC

2017-11-21 Thread Michael Davidsaver
On 11/21/2017 10:12 PM, David Gibson wrote: ... > I've applied several patches from this series to ppc-for-2.12, others > I've commented on. If you could address the comments and rebase > what's left on ppc-for-2.12, that would be great. Will do. signature.asc Description: OpenPGP digital sign

Re: [Qemu-devel] [PATCH 03/12] e500: note possible bug with host bridge

2017-11-21 Thread Michael Davidsaver
On 11/21/2017 09:46 PM, David Gibson wrote: > On Sun, Nov 19, 2017 at 09:24:11PM -0600, Michael Davidsaver wrote: >> Signed-off-by: Michael Davidsaver > > I'm not sure if you're saying you think there is a hardware bug which > we're faithfully emulating, or

[Qemu-devel] [PATCH 10/12] timer: add ds1375 RTC

2017-11-19 Thread Michael Davidsaver
only basic functionality implemented (read time and sram). no set time or alarms. Signed-off-by: Michael Davidsaver --- default-configs/ppc-softmmu.mak | 1 + hw/timer/Makefile.objs | 1 + hw/timer/ds1375-i2c.c | 293 3 files

[Qemu-devel] [PATCH 11/12] ppc: add mvme3100 machine

2017-11-19 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver --- hw/ppc/Makefile.objs | 1 + hw/ppc/mvme3100.c | 688 + hw/ppc/mvme3100_cpld.c | 192 ++ 3 files changed, 881 insertions(+) create mode 100644 hw/ppc/mvme3100.c create mode 100644 hw/ppc

[Qemu-devel] [PATCH 09/12] nvram: add AT24Cx i2c eeprom

2017-11-19 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver --- hw/nvram/Makefile.objs | 1 + hw/nvram/eeprom_at24c.c | 205 2 files changed, 206 insertions(+) create mode 100644 hw/nvram/eeprom_at24c.c diff --git a/hw/nvram/Makefile.objs b/hw/nvram/Makefile.objs

[Qemu-devel] [PATCH 12/12] tests: add mvme3100-test

2017-11-19 Thread Michael Davidsaver
Exercise some features of the mvme3100 CPLD logic and read from the eeprom w/ VPD. Signed-off-by: Michael Davidsaver --- tests/Makefile.include | 3 ++ tests/mvme3100-test.c | 79 ++ 2 files changed, 82 insertions(+) create mode 100644 tests

[Qemu-devel] [PATCH 07/12] qtest: add e500_i2c_create()

2017-11-19 Thread Michael Davidsaver
Add interface for testing i2c devices with PPC e500. Signed-off-by: Michael Davidsaver --- tests/Makefile.include | 1 + tests/libqos/i2c-e500.c | 66 + tests/libqos/i2c.h | 3 +++ 3 files changed, 70 insertions(+) create mode 100644

[Qemu-devel] [PATCH 05/12] e500: name openpic and pci host bridge

2017-11-19 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver --- hw/ppc/e500.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 057be1751b..6f77844303 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -685,6 +685,8 @@ static DeviceState *ppce500_init_mpic_qemu(PPCE500Params

[Qemu-devel] [PATCH 00/12] Add MVME3100 PPC SBC

2017-11-19 Thread Michael Davidsaver
p-processor [2] https://www.rtems.org/ [3] https://github.com/mdavidsaver/qemu/wiki Michael Davidsaver (12): e500: add board config options e500: consolidate mpc8540 guts with e500-ccsr e500: note possible bug with host bridge e500: additional CCSR registers e500: name openpic and pci host bri

[Qemu-devel] [PATCH 06/12] i2c: add mpc8540 i2c controller

2017-11-19 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver --- hw/i2c/Makefile.objs | 1 + hw/i2c/mpc8540_i2c.c | 287 +++ 2 files changed, 288 insertions(+) create mode 100644 hw/i2c/mpc8540_i2c.c diff --git a/hw/i2c/Makefile.objs b/hw/i2c/Makefile.objs index

[Qemu-devel] [PATCH 03/12] e500: note possible bug with host bridge

2017-11-19 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver --- hw/pci-host/ppce500.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c index f2d108bc8a..0e2833bd98 100644 --- a/hw/pci-host/ppce500.c +++ b/hw/pci-host/ppce500.c @@ -424,6 +424,9 @@ static void

[Qemu-devel] [PATCH 04/12] e500: additional CCSR registers

2017-11-19 Thread Michael Davidsaver
Add CCSRBAR to allow CCSR region to be relocated. Guest memory size introspection. Dummy RAM error controls. Guest clock introspection. Signed-off-by: Michael Davidsaver --- hw/ppc/e500.c | 2 ++ hw/ppc/e500.h | 1 + hw/ppc/e500_ccsr.c | 72

[Qemu-devel] [PATCH 08/12] e500: add mpc8540 i2c controller to ccsr

2017-11-19 Thread Michael Davidsaver
Signed-off-by: Michael Davidsaver --- hw/ppc/e500.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 6f77844303..bef7d313d4 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -861,6 +861,14 @@ void ppce500_init(MachineState *machine, PPCE500Params

[Qemu-devel] [PATCH 01/12] e500: add board config options

2017-11-19 Thread Michael Davidsaver
allow board code to skip common NIC and guest image setup and configure decrementor frequency. Existing boards unchanged. Signed-off-by: Michael Davidsaver --- hw/ppc/e500.c | 8 ++-- hw/ppc/e500.h | 3 +++ hw/ppc/e500plat.c | 1 + hw/ppc/mpc8544ds.c | 1 + 4 files changed, 11

[Qemu-devel] [PATCH] e500: ppce500_init_mpic() return device instead of IRQ array

2017-10-20 Thread Michael Davidsaver
Actual number of interrupt pins isn't known in ppce500_init_mpic() so a hardcoded number was used, which causes a crash with older openpic. Instead, return the DeviceState* and change ppce500_init() to call qdev_get_gpio_in() to get only the irq pins which are needed. Signed-off-by: Mi

Re: [Qemu-devel] [PATCH 3/9] armv7m: Rewrite NVIC to not use any GIC code

2017-02-19 Thread Michael Davidsaver
On 02/18/2017 01:38 PM, Peter Maydell wrote: > On 18 February 2017 at 17:45, Michael Davidsaver > wrote: >> On 02/16/2017 09:11 AM, Peter Maydell wrote: >>> I haven't actually checked real hardware behaviour, but I think >>> we can fairly safely impl

Re: [Qemu-devel] [PATCH 3/9] armv7m: Rewrite NVIC to not use any GIC code

2017-02-18 Thread Michael Davidsaver
On 02/16/2017 09:11 AM, Peter Maydell wrote: > I haven't actually checked real hardware behaviour, but I think > we can fairly safely implement this as not checking the IPSR > exception field. (We might as well go with the "reads 1 in > handler mode" choice of UNKNOWN that the M3 documents, though.

Re: [Qemu-devel] [PATCH v2 01/26] armv7m: MRS/MSR handle unprivileged access

2017-01-12 Thread Michael Davidsaver
On 01/12/2017 09:14 AM, Peter Maydell wrote: > ... > Michael has confirmed to me that this was just an oversight. This was me not knowing the process. (just to confirm this publicly) signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] Any progress with the Cortex-M4 emulation?

2016-04-06 Thread Michael Davidsaver
On 04/06/2016 06:23 PM, Liviu Ionescu wrote: > >> On 07 Apr 2016, at 01:04, Peter Maydell wrote: >> >> ... Somebody needs to do the necessary work to fix the >> code review issues. ... > > in this case I'll probably wait for this process to be completed and > reevaluate the situation by then.

Re: [Qemu-devel] [PATCH v2 06/26] armv7m: fix I and F flag handling

2015-12-27 Thread Michael Davidsaver
On 12/17/2015 10:18 AM, Peter Maydell wrote: > On 17 December 2015 at 14:39, Peter Maydell wrote: >> On 3 December 2015 at 00:18, Michael Davidsaver >> wrote: >>> Despite having the same notation, these bits >>> have completely different meaning than -AR. >

Re: [Qemu-devel] [PATCH v2 02/26] armv7m: Undo armv7m.hack

2015-12-27 Thread Michael Davidsaver
On 12/17/2015 10:38 AM, Peter Maydell wrote: > We could use a comment here (a) explaining what we're doing and (b) > mentioning that this isn't architecturally correct -- ideally we should > catch these exception exits on execution of the jump insn, not by > letting the jump execute and then trappi

Re: [Qemu-devel] [PATCH v2 05/26] armv7m: add armv7m_excp_running_prio()

2015-12-27 Thread Michael Davidsaver
On 12/17/2015 09:36 AM, Peter Maydell wrote: > On 3 December 2015 at 00:18, Michael Davidsaver wrote: >> Implements v7m exception priority algorithm >> using FAULTMASK, PRIMASK, BASEPRI, and the highest >> priority active exception. >> >> The number returned

Re: [Qemu-devel] [PATCH v2 03/26] armv7m: Explicit error for bad vector table

2015-12-27 Thread Michael Davidsaver
On 12/17/2015 08:25 AM, Peter Maydell wrote: > On 3 December 2015 at 00:18, Michael Davidsaver wrote: >> ... >> +static >> +uint32_t arm_v7m_load_vector(ARMCPU *cpu) >> + >> +{ >> +CPUState *cs = &cpu->parent_obj; > This isn't the righ

Re: [Qemu-devel] [PATCH v2 02/26] armv7m: Undo armv7m.hack

2015-12-27 Thread Michael Davidsaver
On 12/17/2015 10:38 AM, Peter Maydell wrote: > On 3 December 2015 at 00:18, Michael Davidsaver wrote: >> Add CPU unassigned access handler in place of special >> MemoryRegion to catch exception returns. >> >> The unassigned handler will signal other faults as either >

[Qemu-devel] [PATCH v2 24/26] armv7m: split armv7m_init in two parts

2015-12-02 Thread Michael Davidsaver
Separate init and realize phases to allow board code the opportunity to set properties on the cpu and nvic. Assign names for cpu, nvic, and bitband regions. update stellaris and stm32 board code accordingly. --- hw/arm/armv7m.c| 42 +++--- hw/arm/stell

[Qemu-devel] [PATCH v2 26/26] armv7m: decide whether faults are MemManage or BusFault

2015-12-02 Thread Michael Davidsaver
General logic is that operations stopped by the MPU are MemManage, and those which go through the MPU and are caught by the unassigned handle are BusFault. --- target-arm/helper.c | 35 +-- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/target-arm/he

[Qemu-devel] [PATCH v2 16/26] armv7m: add some mpu debugging prints

2015-12-02 Thread Michael Davidsaver
Provide some more "-d mmu" related to the MPU translation process as an aid in debugging guest MPU configurations. Helpful since our MPU resolution is limited to the ARM7-AR page size. --- target-arm/helper.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/

  1   2   >