aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/fbfront.c
diff options
context:
space:
mode:
Diffstat (limited to 'extras/mini-os/fbfront.c')
-rw-r--r--extras/mini-os/fbfront.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/extras/mini-os/fbfront.c b/extras/mini-os/fbfront.c
index bbe49b92a5..4f5041ab69 100644
--- a/extras/mini-os/fbfront.c
+++ b/extras/mini-os/fbfront.c
@@ -31,13 +31,6 @@ struct kbdfront_dev {
char *nodename;
char *backend;
- char *data;
- int width;
- int height;
- int depth;
- int line_length;
- int mem_length;
-
#ifdef HAVE_LIBC
int fd;
#endif
@@ -316,7 +309,10 @@ struct fbfront_dev *init_fbfront(char *nodename, void *data, int width, int heig
for (i = 0; mapped < mem_length && i < max_pd; i++) {
unsigned long *pd = (unsigned long *) alloc_page();
for (j = 0; mapped < mem_length && j < PAGE_SIZE / sizeof(unsigned long); j++) {
- pd[j] = virt_to_mfn((unsigned long) data + mapped);
+ /* Trigger CoW */
+ * ((char *)data + mapped) = 0;
+ barrier();
+ pd[j] = virtual_to_mfn((unsigned long) data + mapped);
mapped += PAGE_SIZE;
}
for ( ; j < PAGE_SIZE / sizeof(unsigned long); j++)