On Fri, 11 Jun 2021 at 18:03, Alex Bennée <alex.ben...@linaro.org> wrote: > > > Peter Maydell <peter.mayd...@linaro.org> writes: > > > On Thu, 10 Jun 2021 at 15:16, Alex Bennée <alex.ben...@linaro.org> wrote: > >> > >> > >> Peter Maydell <peter.mayd...@linaro.org> writes: > >> > (2) find the largest contiguous extent of that RAM which > >> > is not covered by a ROM blob, by iterating through the > >> > ROM blob data. (This sounds like one of those slightly > >> > irritating but entirely tractable algorithms questions :-)) > >> > >> Does that assume that any rom blob (so anything from -kernel, -pflash or > >> -generic-loader?) will have also included space for guest data and bss? > > > > Yes; the elf loader code creates rom blobs whose rom->romsize > > covers both initialized data from the ELF file and space to > > be zeroed. > > Hmm I'm not seeing the RAM get bifurcated by the loader. The flatview > only has one RAM block in my test case and it covers the whole of RAM.
I dunno what you're tracing here, but rom blobs do not affect the MemoryRegion setup (which can be rom, ram,the romd "writes go to callbacks, reads are host memory" hybrid, or whatever). ROM blobs are just a list of "write this data into memory at this address", which gets iterated through on reset to write the data into the RAM/ROM/whatever. -- PMM