[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: switch RAM and ROM mode with memory_region_set_readonly
From: |
Peter Maydell |
Subject: |
Re: switch RAM and ROM mode with memory_region_set_readonly |
Date: |
Thu, 15 Jul 2021 11:55:17 +0100 |
On Wed, 14 Jul 2021 at 12:13, Hiroko Shimizu <hiroko07168@gmail.com> wrote:
>
> Hello,
> I want to switch the memory read-only mode with
> memory_region_set_readonly() function for writing a value to memory under a
> specific condition. I checked that I could switch the mode using
> memory_region_set_readonly(), but I couldn't write a value to the memory
> region when the mode was false.
> What should I do?
What memory region are you trying to mark read-only ?
In particular, the documentation for memory_region_set_readonly()
says it is only useful for RAM regions (ie MRs which are backed
by a bit of host memory, not by read/write IO function callbacks).
thanks
-- PMM