anyway, thanks. On Thu, Dec 22, 2011 at 8:38 PM, Avi Kivity <a...@redhat.com> wrote: > On 12/22/2011 01:24 PM, Zhi Yong Wu wrote: >> > >> >> 2.) How to render MemoryRegion into one disjoint flatrange list? That >> >> rendering function is a bit difficult to understand. Can anyone simply >> >> explain it? >> > >> > What exactly don't you understand? >> 1.) e.g. some fields such as offset_in_region, terminates, offset in >> MemoryRegion struct. What are separately their meanings? > > Well, read the code, it's not that complicated. Afterwards you can add > documentation based on your findings. > >> 2.) render_memory_region(), how does it render one MemoryRegion into >> the global view flatview? Can you simply explain this function's >> algorithm logic? > > Again, what can I say that the code doesn't? It recursively descends > the hierarchy and finds out which region goes where. > > Also read docs/memory.txt > >> >> > >> >> >> >> 3.) What are separately the meanings of these flags? such as >> >> IO_MEM_RAM, IO_MEM_ROM, IO_MEM_UNASSIGNED, IO_MEM_*, IO_MEM_ROMD, and >> >> IO_MEM_SUBPAGE. >> > >> > RAM = RAM >> > ROM = ROM >> > UNASSIGNED = nothing handles this range >> > ROMD = ROM when read, device (i.e. callbacks) when written >> > SUBPAGE = dispatch using the lower address bits to obtain final I/O >> > handler. >> thanks. >> >> By the way, if you are available, can you simply explain what is the >> relationship among them and how they work together? such as >> MemoryRegion, RamBlock, PhysPageDesc, and MemorySlot. >> > > Sorry, it's a long and complicated story that is changing now. You'll > have to educate yourself mostly. > > -- > error compiling committee.c: too many arguments to function >
-- Regards, Zhi Yong Wu