Discussion:
User Mapping: exiting right away.
(too old to reply)
cs412050
2005-04-07 22:09:28 UTC
Permalink
I am still working on User Mapping.
( My uservm.c is all covered with Print statement with
enable/disable switch variables, because too many print
makes kernel hang. )

As soon as kernel tris to start shell.exe, it exits right away.
I suspect Entry addr calculation (it prints 0x80001000).
My entryaddr is:

userContext->entryAddr = 0x80000000 + exeFormat->entryAddr;


And Also, I am confused with Virtual Memory and Logical address.
My understanding is:
1. VM is from 0 to 4G, and address space mapped to each user process.
2. Logical memory is from 0 to 2G, and upper part of user process
( from 2G to 4G )

If I am understanding right, I am confused when to use Vaddr, and
when to use logical addr. For formatting argument block,
we use 0x7ffff000, but page virtual address is 0xfffff000.
Can anyone clarify?
William Francis Cladek
2005-04-08 02:28:43 UTC
Permalink
Yeah, your understanding here is right. The trick is just figuring out when to use logical address or virtual address. A good guideline
is just to look at your project 2 implementation, as far as uservm.c is concerned, at least. For instance, entryAddr is a logical
address, so in your case you should not be adding 0x80000000. Same with arguments and stack, I think.

Hope this helps.

Will
Post by cs412050
I am still working on User Mapping.
( My uservm.c is all covered with Print statement with
enable/disable switch variables, because too many print
makes kernel hang. )
As soon as kernel tris to start shell.exe, it exits right away.
I suspect Entry addr calculation (it prints 0x80001000).
userContext->entryAddr = 0x80000000 + exeFormat->entryAddr;
And Also, I am confused with Virtual Memory and Logical address.
1. VM is from 0 to 4G, and address space mapped to each user process.
2. Logical memory is from 0 to 2G, and upper part of user process
( from 2G to 4G )
If I am understanding right, I am confused when to use Vaddr, and
when to use logical addr. For formatting argument block,
we use 0x7ffff000, but page virtual address is 0xfffff000.
Can anyone clarify?
Raymond Chung
2005-04-08 05:00:46 UTC
Permalink
Thank you, Will.
That was it. Now I got user mapping done.
I appreciate and Good luck to you.


William Francis Cladek <***@predict.eng.umd.edu> wrote:
Loading...