Strange pointer activity
Posted: Sat Jul 12, 2014 9:47 am
Hi all,
Using the code in this wiki article as a base (http://wiki.osdev.org/64-bit_Higher_Hal ... ith_GRUB_2), I've now landed in C land to start putting together my Kernel.
I'm just struggling at the moment with data that I define. With a simple console_write function (I think it came from JamesM's kernel tutes), I've started attempting to write strings to the console. In my main() function, I have these two following string declarations:
Passing the string "s" works, but "x" doesn't! Using a very round-a-bout way, I've tried to establish the address differences between these two variables. "x" points at 0xffffffff8010e000 and "s" points at 0xffffffff8010bfda.
Do I have extra memory paging work to conduct to get this working?
Using the code in this wiki article as a base (http://wiki.osdev.org/64-bit_Higher_Hal ... ith_GRUB_2), I've now landed in C land to start putting together my Kernel.
I'm just struggling at the moment with data that I define. With a simple console_write function (I think it came from JamesM's kernel tutes), I've started attempting to write strings to the console. In my main() function, I have these two following string declarations:
Code: Select all
const char *x = "foo";
char s[] = "bar";
Do I have extra memory paging work to conduct to get this working?