Difference between revisions of "Xipx"

From Embedded Xinu
Jump to navigation Jump to search
(Created page with "For now, I'm just putting information here that I think is important and is at risk of being lost. Someday, this should probably be a more polished and complete page. ...yes...")
 
Line 8: Line 8:
 
Limits on code locations:
 
Limits on code locations:
 
The GETPROT_ADDR in the Makefile defines where the binary image for getprotected.S/initPaging.c gets put in memory.  This must be low enough so that the whole image stays within a 16-bit address range because it all executes in 16-bit real mode.  Also, keep IMG_ADDR low enough to not exceed 0x28ffffff (there is no safety check to make sure that IMG_ADDR + [xipx image size] < 0x29000000, so things will just break (probably page fault) if you mess that up.)
 
The GETPROT_ADDR in the Makefile defines where the binary image for getprotected.S/initPaging.c gets put in memory.  This must be low enough so that the whole image stays within a 16-bit address range because it all executes in 16-bit real mode.  Also, keep IMG_ADDR low enough to not exceed 0x28ffffff (there is no safety check to make sure that IMG_ADDR + [xipx image size] < 0x29000000, so things will just break (probably page fault) if you mess that up.)
 +
 +
 +
Custom memcpy: a memcpy optimized for x86 is used in place of the libxc implementation.  So my libxc memcpy.c has a #ifndef _SCC_ in it.
  
  
 
TODO: talk about details of ut_to_k_view() and justify why it does everything it does in the order it does it.  (This might end up in the thesis.)
 
TODO: talk about details of ut_to_k_view() and justify why it does everything it does in the order it does it.  (This might end up in the thesis.)
  
TODO: describe the interaction of x86 interrupts and privilege levels, etc.
+
TODO: describe the interaction of x86 interrupts and privilege levels, etc. (Might also be in the thesis.)

Revision as of 02:14, 19 May 2012

For now, I'm just putting information here that I think is important and is at risk of being lost. Someday, this should probably be a more polished and complete page. ...yes, someday, someone will have to make it that... someone...


User threads global variables problem: User threads cannot have global variables because global variables apparently don't survive the objcopy to binary, or something. The discovery: assigning to a global variable in a usrthr causes a pagefault, because that write tries to go to some high memory address, but apparently that memory address doesn't get put into the binary, so the codesize (that gets prepended to the user thread binary) isn't large enough to cover that address, so when the thread is created it doesn't map a page for that spot, so pagefault. It's probably just a matter of changing some build options or something, but I haven't dug into it yet.


Limits on code locations: The GETPROT_ADDR in the Makefile defines where the binary image for getprotected.S/initPaging.c gets put in memory. This must be low enough so that the whole image stays within a 16-bit address range because it all executes in 16-bit real mode. Also, keep IMG_ADDR low enough to not exceed 0x28ffffff (there is no safety check to make sure that IMG_ADDR + [xipx image size] < 0x29000000, so things will just break (probably page fault) if you mess that up.)


Custom memcpy: a memcpy optimized for x86 is used in place of the libxc implementation. So my libxc memcpy.c has a #ifndef _SCC_ in it.


TODO: talk about details of ut_to_k_view() and justify why it does everything it does in the order it does it. (This might end up in the thesis.)

TODO: describe the interaction of x86 interrupts and privilege levels, etc. (Might also be in the thesis.)