c***@CSIC.UMD.EDU
2005-11-05 23:43:33 UTC
/* Find maximum virtual address */
for (i = 0; i < exeFormat->numSegments; ++i) {
struct Exe_Segment *segment = &exeFormat->segmentList[i];
ulong_t topva = segment->startAddress + segment-
maxva = topva;
}
/* Determine size required for argument block */
Get_Argument_Block_Size(command, &numArgs, &argBlockSize);
I am not sure what the above code does. I am guessing it is
finding the maximum vitual address for the code/text segment,
which is later passed on Create_User_Context
Also, for passing parameters for format_argument_block
Should the first argument be the physical address of the page
which corresponds to the base of linear address page of args
which is 0xffffff - Sizeofargumentblock (rounded to a page ).
and the second to argument to same function should simply be
0xffffff - Sizeofargumentblock (rounded to a page ).
Please let me know if i am on the right track
for (i = 0; i < exeFormat->numSegments; ++i) {
struct Exe_Segment *segment = &exeFormat->segmentList[i];
ulong_t topva = segment->startAddress + segment-
sizeInMemory; /* FIXME: range check */
if (topva > maxva)maxva = topva;
}
/* Determine size required for argument block */
Get_Argument_Block_Size(command, &numArgs, &argBlockSize);
I am not sure what the above code does. I am guessing it is
finding the maximum vitual address for the code/text segment,
which is later passed on Create_User_Context
Also, for passing parameters for format_argument_block
Should the first argument be the physical address of the page
which corresponds to the base of linear address page of args
which is 0xffffff - Sizeofargumentblock (rounded to a page ).
and the second to argument to same function should simply be
0xffffff - Sizeofargumentblock (rounded to a page ).
Please let me know if i am on the right track