mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 02:24:17 +08:00
sim: frv: punt WITH_DEVICE support
The frv port used the device logic to support a single cache address, and the comments around that are "these were merely copied from a diff port and are unused", plus the code to attach the memory is "#if 0". Just punt it all.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
2015-12-25 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
|
* devices.c: Delete file.
|
||||||
|
* frv-sim.h (MCCR_ADDR, MCCR_CP, MCCR_CM0, MCCR_CM1, frv_devices,
|
||||||
|
struct _device): Delete.
|
||||||
|
* Makefile.in (SIM_OBJS): Delete devices.o.
|
||||||
|
* sim-if.c (sim_open): Delete #if 0 code.
|
||||||
|
* tconfig.h: Delete file.
|
||||||
|
|
||||||
2015-12-25 Mike Frysinger <vapier@gentoo.org>
|
2015-12-25 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
* Makefile.in (SIM_OBJS): Delete sim-model.o.
|
* Makefile.in (SIM_OBJS): Delete sim-model.o.
|
||||||
|
@ -28,7 +28,7 @@ SIM_OBJS = \
|
|||||||
$(FRV_OBJS) \
|
$(FRV_OBJS) \
|
||||||
traps.o interrupts.o memory.o cache.o pipeline.o \
|
traps.o interrupts.o memory.o cache.o pipeline.o \
|
||||||
profile.o profile-fr400.o profile-fr450.o profile-fr500.o profile-fr550.o options.o \
|
profile.o profile-fr400.o profile-fr450.o profile-fr500.o profile-fr550.o options.o \
|
||||||
devices.o reset.o registers.o
|
reset.o registers.o
|
||||||
|
|
||||||
# Extra headers included by sim-main.h.
|
# Extra headers included by sim-main.h.
|
||||||
SIM_EXTRA_DEPS = \
|
SIM_EXTRA_DEPS = \
|
||||||
|
@ -1,56 +0,0 @@
|
|||||||
/* frv device support
|
|
||||||
Copyright (C) 1998-2015 Free Software Foundation, Inc.
|
|
||||||
Contributed by Red Hat.
|
|
||||||
|
|
||||||
This file is part of the GNU simulators.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that 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/>. */
|
|
||||||
|
|
||||||
/* ??? All of this is just to get something going. wip! */
|
|
||||||
|
|
||||||
#include "sim-main.h"
|
|
||||||
|
|
||||||
device frv_devices;
|
|
||||||
|
|
||||||
int
|
|
||||||
device_io_read_buffer (device *me, void *source, int space,
|
|
||||||
address_word addr, unsigned nr_bytes,
|
|
||||||
SIM_DESC sd, SIM_CPU *cpu, sim_cia cia)
|
|
||||||
{
|
|
||||||
if (STATE_ENVIRONMENT (sd) != OPERATING_ENVIRONMENT)
|
|
||||||
return nr_bytes;
|
|
||||||
|
|
||||||
return nr_bytes;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
device_io_write_buffer (device *me, const void *source, int space,
|
|
||||||
address_word addr, unsigned nr_bytes,
|
|
||||||
SIM_DESC sd, SIM_CPU *cpu, sim_cia cia)
|
|
||||||
{
|
|
||||||
|
|
||||||
#if WITH_SCACHE
|
|
||||||
if (addr == MCCR_ADDR)
|
|
||||||
{
|
|
||||||
if ((*(const char *) source & MCCR_CP) != 0)
|
|
||||||
scache_flush (sd);
|
|
||||||
return nr_bytes;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (STATE_ENVIRONMENT (sd) != OPERATING_ENVIRONMENT)
|
|
||||||
return nr_bytes;
|
|
||||||
|
|
||||||
return nr_bytes;
|
|
||||||
}
|
|
@ -122,24 +122,6 @@ extern void frvbf_force_update (SIM_CPU *);
|
|||||||
/* Hardware/device support.
|
/* Hardware/device support.
|
||||||
??? Will eventually want to move device stuff to config files. */
|
??? Will eventually want to move device stuff to config files. */
|
||||||
|
|
||||||
/* Support for the MCCR register (Cache Control Register) is needed in order
|
|
||||||
for overlays to work correctly with the scache: cached instructions need
|
|
||||||
to be flushed when the instruction space is changed at runtime. */
|
|
||||||
|
|
||||||
/* These were just copied from another port and are necessary to build, but
|
|
||||||
but don't appear to be used. */
|
|
||||||
#define MCCR_ADDR 0xffffffff
|
|
||||||
#define MCCR_CP 0x80
|
|
||||||
/* not supported */
|
|
||||||
#define MCCR_CM0 2
|
|
||||||
#define MCCR_CM1 1
|
|
||||||
|
|
||||||
/* sim_core_attach device argument. */
|
|
||||||
extern device frv_devices;
|
|
||||||
|
|
||||||
/* FIXME: Temporary, until device support ready. */
|
|
||||||
struct _device { int foo; };
|
|
||||||
|
|
||||||
/* maintain the address of the start of the previous VLIW insn sequence. */
|
/* maintain the address of the start of the previous VLIW insn sequence. */
|
||||||
extern IADDR previous_vliw_pc;
|
extern IADDR previous_vliw_pc;
|
||||||
extern CGEN_ATTR_VALUE_ENUM_TYPE frv_current_fm_slot;
|
extern CGEN_ATTR_VALUE_ENUM_TYPE frv_current_fm_slot;
|
||||||
|
@ -96,22 +96,6 @@ sim_open (kind, callback, abfd, argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* Allocate a handler for the control registers and other devices
|
|
||||||
if no memory for that range has been allocated by the user.
|
|
||||||
All are allocated in one chunk to keep things from being
|
|
||||||
unnecessarily complicated. */
|
|
||||||
if (sim_core_read_buffer (sd, NULL, read_map, &c, FRV_DEVICE_ADDR, 1) == 0)
|
|
||||||
sim_core_attach (sd, NULL,
|
|
||||||
0 /*level*/,
|
|
||||||
access_read_write,
|
|
||||||
0 /*space ???*/,
|
|
||||||
FRV_DEVICE_ADDR, FRV_DEVICE_LEN /*nr_bytes*/,
|
|
||||||
0 /*modulo*/,
|
|
||||||
&frv_devices,
|
|
||||||
NULL /*buffer*/);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Allocate core managed memory if none specified by user.
|
/* Allocate core managed memory if none specified by user.
|
||||||
Use address 4 here in case the user wanted address 0 unmapped. */
|
Use address 4 here in case the user wanted address 0 unmapped. */
|
||||||
if (sim_core_read_buffer (sd, NULL, read_map, &c, 4, 1) == 0)
|
if (sim_core_read_buffer (sd, NULL, read_map, &c, 4, 1) == 0)
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
/* FRV target configuration file. -*- C -*- */
|
|
||||||
|
|
||||||
/* For MSPR support. FIXME: revisit. */
|
|
||||||
#define WITH_DEVICES 1
|
|
Reference in New Issue
Block a user