Addr = (_bss_end + (page_size-1)) & ~ (page_size-1); What do you mean?
This is a function of assigning video frame buffer address in uboot, I want to ask is: add one (page_size-1)) and then in with the previous ~ (PAGE_SIZE-1) is what role, I see a lot of is this write. Would you please tell me what the purpose of this writing is?
For page_size the value of 2 n power, such as 4096, after addr = (_bss_end + (page_size-1)) & ~ (page_size-1), after the operation, the resulting addr value according to Page_ The size is 4096-aligned, and the value of addr is a multiple of page_size and is just above the _bss_end value. If _bss_end is a multiple of page_size, then addr=_bss_end.
For example: _bss_end=100,page_size=64, the above calculation, addr=128, just a multiple of 64, and greater than 100, if _bss_end=128, then addr=128
When I saw it, it turned around, and it involved a problem with the Uboot address.