System.cpp File Reference


Detailed Description

Contains the code for the emulated Typhoon Chipset devices.

Id
System.cpp,v 1.75 2008/03/26 19:16:33 iamcamiel Exp

X-1.75 Camiel Vanderhoeven 26-MAR-2008 Fix compiler warnings.

X-1.74 Pepito Grillo 25-MAR-2008 Fixed a typo.

X-1.73 Camiel Vanderhoeven 14-MAR-2008 Formatting.

X-1.72 Camiel Vanderhoeven 14-MAR-2008 1. More meaningful exceptions replace throwing (int) 1. 2. U64 macro replaces X64 macro.

X-1.71 Camiel Vanderhoeven 13-MAR-2008 Create init(), start_threads() and stop_threads() functions.

X-1.70 Camiel Vanderhoeven 11-MAR-2008 Named, debuggable mutexes.

X-1.68 Camiel Vanderhoeven 05-MAR-2008 Multi-threading version.

X-1.67 Camiel Vanderhoeven 04-MAR-2008 Support some basic MP features. (CPUID read from C-Chip MISC register, inter-processor interrupts)

X-1.66 Brian Wheeler 02-MAR-2008 Allow large memory sizes (>1GB).

X-1.65 Camiel Vanderhoeven 02-MAR-2008 Natural way to specify large numeric values ("10M") in the config file.

X-1.64 Brian Wheeler 29-FEB-2008 Do not generate unknown PCI 0 memory messages for legacy VGA memory region.

X-1.63 Brian Wheeler 26-FEB-2008 Support reading from Pchip TLBIV and TLBIA registers. (Which are supposed to be write-only!)

X-1.62 David Leonard 20-FEB-2008 Flush stdout during decompression progress.

X-1.61 Camiel Vanderhoeven 08-FEB-2008 Show originating device name on memory errors.

X-1.60 Camiel Vanderhoeven 01-FEB-2008 Avoid unnecessary shift-operations to calculate constant values.

X-1.59 Camiel Vanderhoeven 28-JAN-2008 Avoid compiler warnings.

X-1.58 Camiel Vanderhoeven 25-JAN-2008 Added option to disable the icache.

X-1.57 Camiel Vanderhoeven 19-JAN-2008 Run CPU in a separate thread if CPU_THREADS is defined. NOTA BENE: This is very experimental, and has several problems.

X-1.56 Camiel Vanderhoeven 18-JAN-2008 Process device interrupts after a 100-cpu-cycle delay.

X-1.55 Camiel Vanderhoeven 12-JAN-2008 Comments.

X-1.54 Camiel Vanderhoeven 09-JAN-2008 Let PtrToMemory return NULL when the address is out of range.

X-1.53 Camiel Vanderhoeven 08-JAN-2008 Layout of comments.

X-1.52 Camiel Vanderhoeven 08-JAN-2008 Split out chipset registers.

X-1.51 Camiel Vanderhoeven 07-JAN-2008 Corrected error in last update; csr reg. 0x600, not 0600...

X-1.50 Camiel Vanderhoeven 07-JAN-2008 DMA scatter/gather access. Split out some things.

X-1.49 Camiel Vanderhoeven 02-JAN-2008 Cleanup.

X-1.48 Camiel Vanderhoeven 30-DEC-2007 Comments.

X-1.47 Camiel Vanderhoeven 30-DEC-2007 Fixed error in printf again.

X-1.46 Camiel Vanderhoeven 30-DEC-2007 Fixed error in printf.

X-1.45 Camiel Vanderhoeven 30-DEC-2007 Print file id on initialization.

X-1.44 Camiel Vanderhoeven 29-DEC-2007 Fix memory-leak.

X-1.43 Camiel Vanderhoeven 28-DEC-2007 Throw exceptions rather than just exiting when errors occur.

X-1.42 Camiel Vanderhoeven 28-DEC-2007 Keep the compiler happy.

X-1.41 Camiel Vanderhoeven 20-DEC-2007 Close files and free memory when the emulator shuts down.

X-1.40 Camiel Vanderhoeven 17-DEC-2007 SaveState file format 2.1

X-1.39 Camiel Vanderhoeven 14-DEC-2007 Commented out SRM IDE READ replacement; doesn't work with SCSI!

X-1.38 Camiel Vanderhoeven 10-DEC-2007 Added get_cpu

X-1.37 Camiel Vanderhoeven 10-DEC-2007 Use configurator.

X-1.36 Camiel Vanderhoeven 6-DEC-2007 Report references to unused PCI space.

X-1.35 Camiel Vanderhoeven 2-DEC-2007 Avoid misprobing of unused PCI configuration space.

X-1.34 Camiel Vanderhoeven 2-DEC-2007 Added support for code profiling, and for direct operations on the Tsunami/Typhoon's interrupt registers.

X-1.33 Brian Wheeler 1-DEC-2007 1. Ignore address bits 35- 42 in the physical address; this is correct according to the Tsunami/Typhoon HRM; which states that " The system address space is divided into two parts: system memory and PIO. This division is indicated by physical memory bit <43> = 1 for PIO accesses from the CPU [...] In general, bits <42:35> are don’t cares if bit <43> is asserted. [...] The Typhoon Cchip supports 32GB of system memory (35 bits total). " 2. Added support for Ctrl+C and panic.

X-1.32 Camiel Vanderhoeven 17-NOV-2007 Use CHECK_ALLOCATION.

X-1.31 Camiel Vanderhoeven 16-NOV-2007 Replaced PCI_ReadMem and PCI_WriteMem with PCI_Phys.

X-1.30 Camiel Vanderhoeven 05-NOV-2007 Put slow-to-fast clock ratio into define CLOCK_RATIO. Increased this to 100,000.

X-1.29 Camiel Vanderhoeven 18-APR-2007 Decompressed ROM image is now identical between big- and small- endian platforms (put endian_64 around PALbase and PC).

X-1.28 Camiel Vanderhoeven 18-APR-2007 Faster lockstep mechanism (send info 50 cpu cycles at a time)

X-1.27 Camiel Vanderhoeven 16-APR-2007 Remove old address range if a new one is registered (same device/ same index)

X-1.26 Camiel Vanderhoeven 16-APR-2007 Allow configuration strings with spaces in them.

X-1.25 Camiel Vanderhoeven 11-APR-2007 Moved all data that should be saved to a state file to a structure "state".

X-1.24 Camiel Vanderhoeven 10-APR-2007 New mechanism for SRM replacements. Where these need to be executed, CSystem::LoadROM() puts a special opcode (a CALL_PAL instruction with an otherwise illegal operand of 0x01234xx) in memory. CAlphaCPU::DoClock() recognizes these opcodes and performs the SRM action.

X-1.23 Camiel Vanderhoeven 10-APR-2007 Extended ROM-handling code to favor loading decompressed ROM code over loading compressed code, and to save decompressed ROM code during the first time the emulator is run.

X-1.22 Camiel Vanderhoeven 10-APR-2007 Removed obsolete ROM-handling code.

X-1.21 Brian Wheeler 31-MAR-2007 Removed ; after endif to avoid compiler warnings.

X-1.20 Camiel Vanderhoeven 26-MAR-2007 Show references to unknown memory regions when DEBUG_UNKMEM is defined.

X-1.19 Camiel Vanderhoeven 1-MAR-2007 Changes for Solaris/SPARC port: a) All $-signs in variable names are replaced with underscores. b) Some functions now get a const char * argument i.s.o. char * to avoid compiler warnings. c) If ALIGN_MEM_ACCESS is defined, memory accesses are checked for natural alignment. If access is not naturally aligned, it is performed one byte at a time. d) Accesses to main-memory are byte-swapped on a big-endian architecture. This is done through the endian_xx macro's, that differ according to the endianness of the architecture.

X-1.18 Camiel Vanderhoeven 28-FEB-2007 In the lockstep-versions of the emulator, perform lockstep synchronisation for every clock tick.

X-1.17 Camiel Vanderhoeven 27-FEB-2007 Removed an unreachable "return 0;" line.

X-1.16 Camiel Vanderhoeven 18-FEB-2007 Keep track of the cycle-counter in single-step mode (using the iSSCycles variable.

X-1.15 Camiel Vanderhoeven 16-FEB-2007 a) Provide slow and fast clocks for devices. Typical fast-clocked devices are the CPU(s); most other devices that need a clock should probably be slow clock devices. b) DoClock() was replaced with Run(), which runs until one of the connected devices returns something other than 0; and SingleStep(). c) Corrected some signed/unsigned integer comparison warnings.

X-1.14 Brian Wheeler 13-FEB-2007 a) Corrected some typo's in printf statements. b) Fixed some compiler warnings (assignment inside if()).

X-1.13 Camiel Vanderhoeven 12-FEB-2007 Removed error messages when accessing unknown memory.

X-1.12 Camiel Vanderhoeven 12-FEB-2007 Corrected a signed/unsigned integer comparison warning.

X-1.11 Camiel Vanderhoeven 9-FEB-2007 Added comments.

X-1.10 Brian Wheeler 7-FEB-2007 Remove FindConfig function, and load configuration file from the constructor.

X-1.9 Camiel Vanderhoeven 7-FEB-2007 a) CTraceEngine is no longer instantiated as a member of CSystem. b) Calls to trace_dev now use the TRC_DEVx macro's.

X-1.8 Camiel Vanderhoeven 3-FEB-2007 a) Removed last conditional for supporting another system than an ES40 (ifdef DS15) b) FindConfig() now returns the default value rather than crashing when none of the standard configuration files can be found.

X-1.7 Brian Wheeler 3-FEB-2007 Formatting.

X-1.6 Brian Wheeler 3-FEB-2007 Replaced several 64-bit values in 0x... syntax with X64(...).

X-1.5 Brian Wheeler 3-FEB-2007 Added possibility to load a configuration file.

X-1.4 Brian Wheeler 3-FEB-2007 Replaced 1i64 with X64(1) in two instances.

X-1.3 Brian Wheeler 3-FEB-2007 Scanf and printf statements made compatible with Linux/GCC/glibc.

X-1.2 Brian Wheeler 3-FEB-2007 Includes are now case-correct (necessary on Linux)

X-1.1 Camiel Vanderhoeven 19-JAN-2007 Initial version in CVS.

Definition in file System.cpp.

#include "StdAfx.h"
#include "System.h"
#include "AlphaCPU.h"
#include "lockstep.h"
#include "DPR.h"
#include <ctype.h>
#include <stdlib.h>
#include <signal.h>

Go to the source code of this file.

Defines

#define CLOCK_RATIO   10000

Functions

void sigint_handler (int signum)
 Handle a SIGINT by setting a flag that terminates the emulator.

Variables

char debug_string [10000] = ""
char * dbg_strptr = debug_string
int got_sigint = 0
CSystemtheSystem = 0


Define Documentation

#define CLOCK_RATIO   10000

Definition at line 311 of file System.cpp.


Function Documentation

void sigint_handler ( int  signum  ) 

Handle a SIGINT by setting a flag that terminates the emulator.

Definition at line 487 of file System.cpp.

References got_sigint.

Referenced by CTraceEngine::parse(), and CSystem::Run().


Variable Documentation

Definition at line 315 of file System.cpp.

Referenced by CAlphaCPU::execute(), handle_debug_string(), and CSystem::SingleStep().

char debug_string[10000] = ""

Definition at line 314 of file System.cpp.

Referenced by CSystem::SingleStep().

int got_sigint = 0

Definition at line 482 of file System.cpp.

Referenced by CSerial::execute(), CTraceEngine::parse(), CSystem::Run(), and sigint_handler().


SourceForge.net Logo
Project space on SourceForge.net