[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about (and problem with) pflash data access
From: |
Peter Maydell |
Subject: |
Re: Question about (and problem with) pflash data access |
Date: |
Thu, 13 Feb 2020 14:39:49 +0000 |
On Thu, 13 Feb 2020 at 14:26, Guenter Roeck <address@hidden> wrote:
> What really puzzles me is that there is no trace output for
> flash data accesses (trace_pflash_data_read and trace_pflash_data_write),
> meaning the actual flash data access must be handled elsewhere.
> Can someone give me a hint where that might be ?
> Clearly I am missing something about inner workings of qemu.
Probably the device is in 'romd' mode. A QEMU MemoryRegion
can be:
* RAM (includes ROM for these purposes) -- backed by host
memory, reads and writes (if permitted) go straight to
the host memory via fastpath accesses
* MMIO -- backed by a read and write accessor function,
all accesses go to these functions
* "ROM device" -- a mix of the above where there is a
backing bit of host memory but also accessor functions.
When the device is in "romd" mode, reads go direct to
host memory, and writes still go to the accessor function.
When the device is not in "romd" mode, reads also go
to the accessor function.
We use this in the pflash devices to make the common case
("just read the flash") fast. When the guest makes a write
to flash that puts it into programming mode, we call
memory_region_rom_device_set_romd(..., false) so we can
intercept reads and make them do the right thing for
programming mode.
thanks
-- PMM
- Question about (and problem with) pflash data access, Guenter Roeck, 2020/02/12
- Re: Question about (and problem with) pflash data access, Philippe Mathieu-Daudé, 2020/02/12
- Re: Question about (and problem with) pflash data access, Guenter Roeck, 2020/02/12
- Re: Question about (and problem with) pflash data access, Philippe Mathieu-Daudé, 2020/02/12
- Re: Question about (and problem with) pflash data access, Alexey Kardashevskiy, 2020/02/13
- Re: Question about (and problem with) pflash data access, Paolo Bonzini, 2020/02/13
- Re: Question about (and problem with) pflash data access, Guenter Roeck, 2020/02/13
- Re: Question about (and problem with) pflash data access,
Peter Maydell <=
- Re: Question about (and problem with) pflash data access, Philippe Mathieu-Daudé, 2020/02/13
- Re: Question about (and problem with) pflash data access, Guenter Roeck, 2020/02/13