title: what does this code mean in xv6 entrypgdir?
body: <p>I'm currently delving into the xv6 operating system. I have a question for the below code snippet. I know entrypgdir is an array of pde_t type with size of NPDENTRIES. But what does "[0] = (0) | PTE_P | PTE_W | PTE_PS" mean?
  Thanks in advance</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>__attribute__((__aligned__(PGSIZE)))
  pde_t entrypgdir[NPDENTRIES] = {
    // Map VA's [0, 4MB) to PA's [0, 4MB)
    [0] = (0) | PTE_P | PTE_W | PTE_PS,
    // Map VA's [KERNBASE, KERNBASE+4MB) to PA's [0, 4MB)
    [KERNBASE&gt;&gt;PDXSHIFT] = (0) | PTE_P | PTE_W | PTE_PS,
  };</code></pre>
  </div>
  </div>
  </p>