flash_interface.h
1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* Copyright (C) 1996-1998 by the Board of Trustees
* of Leland Stanford Junior University.
*
* This file is part of the SimOS distribution.
* See LICENSE file for terms of the license.
*
*/
/*****************************************************************
* flash_interface.h
*
*****************************************************************/
#ifndef FLASH_INTERFACE_H
#define FLASH_INTERFACE_H
extern void FlashliteConfigDefaults(void);
extern void FlashliteRaiseSlot(int cpu, int slot);
extern void FlashliteClearSlot(int cpu, int slot);
extern unsigned FlashAddrCompress(unsigned long long flashAddr);
extern int FlashliteWQFull(int cpu);
#ifdef COMA
/* WOULD NEED TO REWRITE STUFF TO HAVE THIS WORK FOR COMA */
#endif /* COMA */
extern void SyncMemory(void);
#ifdef SOLO
/*
* Do the mappings between Solos and Flash addresses
*/
extern void FlashliteResetStats(void);
extern void FlashliteStartCPU(int cpuNum);
extern void FlashliteStopCPU(int cpuNum);
#define FlashAddrFromSoloAddr(_space,_addr) SoloDecompressAddr(_space,_addr)
#define FlashAddrToSoloAddr(_faddr) SoloCompressAddr(_faddr)
#else
#define FLASH_PAGE_SIZE 4096
extern unsigned long long
FlashAddrFromSimosAddr(unsigned int space, unsigned int addr);
/* the following routines access the FPROM and FRAM. Needed
by the debugger interface.
*/
extern int
GetFPROMAndFRAM(int cpuNum, VA vAddr, uint nbytes, char *buf);
extern int
PutFPROMAndFRAM(int cpuNum, VA vAddr, uint nbytes, char *buf);
extern void FlashliteInstallTimer(int cpuNum, unsigned int interval,
unsigned int timeLeft);
extern void FlashliteUndirtify(int leaveShared);
#endif
#endif