FIX: userspace should write entire buffer.
Huge oversight... Next is to try to regenerate the results, etc.
This commit is contained in:
parent
552d6f9b73
commit
b35344be26
2 changed files with 6 additions and 2 deletions
|
|
@ -59,9 +59,13 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
// Write to mmap-ed device
|
||||
char *curr_buf = buf;
|
||||
char to_write[4] = {0xca, 0xfe, 0xbe, 0xef};
|
||||
for (size_t byte_offset = 0; byte_offset < WRITE_AMNT; byte_offset += 4)
|
||||
memcpy(buf, to_write, 4);
|
||||
while (curr_buf < (char *)buf + WRITE_AMNT) {
|
||||
// eprintf("Writing to %p.\n", curr_buf);
|
||||
memcpy(curr_buf, to_write, 4);
|
||||
curr_buf += 4;
|
||||
}
|
||||
|
||||
// Unmap device
|
||||
munmap(buf, WRITE_AMNT);
|
||||
|
|
|
|||
BIN
src/aarch64-linux-flush-dcache/userspace/writer_null2.out
Executable file
BIN
src/aarch64-linux-flush-dcache/userspace/writer_null2.out
Executable file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue