66247edc8b
Add signature and signature-granularity properties in spike to specify the target signatrue file and the line size for signature data. Recgonize the signature section between begin_signature and end_signature symbols when loading elf of ACT tests. Then dump signature data in signature section just before the ACT tests exit. Signed-off-by: Weiwei Li <liweiwei@iscas.ac.cn> Signed-off-by: Junqiang Wang <wangjunqiang@iscas.ac.cn> Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20230405095720.75848-2-liweiwei@iscas.ac.cn> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
55 lines
1.5 KiB
C
55 lines
1.5 KiB
C
/*
|
|
* QEMU RISCV Host Target Interface (HTIF) Emulation
|
|
*
|
|
* Copyright (c) 2016-2017 Sagar Karandikar, sagark@eecs.berkeley.edu
|
|
* Copyright (c) 2017-2018 SiFive, Inc.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms and conditions of the GNU General Public License,
|
|
* version 2 or later, as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
* more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along with
|
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef HW_RISCV_HTIF_H
|
|
#define HW_RISCV_HTIF_H
|
|
|
|
#include "chardev/char.h"
|
|
#include "chardev/char-fe.h"
|
|
#include "exec/memory.h"
|
|
|
|
#define TYPE_HTIF_UART "riscv.htif.uart"
|
|
|
|
typedef struct HTIFState {
|
|
int allow_tohost;
|
|
int fromhost_inprogress;
|
|
|
|
uint64_t tohost;
|
|
uint64_t fromhost;
|
|
hwaddr tohost_offset;
|
|
hwaddr fromhost_offset;
|
|
MemoryRegion mmio;
|
|
|
|
CharBackend chr;
|
|
uint64_t pending_read;
|
|
} HTIFState;
|
|
|
|
extern const char *sig_file;
|
|
extern uint8_t line_size;
|
|
|
|
/* HTIF symbol callback */
|
|
void htif_symbol_callback(const char *st_name, int st_info, uint64_t st_value,
|
|
uint64_t st_size);
|
|
|
|
/* legacy pre qom */
|
|
HTIFState *htif_mm_init(MemoryRegion *address_space, Chardev *chr,
|
|
uint64_t nonelf_base, bool custom_base);
|
|
|
|
#endif
|