aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/syscall/actions/sys_get_pointers.c
diff options
context:
space:
mode:
authorMarvin Borner2019-12-11 21:22:15 +0100
committerMarvin Borner2019-12-11 21:22:15 +0100
commite7d88df7a5a7e11677b68303a0d05455bf9a60d6 (patch)
treec727ea585e21bc68de6add2720e47af7c2506def /src/kernel/syscall/actions/sys_get_pointers.c
parent68915f46e66ed65ce2d32009fdfa2f5dca116842 (diff)
Some user-side graphics
Diffstat (limited to 'src/kernel/syscall/actions/sys_get_pointers.c')
-rw-r--r--src/kernel/syscall/actions/sys_get_pointers.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/kernel/syscall/actions/sys_get_pointers.c b/src/kernel/syscall/actions/sys_get_pointers.c
new file mode 100644
index 0000000..adbdd36
--- /dev/null
+++ b/src/kernel/syscall/actions/sys_get_pointers.c
@@ -0,0 +1,18 @@
+#include <stdint.h>
+#include <kernel/graphics/vesa.h>
+#include <kernel/graphics/font.h>
+#include <kernel/paging/paging.h>
+
+struct userspace_pointers {
+ unsigned char *fb;
+ struct font *font;
+};
+
+uint32_t sys_get_pointers()
+{
+ struct userspace_pointers *pointers = (struct userspace_pointers *) paging_alloc_pages(1);
+ pointers->fb = fb;
+ pointers->font = font;
+ paging_set_user((uint32_t) pointers, 1);
+ return (uint32_t) pointers;
+} \ No newline at end of file