<div><div># Some qustion about riscv implement</div><div><br></div><div>## 1. SMP</div><div><br></div><div>Coreboot for riscv does not support SMP, now. </div><div>why does the secondary hart not halt in **src/arch/riscv/bootblock.S**?</div><div>Now, secondary hart halts in **src/arch/riscv/trap_util.S**.</div><div>This may affect playload implementation.</div><div><br></div><div><br></div><div>## 2. Privilege level for hypervisor</div><div><br></div><div>Privilege level2 is Reserved In newest **rescv-privileged-v1.10.pdf**.</div><div>According to the latest **rescv-privileged-v1.10.pdf**, the privilege level 2 is</div><div>reserved. However, it appears in the source code. </div><div><br></div><div><br></div><div>## 3. Exception </div><div><br></div><div>Both **supervisor_trap_entry** and **trap_entry** in </div><div>**src/arch/riscv/trap_util.S** have similar functionality. The only difference </div><div>is the latter halts the secondary hart. **supervisor_trap_entry** is unused </div><div>currently, what's the purpose of that?</div><div><br></div><div>The two restore context handlers **supervisor_call_return** </div><div>**machine_call_return** in **src/arch/riscv/trap_util.S** are the same and </div><div>they're in another section. Why not put these codes right after </div><div>**supervisor_trap_entry**/**trap_entry** so there's no need to insert assembly </div><div>codes in **src/arch/riscv/trap_handler.c**.</div><div><br></div><div><br></div><div>## 4. CSR(mtime mtimecmp)</div><div><br></div><div>Hart-local storage records the address of mtime/mtimecmp. However, I could not </div><div>find information regarding CSR mapped to memory space in the latest document </div><div>**rescv-privileged-v1.10.pdf**.</div><div><br></div><div><br></div><div>## 5. S/M Privilege level use same stack</div><div><br></div><div>Function **riscvpayload** in **src/arch/riscv/payload.S** does not create a new</div><div>stack for S privilege level. This may destroy the stack of M privilege level.</div></div><div><br></div><div><sign signid="99"><div style="color:#909090;font-family:Arial Narrow;font-size:12px"><br><br><br><br>------------------</div><div style="font-size:14px;font-family:Verdana;color:#000;"><div style="overflow:hidden;"><div class="l_box" style="float:left;height:100px;margin:35px 10px 10px 0;padding:0 10px 0 15px;border-right:1px solid #dedede;"><div class="logo" style="height:35px;margin:35px 0 0 0;float:left;"><img src="https://exmail.qq.com/cgi-bin/viewfile?type=logo&domain=tya.email"></div></div><div class="c_detail" style="float:left;padding-top:35px;line-height:22px;color:#a0a0a0;zoom:1;"><h4 class="name" style="margin:0;font-size:14px;font-weight:bold;line-height:28px;color:#000;zoom:1;">王翔</h4><p class="position" style="margin:0;">安全研究员</p><p class="department" style="margin:0;">广州市腾御安信息科技有限公司</p><p class="phone" style="margin:0;"></p><p class="mobile" style="margin:0;"></p><p class="addr" style="margin:0;line-height:22px;color:#a0a0a0;">广州市天河区珠江新城华穗路406号保利克洛维二期中景A座1020-1024</p></div></div></div></sign></div><div> </div><div><includetail><!--<![endif]--></includetail></div>