svn commit: r367078 - head/sys/riscv/riscv
Kristof Provost
kp at FreeBSD.org
Tue Oct 27 12:44:49 UTC 2020
Author: kp
Date: Tue Oct 27 12:44:49 2020
New Revision: 367078
URL: https://svnweb.freebsd.org/changeset/base/367078
Log:
riscv: Minor cleanup in startup code
- remove setting of register value which is not used until the next value is
set
- Use the L2_SHIFT constant when setting up L2 superpages
Submitted by: Antonin Houska <ah AT melesmeles DOT cz>
Modified:
head/sys/riscv/riscv/locore.S
Modified: head/sys/riscv/riscv/locore.S
==============================================================================
--- head/sys/riscv/riscv/locore.S Tue Oct 27 12:32:17 2020 (r367077)
+++ head/sys/riscv/riscv/locore.S Tue Oct 27 12:44:49 2020 (r367078)
@@ -135,10 +135,9 @@ pagetables:
/* Level 2 superpages (512 x 2MiB) */
lla s1, pagetable_l2
- srli t4, s9, 21 /* Div physmem base by 2 MiB */
+ srli t4, s9, L2_SHIFT /* Div physmem base by 2 MiB */
li t2, 512 /* Build 512 entries */
add t3, t4, t2
- li t5, 0
li t0, (PTE_KERN | PTE_X)
1:
slli t2, t4, PTE_PPN1_S /* << PTE_PPN1_S */
More information about the svn-src-all
mailing list