aboutsummaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
Diffstat (limited to 'extras')
-rw-r--r--extras/mini-os/fbfront.c12
-rw-r--r--extras/mini-os/include/fbfront.h3
2 files changed, 7 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++)
diff --git a/extras/mini-os/include/fbfront.h b/extras/mini-os/include/fbfront.h
index 502f0330a2..fa98942e76 100644
--- a/extras/mini-os/include/fbfront.h
+++ b/extras/mini-os/include/fbfront.h
@@ -14,6 +14,9 @@
#ifndef KEY_Q
#define KEY_Q 16
#endif
+#ifndef KEY_MAX
+#define KEY_MAX 0x1ff
+#endif
struct kbdfront_dev;