Deleted Added
sdiff udiff text old ( 5323:75f7e6366a41 ) new ( 5357:eecb5fd0be62 )
full compact
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * Redistribution and use of this software in source and binary forms,
6 * with or without modification, are permitted provided that the
7 * following conditions are met:
8 *

--- 62 unchanged lines hidden (view full) ---

71#include "mem/request.hh"
72
73#if FULL_SYSTEM
74#include "arch/x86/pagetable_walker.hh"
75#endif
76
77namespace X86ISA {
78
79TLB::TLB(const Params *p) : SimObject(p), size(p->size)
80{
81 tlb = new TlbEntry[size];
82 std::memset(tlb, 0, sizeof(TlbEntry) * size);
83
84 for (int x = 0; x < size; x++)
85 freeList.push_back(&tlb[x]);
86
87#if FULL_SYSTEM

--- 55 unchanged lines hidden (view full) ---

143 while (!entryList.empty()) {
144 TlbEntry *entry = entryList.front();
145 entryList.pop_front();
146 freeList.push_back(entry);
147 }
148}
149
150void
151TLB::invalidateNonGlobal()
152{
153 DPRINTF(TLB, "Invalidating all non global entries.\n");
154 EntryList::iterator entryIt;
155 for (entryIt = entryList.begin(); entryIt != entryList.end();) {
156 if (!(*entryIt)->global) {
157 freeList.push_back(*entryIt);
158 entryList.erase(entryIt++);

--- 314 unchanged lines hidden (view full) ---

473 } else if (prefix == IntAddrPrefixIO) {
474 // TODO If CPL > IOPL or in virtual mode, check the I/O permission
475 // bitmap in the TSS.
476
477 Addr IOPort = vaddr & ~IntAddrPrefixMask;
478 // Make sure the address fits in the expected 16 bit IO address
479 // space.
480 assert(!(IOPort & ~0xFFFF));
481 req->setPaddr(PhysAddrPrefixIO | IOPort);
482 return NoFault;
483 } else {
484 panic("Access to unrecognized internal address space %#x.\n",
485 prefix);
486 }
487 }
488
489 // Get cr0. This will tell us how to do translation. We'll assume it was

--- 134 unchanged lines hidden ---