Question 1. Without indirect branch, the code might still work fine, why it’s the case and why it’s mandatory to use indirect branch.
讓 PC-relative 的指令如 adr 使用到正確的值(program counter)。
Question 2. For mapping 1GB memory region, how many page frames are used by page tables(PGD, PUD, PMD, and PTE) in four level translation?
(PGD * 1) + (PUD * 1) + (PMD * 1) + (PTE * 512) = 515 page
Question 3. If a page frame is allocated and to be mapped at user space. Is it necessary to initialize it into 0?
當整頁當作 user task .bss 時需要,否則交給 user space 去初始化即可。但在讀取 page table entry 時是以 0 作為是否已使用的判斷(page table 也是存放在 page 上),因此有對 page 寫 0 的必要。