[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to fill a memory region with specific bytes?
From: |
Peter Maydell |
Subject: |
Re: How to fill a memory region with specific bytes? |
Date: |
Sun, 19 Sep 2021 19:19:42 +0100 |
On Sat, 18 Sept 2021 at 03:55, Duo jia <jiaduo19920301@gmail.com> wrote:
>
> Many SOCs have unique id, which is a fixed string of bytes.
> I use "memory_region_init_ram" and "memory_region_add_subregion" to simulate
> this region, how can I initialize specific bytes to fill?
Mostly we just model that kind of thing as a register
in an IO MemoryRegion. Often it's not a single thing
on its own, but is part of a larger device or other
block of registers anyway, so modeling it as part of that
other device is simpler.
-- PMM