From: Andrew Waterman Date: Wed, 25 May 2016 22:36:46 +0000 (-0700) Subject: Keep tohost/fromhost at deterministic address X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=959218673db6737d65014f93208b9240c85eb8a6;p=riscv-tests.git Keep tohost/fromhost at deterministic address --- diff --git a/benchmarks/common/crt.S b/benchmarks/common/crt.S index 634b864..7c8fc19 100644 --- a/benchmarks/common/crt.S +++ b/benchmarks/common/crt.S @@ -223,3 +223,11 @@ _tdata_end: .section ".tbss.end" .globl _tbss_end _tbss_end: + +.section ".tohost","aw",@progbits +.align 6 +.globl tohost +tohost: .dword 0 +.align 6 +.globl fromhost +fromhost: .dword 0 diff --git a/benchmarks/common/syscalls.c b/benchmarks/common/syscalls.c index 9c72e36..0a43878 100644 --- a/benchmarks/common/syscalls.c +++ b/benchmarks/common/syscalls.c @@ -14,8 +14,8 @@ // initialized in crt.S int have_vec; -volatile uint64_t tohost __attribute__((aligned(64))); -volatile uint64_t fromhost __attribute__((aligned(64))); +extern volatile uint64_t tohost; +extern volatile uint64_t fromhost; static long handle_frontend_syscall(long which, long arg0, long arg1, long arg2) { diff --git a/benchmarks/common/test.ld b/benchmarks/common/test.ld index 7ee56b6..dd32bb1 100644 --- a/benchmarks/common/test.ld +++ b/benchmarks/common/test.ld @@ -22,11 +22,11 @@ SECTIONS /* text: test code section */ . = 0x80000000; - .text : - { - crt.o(.text) - *(.text) - } + .text.init : { crt.o(.text) } + + .tohost ALIGN(0x1000) : { *(.tohost) } + + .text : { *(.text) } /* data segment */ .data : { *(.data) } diff --git a/env b/env index e001051..e0d1ea4 160000 --- a/env +++ b/env @@ -1 +1 @@ -Subproject commit e0010519c57a2b88d0d03d38c21ba0a68f81f2e2 +Subproject commit e0d1ea452c2a40ca47ec720e7da8c31daa317307