home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / dec / 4203 < prev    next >
Encoding:
Text File  |  1992-07-26  |  1.7 KB  |  47 lines

  1. Newsgroups: comp.sys.dec
  2. Path: sparky!uunet!decwrl!pa.dec.com!decprl!decprl!boyd
  3. From: boyd@prl.dec.com (Boyd Roberts)
  4. Subject: Re: VAX question
  5. Message-ID: <1992Jul26.211939.25698@prl.dec.com>
  6. Sender: news@prl.dec.com (USENET News System)
  7. Nntp-Posting-Host: prl313.prl.dec.com
  8. Organization: Digital Equipment Corporation - Paris Research Laboratory
  9. References:  <1992Jul26.015003.1@matrix.cs.wright.edu>
  10. Date: Sun, 26 Jul 1992 21:19:39 GMT
  11. Lines: 34
  12.  
  13. In article <1992Jul26.015003.1@matrix.cs.wright.edu>, dwagoner@matrix.cs.wright.edu writes:
  14. > Can anyone explain the difference between P0 and P1 space on a VAX?
  15.  
  16. P0 space starts at 0 and goes to 0x3FFFFFFF.  P1 space starts at 0x7FFFFFFF
  17. and extends down to 0x40000000.  P0 is used for text, data and bss.  P1
  18. is used for the stack. [I hope i've got the numbers right; anyway it's
  19. all to do with the top two bits of the address:
  20.  
  21.    31 30               ...            0
  22.     o  o  o  o         ...            o
  23.     ^  ^
  24.     |  |---------   P0/P1
  25.     |
  26.     |-----------   user/kernel space
  27.  
  28. kernel P1 is invalid].
  29.  
  30. > Text and initialized data segments (on BSD 4.3, at least) wind up 
  31. > in P0 space; unitialized data (i.e. stack) is  placed in P1 space.
  32.  
  33. Uninitialised data is known as bss and belongs in P0.
  34.  
  35. > The two regions are accessed using different base registers; P1 is
  36. > a bit tricky to work with in comparison to P0. 
  37.  
  38. Well, I always thought that it was counter intuitive for the human
  39. but was designed to be simple for the machine.  I think the idea
  40. was to use the same arithmetic for both regions.  From memory, the P1
  41. length register indicated how much is _not_ mapped.
  42.  
  43.  
  44. Boyd Roberts            boyd@prl.dec.com
  45.  
  46. ``When the going gets wierd, the weird turn pro...''
  47.