physical.cc (3281:d0f7a2e1573f) | physical.cc (3348:11f6ef023158) |
---|---|
1/* 2 * Copyright (c) 2001-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 25 unchanged lines hidden (view full) --- 34#include <errno.h> 35#include <fcntl.h> 36#include <unistd.h> 37#include <zlib.h> 38 39#include <iostream> 40#include <string> 41 | 1/* 2 * Copyright (c) 2001-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 25 unchanged lines hidden (view full) --- 34#include <errno.h> 35#include <fcntl.h> 36#include <unistd.h> 37#include <zlib.h> 38 39#include <iostream> 40#include <string> 41 |
42 | 42#include "arch/isa_traits.hh" |
43#include "base/misc.hh" 44#include "config/full_system.hh" | 43#include "base/misc.hh" 44#include "config/full_system.hh" |
45#include "mem/packet_impl.hh" | |
46#include "mem/physical.hh" | 45#include "mem/physical.hh" |
47#include "sim/host.hh" | |
48#include "sim/builder.hh" 49#include "sim/eventq.hh" | 46#include "sim/builder.hh" 47#include "sim/eventq.hh" |
50#include "arch/isa_traits.hh" | 48#include "sim/host.hh" |
51 | 49 |
52 | |
53using namespace std; 54using namespace TheISA; 55 | 50using namespace std; 51using namespace TheISA; 52 |
56 | |
57PhysicalMemory::PhysicalMemory(Params *p) 58 : MemObject(p->name), pmemAddr(NULL), port(NULL), lat(p->latency), _params(p) 59{ 60 if (params()->addrRange.size() % TheISA::PageBytes != 0) 61 panic("Memory Size not divisible by page size\n"); 62 63 int map_flags = MAP_ANON | MAP_PRIVATE; 64 pmemAddr = (uint8_t *)mmap(NULL, params()->addrRange.size(), PROT_READ | PROT_WRITE, --- 378 unchanged lines hidden --- | 53PhysicalMemory::PhysicalMemory(Params *p) 54 : MemObject(p->name), pmemAddr(NULL), port(NULL), lat(p->latency), _params(p) 55{ 56 if (params()->addrRange.size() % TheISA::PageBytes != 0) 57 panic("Memory Size not divisible by page size\n"); 58 59 int map_flags = MAP_ANON | MAP_PRIVATE; 60 pmemAddr = (uint8_t *)mmap(NULL, params()->addrRange.size(), PROT_READ | PROT_WRITE, --- 378 unchanged lines hidden --- |