All of lore.kernel.org
 help / color / mirror / Atom feed
* How to fill a memory region with specific bytes?
@ 2021-09-18  2:54 Duo jia
  2021-09-19 18:19 ` Peter Maydell
  0 siblings, 1 reply; 2+ messages in thread
From: Duo jia @ 2021-09-18  2:54 UTC (permalink / raw)
  To: QEMU Developers

[-- Attachment #1: Type: text/plain, Size: 205 bytes --]

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?


thks~~~

[-- Attachment #2: Type: text/html, Size: 292 bytes --]

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

* Re: How to fill a memory region with specific bytes?
  2021-09-18  2:54 How to fill a memory region with specific bytes? Duo jia
@ 2021-09-19 18:19 ` Peter Maydell
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Maydell @ 2021-09-19 18:19 UTC (permalink / raw)
  To: Duo jia; +Cc: QEMU Developers

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


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

end of thread, other threads:[~2021-09-19 18:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-18  2:54 How to fill a memory region with specific bytes? Duo jia
2021-09-19 18:19 ` 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.