I have a little problem with my OS. In the initial loading of my OS, GRUB loads a initrd (Initial RAM Disk) which contains a plain binary that I copy to another address in the memory which is controled by the OS and it's preparated to run applications. After I copy the binary, I try to call it, because I know where the entry point is. Besides, to know if the call has properly worked, the code writes in an address that I also know some numbers that I can read from the debugger.
The code is something like that:
My OS:
Code: Select all
void (*call)(void* param) = ((void(*)(void* param)) address; // The address is in the MB 16 and, yes, it's mapped.
call(data); // where data is a struct which contains some information that application needs. Besides, there are also a CRC so
// I can check whether the code have done its work fine. The problem is that the code seems not to work (in fact, it seems
// that it is not called at all ) because the structure isn't modified (when the struct. must have been changed). Moreover,
// when I look at the address I said before, there are nothing.
Code: Select all
unsigned int* address2check = (unsigned int*)0x1400000; // Again, it's mapped and there are no mmio mapped to that address.
*addres2chechk = 0x1234567; // A random number I put.
// Then I use the struct info and I modify its contents.
PS2. If everyone needed more information, or code, do not doubt to ask me for it.