Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // load sections
- for (int s = 0; s < coff.getNumSections(); s++) {
- CoffSection section = coff.getSection(s);
- //From project PDF -- where is this used?
- pageTable[s].readOnly = section.isReadOnly();
- System.err.println("\tinitializing " + section.getName()
- + " section (" + section.getLength() + " pages)");
- Lib.debug(dbgProcess, "\tinitializing " + section.getName()
- + " section (" + section.getLength() + " pages)");
- for (int i = 0; i < section.getLength(); i++) {
- int vpn = section.getFirstVPN() + i;
- /*
- * TODO
- * paddr or ppn??
- */
- int paddr;
- // Look for translation entry with this vpn?
- pageTable[s].vpn = s;
- paddr = pageTable[s].ppn + i;
- // for now, just assume virtual addresses=physical addresses
- //section.loadPage(i, vpn);
- section.loadPage(i, paddr);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement