Re: [PATCH v2 1/9] hw/char/pl011: Warn when using disabled receiver

2025-02-20 Thread Luc Michel
splay a warning when this occurs. > > Reviewed-by: Richard Henderson > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > hw/char/pl011.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/hw/char/pl011.c b/hw/char/pl011.c > in

Re: [PATCH 9/9] hw/char/sh_serial: Return correct number of empty RX FIFO elements

2025-02-20 Thread Luc Michel
es: 63242a007a1 ("SH4: Serial controller improvement") > Signed-off-by: Philippe Mathieu-Daudé nice one :) Reviewed-by: Luc Michel > --- > hw/char/sh_serial.c | 30 ++ > 1 file changed, 14 insertions(+), 16 deletions(-) > > diff --git a/h

Re: [PATCH 8/9] hw/char/mcf_uart: Really use RX FIFO depth

2025-02-20 Thread Luc Michel
troduced in commit 20dcee94833 ("MCF5208 emulation"), > we only read 1 char at a time! "the MCF UART model" Reviewed-by: Luc Michel > > Have the IOCanReadHandler handler return how many elements are > available, and use that in the IOReadHandler handler. > >

Re: [PATCH 7/9] hw/char/mcf_uart: Use FIFO_DEPTH definition instead of magic values

2025-02-20 Thread Luc Michel
On 22:08 Wed 19 Feb , Philippe Mathieu-Daudé wrote: > Defines FIFO_DEPTH and use it, fixing coding style. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > hw/char/mcf_uart.c | 10 +++--- > 1 file changed, 7 insertions(+), 3 deletions(-) &g

Re: [PATCH 6/9] hw/char/imx_serial: Really use RX FIFO depth

2025-02-20 Thread Luc Michel
On 22:08 Wed 19 Feb , Philippe Mathieu-Daudé wrote: > While we model a 32-elements RX FIFO since the PL011 model was > introduced in commit 988f2442971 ("hw/char/imx_serial: Implement > receive FIFO and ageing timer") we only read 1 char at a time! "the IMX serial m

Re: [PATCH 5/9] hw/char/bcm2835_aux: Really use RX FIFO depth

2025-02-20 Thread Luc Michel
patch and the subsequent ones you keep mentioning the PL011 model while you modify other UARTs. I guess you mean "the BCM2835 AUX model" here? In any case: Reviewed-by: Luc Michel > > Have the IOCanReadHandler handler return how many elements are > available, and use that in th

Re: [PATCH 4/9] hw/char/pl011: Really use RX FIFO depth

2025-02-20 Thread Luc Michel
1_can_receive LCR 0x70, RX FIFO used 0/16, can_receive 16 chars > pl011_can_receive LCR 0x70, RX FIFO used 0/16, can_receive 16 chars > pl011_read addr 0x018 value 0x0090 reg FR > pl011_write addr 0x000 value 0x0072 reg DR > > Inspired-by: Peter Maydell > Signed-off

Re: [PATCH 1/9] hw/char/pl011: Warn when using disabled receiver

2025-02-20 Thread Luc Michel
device model. I'd use "receiving" instead. > +} > +if (!(s->cr & CR_RXE)) { > +qemu_log_mask(LOG_GUEST_ERROR, "PL011 reading data on disabled TX > UART\n"); s/TX/RX Thanks, Luc > +} > r = s->read_count < pl011_get_fifo_depth(s); > trace_pl011_can_receive(s->lcr, s->read_count, r); > return r; > -- > 2.47.1 > --

Re: [PATCH 3/9] hw/char/pl011: Improve RX flow tracing events

2025-02-20 Thread Luc Michel
On 22:08 Wed 19 Feb , Philippe Mathieu-Daudé wrote: > Log FIFO use (availability and depth). > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > hw/char/pl011.c | 10 ++ > hw/char/trace-events | 7 --- > 2 files changed

Re: [PATCH 2/9] hw/char/pl011: Simplify a bit pl011_can_receive()

2025-02-20 Thread Luc Michel
On 22:08 Wed 19 Feb , Philippe Mathieu-Daudé wrote: > Introduce 'fifo_depth' and 'fifo_available' local variables > to better express the 'r' variable use. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > hw/char/p

Re: [PATCH v43 2/2] hw/sd/sdcard: Do not store vendor data on block drive (CMD56)

2024-07-03 Thread Luc Michel
On 18:10 Tue 02 Jul , Philippe Mathieu-Daudé wrote: > "General command" (GEN_CMD, CMD56) is described as: > > GEN_CMD is the same as the single block read or write > commands (CMD24 or CMD17). The difference is that [...] > the data block is not a memory payload data but has a > vendor

Re: [PATCH v4 3/3] tests/qtest: Check STM32L4x5 clock connections

2024-07-01 Thread Luc Michel
On 11:43 Sat 22 Jun , Inès Varhol wrote: > For USART, GPIO and SYSCFG devices, check that clock frequency before > and after enabling the peripheral clock in RCC is correct. > > Signed-off-by: Inès Varhol > Reviewed-by: Peter Maydell Reviewed-by: Luc Michel > --- >

Re: [PATCH v4 1/3] hw/misc: Create STM32L4x5 SYSCFG clock

2024-07-01 Thread Luc Michel
On 11:43 Sat 22 Jun , Inès Varhol wrote: > This commit creates a clock in STM32L4x5 SYSCFG and wires it up to the > corresponding clock from STM32L4x5 RCC. > > Signed-off-by: Inès Varhol > Reviewed-by: Peter Maydell > Reviewed-by: Philippe Mathieu-Daudé Revie

Re: [PATCH v42 06/98] hw/sd/sdcard: Do not store vendor data on block drive (CMD56)

2024-07-01 Thread Luc Michel
On 09:00 Fri 28 Jun , Philippe Mathieu-Daudé wrote: > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > "General command" (GEN_CMD, CMD56) is described as: > > GEN_CMD is the same as the single blo

Re: [PATCH v42 05/98] hw/sd/sdcard: Trace requested address computed by sd_req_get_address()

2024-06-28 Thread Luc Michel
On 09:00 Fri 28 Jun , Philippe Mathieu-Daudé wrote: > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel >

Re: [PATCH v3 3/4] hw/clock: Expose 'qtest-clock-period' QOM property for QTests

2024-05-27 Thread Luc Michel
uot;trace.h" > > @@ -158,6 +160,15 @@ bool clock_set_mul_div(Clock *clk, uint32_t multiplier, > uint32_t divider) > return true; > } > > +static void clock_period_prop_get(Object *obj, Visitor *v, const char *name, > +

Re: [PATCH 6/6] reset: Add RESET_TYPE_SNAPSHOT_LOAD

2024-04-16 Thread Luc Michel
ht reset type for the ShutdownCause it is passed. This > allows us to get rid of the device_reset_reason global we > were using to implement qemu_register_reset_nosnapshotload(). > > Signed-off-by: Peter Maydell Reviewed-by: Luc Michel > --- > docs/devel/reset.rst| 17 ++

Re: [PATCH 1/6] hw/misc: Don't special case RESET_TYPE_COLD in npcm7xx_clk, gcr

2024-04-16 Thread Luc Michel
't know > about should be handled like RESET_TYPE_COLD"; switch these > devices to do that. Then adding a new reset type will only > need to touch those devices where its behaviour really needs > to be different from the standard cold reset. > > Signed-off-by: Peter Mayde

Re: [PATCH 4/6] hw, target: Add ResetType argument to hold and exit phase methods

2024-04-16 Thread Luc Michel
--sp-file scripts/coccinelle/reset-type.cocci \ > --keep-comments --smpl-spacing --in-place \ > --include-headers --dir $dir; done > > and no manual edits. > > Signed-off-by: Peter Maydell Reviewed-by: Luc Michel > --- > incl

Re: [PATCH 5/6] docs/devel/reset: Update to new API for hold and exit phase methods

2024-04-16 Thread Luc Michel
On 17:08 Fri 12 Apr , Peter Maydell wrote: > Update the reset documentation's example code to match the new API > for the hold and exit phase method APIs where they take a ResetType > argument. > > Signed-off-by: Peter Maydell Reviewed-by: Luc Michel > --- >

Re: [PATCH 3/6] scripts/coccinelle: New script to add ResetType to hold and exit phases

2024-04-16 Thread Luc Michel
#x27;s reset method directly >calls the implementation of a different device's method > > Signed-off-by: Peter Maydell Reviewed-by: Luc Michel (I'm not a coccinelle expert but LGTM) > --- > The structure here is a bit of an experiment: usually I would make > the

Re: [PATCH 2/6] allwinner-i2c, adm1272: Use device_cold_reset() for software-triggered reset

2024-04-16 Thread Luc Michel
ture for the hold and exit reset methods. > > Signed-off-by: Peter Maydell Reviewed-by: Luc Michel > --- > hw/i2c/allwinner-i2c.c | 3 +-- > hw/sensor/adm1272.c| 2 +- > 2 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/hw/i2c/allwinner-i2c.c b/hw/i2c

Re: [PATCH for-9.0] Fix some typos in documentation (found by codespell)

2024-04-01 Thread Luc Michel
On 18:15 Sun 31 Mar , Stefan Weil wrote: > Signed-off-by: Stefan Weil Reviewed-by: Luc Michel > --- > docs/devel/atomics.rst | 2 +- > docs/devel/ci-jobs.rst.inc | 2 +- > docs/devel/clocks.rst | 2 +- > docs/system/i386/sgx.rst | 2 +- > qapi/qom.json

Re: [PATCH-for-9.0 1/2] hw/clock: Let clock_set_mul_div() return boolean value

2024-03-25 Thread Luc Michel
On 09:40 Mon 25 Mar , Luc Michel wrote: > On 16:58 Fri 22 Mar , Philippe Mathieu-Daudé wrote: > > Let clock_set_mul_div() return a boolean value whether the > > clock has been updated or not, similarly to clock_set(). > > > > Signed-off-by: Philippe Mathie

Re: [PATCH-for-9.0 2/2] hw/misc/stm32l4x5_rcc: Propagate period when enabling a clock

2024-03-25 Thread Luc Michel
ck_set() does not call clock_propagate(). clock_update() is a clock_set() followed by a clock_propagate() if the period changed. I think this is where the problem comes from here. clock_update() call won't call clock_propagate() if the clock period does not change. I think you'll want som

Re: [PATCH-for-9.0 1/2] hw/clock: Let clock_set_mul_div() return boolean value

2024-03-25 Thread Luc Michel
On 16:58 Fri 22 Mar , Philippe Mathieu-Daudé wrote: > Let clock_set_mul_div() return a boolean value whether the > clock has been updated or not, similarly to clock_set(). > > Signed-off-by: Philippe Mathieu-Daudé Acked-by: Luc Michel > --- > include/hw/clock.h |

Re: [PATCH v5 09/12] contrib/plugins/hotblocks: migrate to new per_vcpu API

2024-03-01 Thread Luc Michel
On 14:33 Thu 29 Feb , Alex Bennée wrote: > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > Luc Michel writes: > > > On 15:09 Tue 27 Feb , Pierrick Bouvier wrote: >

Re: [PATCH v5 06/12] tests/plugin/mem: migrate to new per_vcpu API

2024-02-27 Thread Luc Michel
On 14:56 Tue 27 Feb , Pierrick Bouvier wrote: > Hi Luc, > > On 2/27/24 1:35 PM, Luc Michel wrote: > > Hi Pierrick, > > > > On 13:14 Mon 26 Feb , Pierrick Bouvier wrote: > > > Signed-off-by: Pierrick Bouvier >

Re: [PATCH v5 09/12] contrib/plugins/hotblocks: migrate to new per_vcpu API

2024-02-27 Thread Luc Michel
On 15:09 Tue 27 Feb , Pierrick Bouvier wrote: > On 2/27/24 2:54 PM, Luc Michel wrote: > > Hi Pierrick, > > > > On 13:14 Mon 26 Feb , Pierrick Bouvier wrote: > > > Signed-off-by: Pierrick Bouvier > > > --- &

Re: [PATCH v5 09/12] contrib/plugins/hotblocks: migrate to new per_vcpu API

2024-02-27 Thread Luc Michel
Hi Pierrick, On 13:14 Mon 26 Feb , Pierrick Bouvier wrote: > Signed-off-by: Pierrick Bouvier > --- > contrib/plugins/hotblocks.c | 50 ++--- > 1 file changed, 30 insertions(+), 20 deletions(-) > > diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hot

Re: [PATCH v5 08/12] tests/plugin/bb: migrate to new per_vcpu API

2024-02-27 Thread Luc Michel
On 13:14 Mon 26 Feb , Pierrick Bouvier wrote: > Signed-off-by: Pierrick Bouvier Reviewed-by: Luc Michel > --- > tests/plugin/bb.c | 63 +++ > 1 file changed, 26 insertions(+), 37 deletions(-) > > diff --git a/tests/plugin/b

Re: [PATCH v5 07/12] tests/plugin/insn: migrate to new per_vcpu API

2024-02-27 Thread Luc Michel
On 13:14 Mon 26 Feb , Pierrick Bouvier wrote: > Signed-off-by: Pierrick Bouvier Reviewed-by: Luc Michel > --- > tests/plugin/insn.c | 106 +--- > 1 file changed, 50 insertions(+), 56 deletions(-) > > diff --git a/tests/plugin/ins

Re: [PATCH v5 06/12] tests/plugin/mem: migrate to new per_vcpu API

2024-02-27 Thread Luc Michel
back counts into the same variable. I wonder... For this test don't you want to keep a plain uint64_t for callback counts? I have the feeling that this test was made so one can make sure inline and callback counts match. Luc > static bool do_inline, do_callback; > static bool do_h

Re: [PATCH 0/7] hw/i386: Cleanups around 'hw/i386/pc.h'

2024-02-13 Thread Luc Michel
rt92.c| 1 + > hw/isa/lpc_ich9.c | 1 - > hw/timer/hpet.c | 1 - > target/i386/monitor.c | 1 - > 9 files changed, 8 insertions(+), 12 deletions(-) > > -- > 2.41.0 > > For the series: Reviewed-by: Luc Michel

[PATCH v2] hw/arm/smmuv3: add support for stage 1 access fault

2024-02-13 Thread Luc Michel
An access fault is raised when the Access Flag is not set in the looked-up PTE and the AFFD field is not set in the corresponding context descriptor. This was already implemented for stage 2. Implement it for stage 1 as well. Signed-off-by: Luc Michel --- v2: drop erroneous submodule

[PATCH] hw/arm/smmuv3: add support for stage 1 access fault

2024-02-09 Thread Luc Michel
An access fault is raised when the Access Flag is not set in the looked-up PTE and the AFFD field is not set in the corresponding context descriptor. This was already implemented for stage 2. Implement it for stage 1 as well. Signed-off-by: Luc Michel --- hw/arm/smmuv3-internal.h | 1

Re: [PATCH for-9.0] docs/devel/docs: Document .hx file syntax

2023-12-14 Thread Luc Michel
s process works, > or anything else that developers might need to know about > how to add documentation. > > Make the .hx files refer to this doc file, and clean > up their header comments to be more accurate for the > usage in each file and less cut-n-pasted. > > Signed-off-by:

Re: Questions about clocks emulation

2023-12-13 Thread Luc Michel
Hi, On 20:13 Wed 13 Dec , Philippe Mathieu-Daudé wrote: > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > Hi Arnaud, > > (Cc'ing Peter and Luc) > > On 12/12/23 14

Re: [PATCH trivial 13/21] hw/net/cadence_gem.c: spelling fixes: Octects

2023-11-15 Thread Luc Michel
On 19:58 Tue 14 Nov , Michael Tokarev wrote: > Fixes: c755c943aa2e "hw/net/cadence_gem: use REG32 macro for register > definitions" > Cc: Luc Michel > Cc: Peter Maydell > Signed-off-by: Michael Tokarev Reviewed-by: Luc Michel > --- > hw/net/cadence_gem.c

Re: [PATCH 10/10] hw/arm/xlnx-zynqmp: Remove 'hw/arm/boot.h' from header

2023-10-25 Thread Luc Michel
On 08:53 Wed 25 Oct , Philippe Mathieu-Daudé wrote: > "hw/arm/boot.h" is only required on the source file. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > include/hw/arm/xlnx-zynqmp.h | 1 - > hw/arm/xlnx-zcu102.c | 1 + >

Re: [PATCH 08/10] hw/arm/fsl-imx7: Remove 'hw/arm/boot.h' from header

2023-10-25 Thread Luc Michel
On 08:53 Wed 25 Oct , Philippe Mathieu-Daudé wrote: > "hw/arm/boot.h" is only required on the source file. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > include/hw/arm/fsl-imx7.h | 1 - > hw/arm/mcimx7d-sabre.c| 1 + > 2 f

Re: [PATCH 09/10] hw/arm/xlnx-versal: Remove 'hw/arm/boot.h' from header

2023-10-25 Thread Luc Michel
On 08:53 Wed 25 Oct , Philippe Mathieu-Daudé wrote: > "hw/arm/boot.h" is only required on the source file. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > include/hw/arm/xlnx-versal.h | 1 - > hw/arm/xlnx-versal-virt.c| 1 + >

Re: [PATCH 07/10] hw/arm/fsl-imx6ul: Remove 'hw/arm/boot.h' from header

2023-10-25 Thread Luc Michel
On 08:53 Wed 25 Oct , Philippe Mathieu-Daudé wrote: > "hw/arm/boot.h" is only required on the source file. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > include/hw/arm/fsl-imx6ul.h | 1 - > hw/arm/mcimx6ul-evk.c | 1 + >

Re: [PATCH 05/10] hw/arm/fsl-imx31: Remove 'hw/arm/boot.h' from header

2023-10-25 Thread Luc Michel
On 08:53 Wed 25 Oct , Philippe Mathieu-Daudé wrote: > "hw/arm/boot.h" is only required on the source file. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > include/hw/arm/fsl-imx31.h | 1 - > hw/arm/kzm.c | 1 + > 2 f

Re: [PATCH 06/10] hw/arm/fsl-imx6: Remove 'hw/arm/boot.h' from header

2023-10-25 Thread Luc Michel
On 08:53 Wed 25 Oct , Philippe Mathieu-Daudé wrote: > "hw/arm/boot.h" is only required on the source file. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > include/hw/arm/fsl-imx6.h | 1 - > hw/arm/sabrelite.c| 1 + > 2 f

Re: [PATCH 03/10] hw/arm/allwinner-r40: Remove 'hw/arm/boot.h' from header

2023-10-25 Thread Luc Michel
On 08:53 Wed 25 Oct , Philippe Mathieu-Daudé wrote: > "hw/arm/boot.h" is only required on the source file. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > include/hw/arm/allwinner-r40.h | 1 - > hw/arm/bananapi_m2u.c

Re: [PATCH 02/10] hw/arm/allwinner-h3: Remove 'hw/arm/boot.h' from header

2023-10-25 Thread Luc Michel
On 08:53 Wed 25 Oct , Philippe Mathieu-Daudé wrote: > "hw/arm/boot.h" is only required on the source file. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > include/hw/arm/allwinner-h3.h | 1 - > hw/arm/orangepi.c | 1 + >

Re: [PATCH 04/10] hw/arm/fsl-imx25: Remove 'hw/arm/boot.h' from header

2023-10-25 Thread Luc Michel
On 08:53 Wed 25 Oct , Philippe Mathieu-Daudé wrote: > "hw/arm/boot.h" is only required on the source file. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > include/hw/arm/fsl-imx25.h | 1 - > hw/arm/imx25_pdk.c | 1 + > 2 f

Re: [PATCH 01/10] hw/arm/allwinner-a10: Remove 'hw/arm/boot.h' from header

2023-10-25 Thread Luc Michel
On 08:53 Wed 25 Oct , Philippe Mathieu-Daudé wrote: > "hw/arm/boot.h" is only required on the source file. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel > --- > include/hw/arm/allwinner-a10.h | 1 - > hw/arm/cubieboard.c

[PATCH 09/11] hw/net/cadence_gem: use FIELD to describe PHYMNTNC register fields

2023-10-17 Thread Luc Michel
Use the FIELD macro to describe the PHYMNTNC register fields. Signed-off-by: Luc Michel --- hw/net/cadence_gem.c | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index 955a8da134..4c5fe10316 100644

[PATCH 02/11] hw/net/cadence_gem: use FIELD for screening registers

2023-10-17 Thread Luc Michel
Describe screening registers fields using the FIELD macros. Signed-off-by: Luc Michel --- hw/net/cadence_gem.c | 92 ++-- 1 file changed, 47 insertions(+), 45 deletions(-) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index 0e5744ecd7

[PATCH 03/11] hw/net/cadence_gem: use FIELD to describe NWCTRL register fields

2023-10-17 Thread Luc Michel
Use the FIELD macro to describe the NWCTRL register fields. Signed-off-by: Luc Michel --- hw/net/cadence_gem.c | 53 +--- 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index f01c81de97

[PATCH 08/11] hw/net/cadence_gem: use FIELD to describe DESCONF6 register fields

2023-10-17 Thread Luc Michel
Use the FIELD macro to describe the DESCONF6 register fields. Signed-off-by: Luc Michel --- hw/net/cadence_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index 6d084a3b31..955a8da134 100644 --- a/hw/net/cadence_gem.c

[PATCH 04/11] hw/net/cadence_gem: use FIELD to describe NWCFG register fields

2023-10-17 Thread Luc Michel
Use de FIELD macro to describe the NWCFG register fields. Signed-off-by: Luc Michel --- hw/net/cadence_gem.c | 60 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index 2864f0940e

[PATCH 00/11] Various updates for the Cadence GEM model

2023-10-17 Thread Luc Michel
write to the PHYMNTNC register (as the real hardware does). Patch 11 fixes a potential bug on hosts where unsigned would not be 32 bits. Thanks, -- Luc Luc Michel (11): hw/net/cadence_gem: use REG32 macro for register definitions hw/net/cadence_gem: use FIELD for screening registers hw/net

[PATCH 11/11] hw/net/cadence_gem: enforce 32 bits variable size for CRC

2023-10-17 Thread Luc Michel
The CRC was stored in an unsigned variable in gem_receive. Change it for a uint32_t to ensure we have the correct variable size here. Signed-off-by: Luc Michel --- hw/net/cadence_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/cadence_gem.c b/hw/net

[PATCH 05/11] hw/net/cadence_gem: use FIELD to describe DMACFG register fields

2023-10-17 Thread Luc Michel
Use de FIELD macro to describe the DMACFG register fields. Signed-off-by: Luc Michel --- hw/net/cadence_gem.c | 48 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index 09f570b6fb

[PATCH 10/11] hw/net/cadence_gem: perform PHY access on write only

2023-10-17 Thread Luc Michel
The MDIO access is done only on a write to the PHYMNTNC register. A subsequent read is used to retrieve the result but does not trigger an MDIO access by itself. Refactor the PHY access logic to perform all accesses (MDIO reads and writes) at PHYMNTNC write time. Signed-off-by: Luc Michel

[PATCH 07/11] hw/net/cadence_gem: use FIELD to describe IRQ register fields

2023-10-17 Thread Luc Michel
Use de FIELD macro to describe the IRQ related register fields. Signed-off-by: Luc Michel --- hw/net/cadence_gem.c | 51 +--- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index 0acee1d544

[PATCH 06/11] hw/net/cadence_gem: use FIELD to describe [TX|RX]STATUS register fields

2023-10-17 Thread Luc Michel
Use de FIELD macro to describe the TXSTATUS and RXSTATUS register fields. Signed-off-by: Luc Michel --- hw/net/cadence_gem.c | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index 5c386adff2

[PATCH 01/11] hw/net/cadence_gem: use REG32 macro for register definitions

2023-10-17 Thread Luc Michel
Replace register defines with the REG32 macro from registerfields.h in the Cadence GEM device. Signed-off-by: Luc Michel --- hw/net/cadence_gem.c | 527 +-- 1 file changed, 261 insertions(+), 266 deletions(-) diff --git a/hw/net/cadence_gem.c b/hw/net

[PATCH v2] mailmap: update email addresses for Luc Michel

2023-09-29 Thread Luc Michel
Map my old and now invalid work email addresses to my personal one. Signed-off-by: Luc Michel --- Please ignore v1 sent with wrong e-mail address. --- .mailmap | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.mailmap b/.mailmap index 64ef9f4de6..49f581bafd 100644 --- a/.mailmap +++ b

Re: [PATCH] MAINTAINERS: update my email address for the clock framework

2023-02-13 Thread Luc Michel
On 10:53 Mon 13 Feb , Damien Hedde wrote: > Also update mailmap > > Signed-off-by: Damien Hedde Reviewed-by: Luc Michel > --- > MAINTAINERS | 2 +- > .mailmap| 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/MAINTAINERS b/MAI

Re: [PATCH v4 27/53] semihosting: Split out semihost_sys_open

2022-06-27 Thread Luc Michel
On 08:05 Wed 22 Jun , Richard Henderson wrote: > On 6/22/22 02:35, Luc Michel wrote: > > On 13:45 Tue 07 Jun , Richard Henderson wrote: > > > Split out the non-ARM specific portions of SYS_OPEN to a > > > reusable function. This handles gdb and host file i/o.

Re: [PATCH v4 24/53] semihosting: Split out common-semi-target.h

2022-06-27 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Move the ARM and RISCV specific helpers into > their own header file. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > target/arm/common-semi-target.h | 62 > target/riscv

Re: [PATCH v4 53/53] semihosting: Create semihost_sys_poll_one

2022-06-27 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > This will be used for implementing the xtensa select_one > system call. Choose "poll" over "select" so that we can > reuse Glib's g_poll constants and to avoid struct timeval. > > Signed-off-by: Ric

Re: [PATCH v4 51/53] semihosting: Use console_out_gf for SYS_WRITE0

2022-06-27 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > semihosting/arm-compat-semi.c | 11 +-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/semihosting/arm-compat-semi.c b/semi

Re: [PATCH v4 52/53] semihosting: Remove qemu_semihosting_console_outs

2022-06-27 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > This function has been replaced by *_write. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/console.h | 13 -- > linux-user/semihost.c | 17 >

Re: [PATCH v4 50/53] semihosting: Remove qemu_semihosting_console_outc

2022-06-27 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > This function has been replaced by *_write. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/console.h | 13 - > linux-user/semihost.c | 16 -

Re: [PATCH v4 49/53] semihosting: Use console_out_gf for SYS_WRITEC

2022-06-27 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > semihosting/arm-compat-semi.c | 20 > 1 file changed, 16 insertions(+), 4 deletions(-) > > diff --git a/semihosting/arm-compat-semi.c

Re: [PATCH v4 48/53] semihosting: Use console_in_gf for SYS_READC

2022-06-27 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > semihosting/arm-compat-semi.c | 27 ++- > 1 file changed, 18 insertions(+), 9 deletions(-) > > diff --git a/semihosting/a

Re: [PATCH v4 47/53] semihosting: Create qemu_semihosting_guestfd_init

2022-06-27 Thread Luc Michel
by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/guestfd.h | 7 + > include/semihosting/semihost.h | 1 + > linux-user/main.c | 9 ++ > semihosting/console.c | 2 ++ > semihosting/guestfd.c | 52 ++

Re: [PATCH v4 46/53] semihosting: Add GuestFDConsole

2022-06-27 Thread Luc Michel
iptor > exposed to the guest. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/guestfd.h | 7 ++-- > semihosting/syscalls.c| 68 +++ > 2 files changed, 72 insertions(+), 3 deletions(-) &

Re: [PATCH v4 45/53] semihosting: Create qemu_semihosting_console_write

2022-06-27 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Will replace qemu_semihosting_console_{outs,outc}, > but we need more plumbing first. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/console.h | 12 >

Re: [PATCH v4 44/53] semihosting: Cleanup chardev init

2022-06-24 Thread Luc Michel
which lets us drop > semihosting_get_chardev. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/semihost.h | 13 ++--- > semihosting/config.c | 17 +++-- > semihosting/console.c | 31

Re: [PATCH v4 43/53] semihosting: Expand qemu_semihosting_console_inc to read

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Allow more than one character to be read at one time. > Will be used by m68k and nios2 semihosting for stdio. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/console.h | 12 +++

Re: [PATCH v4 40/53] gdbstub: Adjust gdb_syscall_complete_cb declaration

2022-06-24 Thread Luc Michel
ed ("TARGET_FMT_ld")", > - __func__, err); > +if (err) { > +qemu_log("%s: gdb console output failed (%d)", __func__, err); While you're at it, this qemu_log() call probably lacks a '\n'. Reviewed-by: Luc Michel > } > }

Re: [PATCH v4 42/53] semihosting: Pass CPUState to qemu_semihosting_console_inc

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > We don't need CPUArchState, and we do want the CPUState of the > thread performing the operation -- use this instead of current_cpu. > > Reviewed-by: Peter Maydell > Signed-off-by: Richard Henderson Reviewed-by: Luc Miche

Re: [PATCH v4 41/53] semihosting: Fix docs comment for qemu_semihosting_console_inc

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > The implementation of qemu_semihosting_console_inc does not > defer to gdbstub, but only reads from the fifo in console.c. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihos

Re: [PATCH v4 38/53] semihosting: Create semihost_sys_{stat,fstat}

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > These syscalls will be used by m68k and nios2 semihosting. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 7 ++ > semihosting/syscal

Re: [PATCH v4 39/53] semihosting: Create semihost_sys_gettimeofday

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > This syscall will be used by m68k and nios2 semihosting. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 3 +++ > semihosting/sysca

Re: [PATCH v4 38/53] semihosting: Create semihost_sys_{stat,fstat}

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > These syscalls will be used by m68k and nios2 semihosting. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 7 ++ > semihosting/syscal

Re: [PATCH v4 37/53] semihosting: Split out semihost_sys_system

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Split out the non-ARM specific portions of SYS_SYSTEM to a > reusable function. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 3 +++ > semihosting/ar

Re: [PATCH v4 35/53] semihosting: Split out semihost_sys_remove

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Split out the non-ARM specific portions of SYS_REMOVE to a > reusable function. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 3 +++ > semihosting/ar

Re: [PATCH v4 36/53] semihosting: Split out semihost_sys_rename

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Split out the non-ARM specific portions of SYS_RENAME to a > reusable function. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 4 +++ > semihosting/ar

Re: [PATCH v4 34/53] semihosting: Split out semihost_sys_flen

2022-06-24 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > The ARM-specific SYS_FLEN isn't really something that can be > reused by other semihosting apis, but there are parts that can > reused for the implementation of semihost_sys_fstat. > > Signed-off-by: Richard Henderson Rev

Re: [PATCH v2 2/7] semihosting: add the semihosting_exit_request function

2022-06-23 Thread Luc Michel
On 20:09 Wed 22 Jun , Peter Maydell wrote: > On Tue, 21 Jun 2022 at 13:59, Luc Michel wrote: > > > > Add the semihosting_exit_request function to be used by targets when > > handling an `exit' semihosted syscall. This function calls gdb_exit to > > clo

Re: [PATCH v4 33/53] semihosting: Split out semihost_sys_isatty

2022-06-22 Thread Luc Michel
gt; success result. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 3 +++ > semihosting/arm-compat-semi.c | 40 -- > semihosting/syscalls.c | 36 ++ >

Re: [PATCH v4 32/53] semihosting: Split out semihost_sys_lseek

2022-06-22 Thread Luc Michel
ternal type of the offset to int64_t, and > provide the whence argument, which will be required by > m68k and nios2 semihosting. > > Note that gdb_do_syscall %x reads target_ulong, not int. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/

Re: [PATCH v4 31/53] semihosting: Bound length for semihost_sys_{read, write}

2022-06-22 Thread Luc Michel
rson Reviewed-by: Luc Michel > --- > semihosting/syscalls.c | 16 > 1 file changed, 16 insertions(+) > > diff --git a/semihosting/syscalls.c b/semihosting/syscalls.c > index 5cb12d6adc..eefbae74f1 100644 > --- a/semihosting/syscalls.c > +++ b/semihosting

Re: [PATCH v4 30/53] semihosting: Split out semihost_sys_write

2022-06-22 Thread Luc Michel
; > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > include/semihosting/syscalls.h | 6 > semihosting/arm-compat-semi.c | 52 +--- > semihosting/syscalls.c | 54 ++ > 3 files cha

Re: [PATCH v4 29/53] semihosting: Split out semihost_sys_read

2022-06-22 Thread Luc Michel
rw_cb(CPUState *cs, target_ulong ret, target_ulong > err) > +{ > +/* Recover the original length from the third argument. */ > +CPUArchState *env G_GNUC_UNUSED = cs->env_ptr; > +target_ulong args = common_semi_arg(cs, 1); > +target_ulong arg2; > +GET_ARG(2); > +

Re: [PATCH v4 28/53] semihosting: Split out semihost_sys_close

2022-06-22 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Split out the non-ARM specific portions of SYS_CLOSE to a > reusable function. This handles all GuestFD. > > Note that gdb_do_syscall %x reads target_ulong, not int. > > Signed-off-by: Richard Henderson Revie

Re: [PATCH v4 27/53] semihosting: Split out semihost_sys_open

2022-06-22 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Split out the non-ARM specific portions of SYS_OPEN to a > reusable function. This handles gdb and host file i/o. > > Add helpers to validate the length of the filename string. > Prepare for usage by other semihosting by allowing the > filename

Re: [PATCH v4 25/53] semihosting: Use env more often in do_common_semihosting

2022-06-22 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > We've already loaded cs->env_ptr into a local variable; use it. > Since env is unconditionally used, we don't need a dummy use. > > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > se

Re: [PATCH v4 19/53] gdbstub: Convert GDB error numbers to host error numbers

2022-06-22 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Provide the callback with consistent state -- always use > host error numbers. The individual callback can then > decide if the errno requires conversion for the guest. > > Signed-off-by: Richard Henderson Reviewed

Re: [PATCH v4 05/53] accel/stubs: Add tcg stub for probe_access_flags

2022-06-22 Thread Luc Michel
On 13:45 Tue 07 Jun , Richard Henderson wrote: > Signed-off-by: Richard Henderson Reviewed-by: Luc Michel > --- > accel/stubs/tcg-stub.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c > index ea4a0dd2

Re: [PATCH v2 0/7] semihosting: proper QEMU exit on semihosted exit syscall

2022-06-22 Thread Luc Michel
On 07:37 Tue 21 Jun , Richard Henderson wrote: > On 6/21/22 05:59, Luc Michel wrote: > > v2: > >- fix linux-user compilation. Declare semihosting_exit_request "static > > inline G_NORETURN" on CONFIG_USER_ONLY side. Use > > g_assert_not_reac

[PATCH v2 7/7] target/xtensa: use semihosting_exit_request on semihosted exit syscall

2022-06-21 Thread Luc Michel
Use the new semihosting_exit_request instead of a call to exit when handling a semihosted exit syscall. Signed-off-by: Luc Michel --- target/xtensa/xtensa-semi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/xtensa/xtensa-semi.c b/target/xtensa/xtensa-semi.c index

[PATCH v2 6/7] target/nios2: use semihosting_exit_request on semihosted exit syscall

2022-06-21 Thread Luc Michel via
Use the new semihosting_exit_request instead of a call to exit when handling a semihosted exit syscall. Signed-off-by: Luc Michel --- target/nios2/nios2-semi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/nios2/nios2-semi.c b/target/nios2/nios2-semi.c index

  1   2   3   4   5   6   7   >