Date: Mon, 30 Dec 2019 14:38:06 +0000 (UTC) From: Ruslan Bukin <br@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r356203 - head/sys/riscv/riscv Message-ID: <201912301438.xBUEc6bd030031@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: br Date: Mon Dec 30 14:38:06 2019 New Revision: 356203 URL: https://svnweb.freebsd.org/changeset/base/356203 Log: Don't hard-code size of struct riscv_bootparams. Submitted by: James Clarke <jrtc27@jrtc27.com> Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D22968 Modified: head/sys/riscv/riscv/genassym.c head/sys/riscv/riscv/locore.S Modified: head/sys/riscv/riscv/genassym.c ============================================================================== --- head/sys/riscv/riscv/genassym.c Mon Dec 30 13:29:30 2019 (r356202) +++ head/sys/riscv/riscv/genassym.c Mon Dec 30 14:38:06 2019 (r356203) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include <machine/cpufunc.h> #include <machine/pte.h> #include <machine/intr.h> +#include <machine/machdep.h> ASSYM(KERNBASE, KERNBASE); ASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADDRESS); @@ -98,3 +99,5 @@ ASSYM(TF_SEPC, offsetof(struct trapframe, tf_sepc)); ASSYM(TF_STVAL, offsetof(struct trapframe, tf_stval)); ASSYM(TF_SCAUSE, offsetof(struct trapframe, tf_scause)); ASSYM(TF_SSTATUS, offsetof(struct trapframe, tf_sstatus)); + +ASSYM(RISCV_BOOTPARAMS_SIZE, sizeof(struct riscv_bootparams)); Modified: head/sys/riscv/riscv/locore.S ============================================================================== --- head/sys/riscv/riscv/locore.S Mon Dec 30 13:29:30 2019 (r356202) +++ head/sys/riscv/riscv/locore.S Mon Dec 30 14:38:06 2019 (r356203) @@ -188,7 +188,7 @@ va: mv sp, s3 /* Allocate space for thread0 PCB and riscv_bootparams */ - addi sp, sp, -(PCB_SIZE + 40) & ~STACKALIGNBYTES + addi sp, sp, -(PCB_SIZE + RISCV_BOOTPARAMS_SIZE) & ~STACKALIGNBYTES /* Clear BSS */ la s0, _C_LABEL(__bss_start)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912301438.xBUEc6bd030031>