page_table.hh (12749:223c83ed9979) page_table.hh (13867:9b10bbcf0543)
1/*
2 * Copyright (c) 2014 Advanced Micro Devices, Inc.
3 * Copyright (c) 2003 The Regents of The University of Michigan
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

70 const uint64_t _pid;
71 const std::string _name;
72
73 public:
74
75 EmulationPageTable(
76 const std::string &__name, uint64_t _pid, Addr _pageSize) :
77 pageSize(_pageSize), offsetMask(mask(floorLog2(_pageSize))),
1/*
2 * Copyright (c) 2014 Advanced Micro Devices, Inc.
3 * Copyright (c) 2003 The Regents of The University of Michigan
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

70 const uint64_t _pid;
71 const std::string _name;
72
73 public:
74
75 EmulationPageTable(
76 const std::string &__name, uint64_t _pid, Addr _pageSize) :
77 pageSize(_pageSize), offsetMask(mask(floorLog2(_pageSize))),
78 _pid(_pid), _name(__name)
78 _pid(_pid), _name(__name), shared(false)
79 {
80 assert(isPowerOf2(pageSize));
81 }
82
83 uint64_t pid() const { return _pid; };
84
85 virtual ~EmulationPageTable() {};
86

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

91 * bit 3 - read-write | read-only
92 */
93 enum MappingFlags : uint32_t {
94 Clobber = 1,
95 Uncacheable = 4,
96 ReadOnly = 8,
97 };
98
79 {
80 assert(isPowerOf2(pageSize));
81 }
82
83 uint64_t pid() const { return _pid; };
84
85 virtual ~EmulationPageTable() {};
86

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

91 * bit 3 - read-write | read-only
92 */
93 enum MappingFlags : uint32_t {
94 Clobber = 1,
95 Uncacheable = 4,
96 ReadOnly = 8,
97 };
98
99 // flag which marks the page table as shared among software threads
100 bool shared;
101
99 virtual void initState(ThreadContext* tc) {};
100
101 // for DPRINTF compatibility
102 const std::string name() const { return _name; }
103
104 Addr pageAlign(Addr a) { return (a & ~offsetMask); }
105 Addr pageOffset(Addr a) { return (a & offsetMask); }
106

--- 56 unchanged lines hidden ---
102 virtual void initState(ThreadContext* tc) {};
103
104 // for DPRINTF compatibility
105 const std::string name() const { return _name; }
106
107 Addr pageAlign(Addr a) { return (a & ~offsetMask); }
108 Addr pageOffset(Addr a) { return (a & offsetMask); }
109

--- 56 unchanged lines hidden ---