Mac OS X Internals: The Book Forum Index Mac OS X Internals: The Book
Forums
 
SearchSearch   MemberlistMemberlist  RegisterRegister 
 ProfileProfile   Log inLog in 
Mission Statement | Rules | Terms of Forum Use       osxbook.com | Blog


Using diagpcpy to read from ppe_vaddr (6.8.9.1)

 
Post new topic   Reply to topic    Mac OS X Internals: The Book Forum Index -> The Book
View previous topic :: View next topic  
Author Message
Dan



Joined: 07 Jul 2006
Posts: 1

PostPosted: Fri Jul 07, 2006 12:52 am    Post subject: Using diagpcpy to read from ppe_vaddr (6.8.9.1) Reply with quote

I'm trying to follow the example in Section 6.8.9.1 of retrieving hwPrograms using diagpcpy. In the last step, diagpcpy is used to read from (an offset from) ppe_vaddr. It seems to me that ppe_vaddr is a virtual address, but here it is treated as if it was a physical address. What am I missing? 

Incidentally, judging from osfmk/ppc/cpu.c, ppe_paddr should contain the physical address of the first page of the per_proc_info structure (and indeed in the printed example it does).
Back to top
View user's profile Send private message
amit
Amit Singh
Amit Singh


Joined: 06 Feb 2006
Posts: 76

PostPosted: Fri Jul 07, 2006 1:45 am    Post subject: Re: Using diagpcpy to read from ppe_vaddr (6.8.9.1) Reply with quote

Dan wrote:
I'm trying to follow the example in Section 6.8.9.1 of retrieving hwPrograms using diagpcpy. In the last step, diagpcpy is used to read from (an offset from) ppe_vaddr. It seems to me that ppe_vaddr is a virtual address, but here it is treated as if it was a physical address. What am I missing?

Sorry about that. PerProcTable is in a specially mapped area in which virtual and physical addresses are equal. I can see that Section 6.8.9.1 is ambiguous because it doesn't clarify this. There's also a typo: the bullet list on page 653 should say ppe_vaddr instead of ppe_addr, which doesn't exist. Better still, the example should just use ppe_paddr.

Amit
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Mac OS X Internals: The Book Forum Index -> The Book All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB (FAQ)
All contents of this site, unless otherwise noted, are ©1994-2008 Amit Singh. All Rights Reserved. Terms of Use