文章目錄

Lab 5 QA

Q1

Without indirect branch, the code might still work fine, why it’s the case and why it’s mandatory to use indirect branch.

一開始 ttbr0_el1ttbr1_el1 都指向同一張 page table (0x00000000 ~ 0x3fffffff),所以用 bl 一樣可以找到對應的 page。但我們需要使用 indirect branch 讓 pc 跑到 virtual address space,這樣之後的 adr 才會定址到對的位址。

Q2

For mapping 1GB memory region, how many page frames are used by page tables(PGD, PUD, PMD, and PTE) in four level translation?

GPD: 1

PUD: 1

PMD: 512/512(262144/512)

PTE: 262144/512(1GB/4KB)

Q3

If a page frame is allocated and to be mapped at user space. Is it necessary to initialize it into 0?

.bss 需要

comments powered by Disqus