All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] How to trigger faults for missing peripherals?
@ 2015-06-18  9:45 Liviu Ionescu
  2015-06-18 10:21 ` Peter Maydell
  0 siblings, 1 reply; 4+ messages in thread
From: Liviu Ionescu @ 2015-06-18  9:45 UTC (permalink / raw)
  To: QEMU Developers

In order to make the Cortex-M emulation accurate, I would need to configure the missing address ranges to trigger memory faults.

I noticed that the emulator defines a memory range to cover the entire 64-bits memory space. Is it possible to make it trigger exceptions?

If not, what would be the solution? To define the entire Cortex-M 32-bits memory space as a memory range that will trigger exceptions, and on top of it define the existing memory ranges?


Regards,

Liviu

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

* Re: [Qemu-devel] How to trigger faults for missing peripherals?
  2015-06-18  9:45 [Qemu-devel] How to trigger faults for missing peripherals? Liviu Ionescu
@ 2015-06-18 10:21 ` Peter Maydell
  2015-06-18 14:30   ` Liviu Ionescu
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2015-06-18 10:21 UTC (permalink / raw)
  To: Liviu Ionescu; +Cc: QEMU Developers

On 18 June 2015 at 10:45, Liviu Ionescu <ilg@livius.net> wrote:
> In order to make the Cortex-M emulation accurate, I would need to configure the missing address ranges to trigger memory faults.
>
> I noticed that the emulator defines a memory range to
> cover the entire 64-bits memory space. Is it possible
> to make it trigger exceptions?

In theory, but the machinery to do this is a bit broken
and there's a bunch of cleanup and design fixes necessary
before we can turn it on for ARM. "do_unassigned_access"
is the QOM CPUClass hook for this, and searching the
mailing list archives will probably turn up discussion
about the fixes needed.

-- PMM

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

* Re: [Qemu-devel] How to trigger faults for missing peripherals?
  2015-06-18 10:21 ` Peter Maydell
@ 2015-06-18 14:30   ` Liviu Ionescu
  2015-06-18 14:59     ` Peter Maydell
  0 siblings, 1 reply; 4+ messages in thread
From: Liviu Ionescu @ 2015-06-18 14:30 UTC (permalink / raw)
  To: Peter Maydell; +Cc: QEMU Developers


> On 18 Jun 2015, at 13:21, Peter Maydell <peter.maydell@linaro.org> wrote:
> 
> ... "do_unassigned_access" is the QOM CPUClass hook for this, 

this hook seems associated with the "Trying to execute code outside RAM or ROM at 0x" error, which is a bit different, I want to catch read/write accesses, not execute accesses.

is the error message misleading, and the hook is used for all accesses? (get_page_addr_code() in cputlb.c)


regards,

Liviu

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

* Re: [Qemu-devel] How to trigger faults for missing peripherals?
  2015-06-18 14:30   ` Liviu Ionescu
@ 2015-06-18 14:59     ` Peter Maydell
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2015-06-18 14:59 UTC (permalink / raw)
  To: Liviu Ionescu; +Cc: QEMU Developers

On 18 June 2015 at 15:30, Liviu Ionescu <ilg@livius.net> wrote:
>
>> On 18 Jun 2015, at 13:21, Peter Maydell <peter.maydell@linaro.org> wrote:
>>
>> ... "do_unassigned_access" is the QOM CPUClass hook for this,
>
> this hook seems associated with the "Trying to execute code outside
> RAM or ROM at 0x" error, which is a bit different, I want to catch
> read/write accesses, not execute accesses.

read/write accesses call the hook via the code path:
 unassigned_mem_{read,write}() -> cpu_unassigned_access()

(though this is part of the design issue I mentioned --
it means the hook gets called for *anything* that touches
an unassigned address, even if it was the DMA controller
and not the CPU at all. The hook calls need to be hoisted
out of those functions and up to a higher level in the
call tree.)

-- PMM

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

end of thread, other threads:[~2015-06-18 14:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-18  9:45 [Qemu-devel] How to trigger faults for missing peripherals? Liviu Ionescu
2015-06-18 10:21 ` Peter Maydell
2015-06-18 14:30   ` Liviu Ionescu
2015-06-18 14:59     ` Peter Maydell

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.