On 23 June 2017 at 16:02, ali saeedi <[email protected]> wrote:
> thank you for answer
> So. why do we have right shift in qemu by "TARGET_PAGE_BITS" ? for exampe
> in below code, what does it mean?
>
> static inline void cpu_physical_memory_set_dirty_range(ram_addr_t start,
>                                                        ram_addr_t length)
> {
>     unsigned long end, page;
>
>     end = TARGET_PAGE_ALIGN(start + length) >> TARGET_PAGE_BITS;
>     page = start >> TARGET_PAGE_BITS;
> ...
> }

If you take an address, and you shift it right by the number
of bits in a page, you get a page number...

thanks
-- PMM

Reply via email to