NOVA User-Level Environment
Version testbox/changed-memory-timing-317-g320d8b5
|
Physical Memory Cache. More...
Classes | |
class | MemCache |
A cache for physical memory indexed by page number. More... | |
struct | MemCache::CacheEntry |
struct | MemCache::Buffers |
Cache MMIO registers and pending writes to them. More... |
Macros | |
#define | READ(NAME) ({ _mtr_read |= RMTR_##NAME; _cpu->NAME; }) |
#define | WRITE(NAME) |
#define | FAULT(NAME, VALUE) { NAME->_debug_fault_line = __LINE__; NAME->_fault = VALUE; } |
#define | UNIMPLEMENTED(NAME) { return (FAULT(NAME, FAULT_UNIMPLEMENTED)); } |
#define | RETRY { return (FAULT(this, FAULT_RETRY)); } |
#define | EXCEPTION0(NAME, NR) { NAME->_error_code = 0; FAULT(NAME, 0x80000300 | NR); } |
#define | EXCEPTION(NAME, NR, ERROR) { NAME->_error_code = ERROR; FAULT(NAME, 0x80000b00 | NR); } |
#define | DE0(X) { EXCEPTION0(X, 0x0); } |
#define | UD0 { EXCEPTION0(this, 0x6); return _fault; } |
#define | NP(X) { EXCEPTION(this, 0xb, X); return _fault; } |
#define | SS(X) { EXCEPTION(this, 0xc, X); return _fault; } |
#define | SS0 { EXCEPTION(this, 0xc, 0); return _fault; } |
#define | GP(X) { EXCEPTION(this, 0xd, X); return _fault; } |
#define | GP0 { EXCEPTION(this, 0xd, 0); return _fault; } |
#define | PF(ADDR, ERR) { _cpu->cr2 = ADDR; _mtr_out |= MTD_CR; EXCEPTION(this, 0xe, ERR); return _fault; } |
#define | return_move_to_front(set, newest) |
Move CacheEntries to the front of the usage list. | |
#define | search_entry(set, newest) |
Physical Memory Cache.
Copyright (C) 2009-2010, Bernhard Kauer bk@vm Economic rights: Technische Universitaet Dresden (Germany) mon. org
This file is part of Vancouver.
Vancouver is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
Vancouver 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 version 2 for more details.
#define DE0 | ( | X | ) | { EXCEPTION0(X, 0x0); } |
#define EXCEPTION0 | ( | NAME, | |
NR | |||
) | { NAME->_error_code = 0; FAULT(NAME, 0x80000300 | NR); } |
#define FAULT | ( | NAME, | |
VALUE | |||
) | { NAME->_debug_fault_line = __LINE__; NAME->_fault = VALUE; } |
#define GP | ( | X | ) | { EXCEPTION(this, 0xd, X); return _fault; } |
#define GP0 { EXCEPTION(this, 0xd, 0); return _fault; } |
#define NP | ( | X | ) | { EXCEPTION(this, 0xb, X); return _fault; } |
#define PF | ( | ADDR, | |
ERR | |||
) | { _cpu->cr2 = ADDR; _mtr_out |= MTD_CR; EXCEPTION(this, 0xe, ERR); return _fault; } |
#define READ | ( | NAME | ) | ({ _mtr_read |= RMTR_##NAME; _cpu->NAME; }) |
#define RETRY { return (FAULT(this, FAULT_RETRY)); } |
#define return_move_to_front | ( | set, | |
newest | |||
) |
Move CacheEntries to the front of the usage list.
#define search_entry | ( | set, | |
newest | |||
) |
#define SS | ( | X | ) | { EXCEPTION(this, 0xc, X); return _fault; } |
#define SS0 { EXCEPTION(this, 0xc, 0); return _fault; } |
#define UD0 { EXCEPTION0(this, 0x6); return _fault; } |
#define UNIMPLEMENTED | ( | NAME | ) | { return (FAULT(NAME, FAULT_UNIMPLEMENTED)); } |
#define WRITE | ( | NAME | ) |