Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Oct 2020 12:44:49 +0000 (UTC)
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r367078 - head/sys/riscv/riscv
Message-ID:  <202010271244.09RCindK030067@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010271244.09RCindK030067>