{
int prevSize = 0;
- for (ChunkGenerator gen(addr, size, VMPageSize); !gen.done(); gen.next()) {
+ for (ChunkGenerator gen(addr, size, PageBytes); !gen.done(); gen.next()) {
Addr paddr;
if (!pTable->translate(gen.addr(),paddr))
bool
-SETranslatingPortProxy::tryWriteBlob(Addr addr, uint8_t *p, int size) const
+SETranslatingPortProxy::tryWriteBlob(Addr addr, const uint8_t *p,
+ int size) const
{
int prevSize = 0;
- for (ChunkGenerator gen(addr, size, VMPageSize); !gen.done(); gen.next()) {
+ for (ChunkGenerator gen(addr, size, PageBytes); !gen.done(); gen.next()) {
Addr paddr;
if (!pTable->translate(gen.addr(), paddr)) {
if (allocating == Always) {
- process->allocateMem(roundDown(gen.addr(), VMPageSize),
- VMPageSize);
+ process->allocateMem(roundDown(gen.addr(), PageBytes),
+ PageBytes);
} else if (allocating == NextPage) {
// check if we've accessed the next page on the stack
if (!process->fixupStackFault(gen.addr()))
void
-SETranslatingPortProxy::writeBlob(Addr addr, uint8_t *p, int size) const
+SETranslatingPortProxy::writeBlob(Addr addr, const uint8_t *p, int size) const
{
if (!tryWriteBlob(addr, p, size))
fatal("writeBlob(0x%x, ...) failed", addr);
bool
SETranslatingPortProxy::tryMemsetBlob(Addr addr, uint8_t val, int size) const
{
- for (ChunkGenerator gen(addr, size, VMPageSize); !gen.done(); gen.next()) {
+ for (ChunkGenerator gen(addr, size, PageBytes); !gen.done(); gen.next()) {
Addr paddr;
if (!pTable->translate(gen.addr(), paddr)) {
if (allocating == Always) {
- process->allocateMem(roundDown(gen.addr(), VMPageSize),
- VMPageSize);
+ process->allocateMem(roundDown(gen.addr(), PageBytes),
+ PageBytes);
pTable->translate(gen.addr(), paddr);
} else {
return false;