no more PAGEBREAK

This commit is contained in:
Robert Morris 2019-07-24 13:33:43 -04:00
parent b4f89bb529
commit a77287e924
11 changed files with 7 additions and 30 deletions

View file

@ -43,7 +43,6 @@ binit(void)
initlock(&bcache.lock, "bcache");
//PAGEBREAK!
// Create linked list of buffers
bcache.head.prev = &bcache.head;
bcache.head.next = &bcache.head;
@ -140,6 +139,3 @@ brelse(struct buf *b)
release(&bcache.lock);
}
//PAGEBREAK!
// Blank page.

View file

@ -59,9 +59,6 @@ printptr(uint64 x) {
consputc(digits[x >> (sizeof(uint64) * 8 - 4)]);
}
//PAGEBREAK: 50
// Print to the console. only understands %d, %x, %p, %s.
void
printf(char *fmt, ...)

View file

@ -101,7 +101,6 @@ void pipeclose(struct pipe*, int);
int piperead(struct pipe*, uint64, int);
int pipewrite(struct pipe*, uint64, int);
//PAGEBREAK: 16
// proc.c
int cpuid(void);
void exit(void);

View file

@ -127,7 +127,6 @@ fileread(struct file *f, uint64 addr, int n)
return r;
}
//PAGEBREAK!
// Write to file f.
// addr is a user virtual address.
int

View file

@ -186,7 +186,6 @@ iinit(int dev)
static struct inode* iget(uint dev, uint inum);
//PAGEBREAK!
// Allocate an inode on device dev.
// Mark it as allocated by giving it type type.
// Returns an unlocked but allocated and referenced inode.
@ -363,7 +362,6 @@ iunlockput(struct inode *ip)
iput(ip);
}
//PAGEBREAK!
// Inode content
//
// The content (data) associated with each inode is stored
@ -450,7 +448,6 @@ stati(struct inode *ip, struct stat *st)
st->size = ip->size;
}
//PAGEBREAK!
// Read data from inode.
// Caller must hold ip->lock.
// If user_dst==1, then dst is a user virtual address;
@ -476,7 +473,6 @@ readi(struct inode *ip, int user_dst, uint64 dst, uint off, uint n)
return n;
}
// PAGEBREAK!
// Write data to inode.
// Caller must hold ip->lock.
// If user_src==1, then src is a user virtual address;
@ -508,7 +504,6 @@ writei(struct inode *ip, int user_src, uint64 src, uint off, uint n)
return n;
}
//PAGEBREAK!
// Directories
int
@ -575,7 +570,6 @@ dirlink(struct inode *dp, char *name, uint inum)
return 0;
}
//PAGEBREAK!
// Paths
// Copy the next path element from path into name.

View file

@ -1,5 +1,5 @@
// Physical memory allocator, intended to allocate
// memory for user processes, kernel stacks, page table pages,
// memory for user processes, kernel stacks, page-table pages,
// and pipe buffers. Allocates 4096-byte pages.
#include "types.h"
@ -39,7 +39,7 @@ freerange(void *pa_start, void *pa_end)
for(; p + PGSIZE <= (char*)pa_end; p += PGSIZE)
kfree(p);
}
//PAGEBREAK: 21
// Free the page of physical memory pointed at by v,
// which normally should have been returned by a
// call to kalloc(). (The exception is when

View file

@ -45,7 +45,6 @@ pipealloc(struct file **f0, struct file **f1)
(*f1)->pipe = pi;
return 0;
//PAGEBREAK: 20
bad:
if(pi)
kfree((char*)pi);
@ -74,7 +73,6 @@ pipeclose(struct pipe *pi, int writable)
release(&pi->lock);
}
//PAGEBREAK: 40
int
pipewrite(struct pipe *pi, uint64 addr, int n)
{

View file

@ -83,7 +83,6 @@ allocpid() {
return pid;
}
//PAGEBREAK: 32
// Look in the process table for an UNUSED proc.
// If found, initialize state required to run in the kernel,
// and return with p->lock held.
@ -192,7 +191,6 @@ uchar initcode[] = {
0x00, 0x00, 0x00
};
//PAGEBREAK: 32
// Set up first user process.
void
userinit(void)
@ -405,7 +403,6 @@ wait(void)
}
}
//PAGEBREAK: 42
// Per-CPU process scheduler.
// Each CPU calls scheduler() after setting itself up.
// Scheduler never returns. It loops, doing:

View file

@ -28,8 +28,6 @@ struct cpu {
extern struct cpu cpus[NCPU];
//PAGEBREAK: 17
// per-process data for the trap handling code in trampoline.S.
// sits in a page by itself just under the trampoline page in the
// user page table. not specially mapped in the kernel page table.

View file

@ -181,7 +181,6 @@ isdirempty(struct inode *dp)
return 1;
}
//PAGEBREAK!
uint64
sys_unlink(void)
{

View file

@ -60,10 +60,10 @@ kvminithart()
// Return the address of the PTE in page table pagetable
// that corresponds to virtual address va. If alloc!=0,
// create any required page table pages.
// create any required page-table pages.
//
// The risc-v Sv39 scheme has three levels of page table
// pages. A page table page contains 512 64-bit PTEs.
// The risc-v Sv39 scheme has three levels of page-table
// pages. A page-table page contains 512 64-bit PTEs.
// A 64-bit virtual address is split into five fields:
// 39..63 -- must be zero.
// 30..38 -- 9 bits of level-2 index.
@ -249,7 +249,7 @@ uvmdealloc(pagetable_t pagetable, uint64 oldsz, uint64 newsz)
return newsz;
}
// Recursively free page table pages.
// Recursively free page-table pages.
// All leaf mappings must already have been removed.
static void
freewalk(pagetable_t pagetable)
@ -270,7 +270,7 @@ freewalk(pagetable_t pagetable)
}
// Free user memory pages,
// then free page table pages.
// then free page-table pages.
void
uvmfree(pagetable_t pagetable, uint64 sz)
{