Advertisement
peterbecich

Untitled

Mar 29th, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. // load sections
  2. for (int s = 0; s < coff.getNumSections(); s++) {
  3. CoffSection section = coff.getSection(s);
  4. //From project PDF -- where is this used?
  5. pageTable[s].readOnly = section.isReadOnly();
  6.  
  7. System.err.println("\tinitializing " + section.getName()
  8. + " section (" + section.getLength() + " pages)");
  9. Lib.debug(dbgProcess, "\tinitializing " + section.getName()
  10. + " section (" + section.getLength() + " pages)");
  11.  
  12. for (int i = 0; i < section.getLength(); i++) {
  13. int vpn = section.getFirstVPN() + i;
  14. /*
  15. * TODO
  16. * paddr or ppn??
  17. */
  18. int paddr;
  19.  
  20. // Look for translation entry with this vpn?
  21. pageTable[s].vpn = s;
  22. paddr = pageTable[s].ppn + i;
  23.  
  24. // for now, just assume virtual addresses=physical addresses
  25. //section.loadPage(i, vpn);
  26.  
  27. section.loadPage(i, paddr);
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement