qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for-6.0 v2 4/5] hw/core/loader: Add new function rom_ptr_for_


From: Richard Henderson
Subject: Re: [PATCH for-6.0 v2 4/5] hw/core/loader: Add new function rom_ptr_for_as()
Date: Thu, 18 Mar 2021 15:14:06 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 3/18/21 1:02 PM, Peter Maydell wrote:
+     * Note that we do not check @as against the 'as' member in the
+     * 'struct Rom' returned by rom_ptr(). The Rom::as is the
+     * AddressSpace which the rom blob should be written to...
...
Should you really have this special case?  Nowhere is this going to verify that
@addr is in @as.

It's the "happens almost all the time" case. Nothing verifies
that @addr is in @as anyway -- see the "Note that" part of the
comment above.

The comment explains why we don't examine Rom::as.
But we do check @addr vs @as via @as -> @fv -> flatview_translate.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]