Sorry, I found a bug that I made a mistake in writing to RAM. Best regard, Hiroko
2021年7月15日(木) 19:55 Peter Maydell <peter.mayd...@linaro.org>: > On Wed, 14 Jul 2021 at 12:13, Hiroko Shimizu <hiroko07...@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 >