Fix mapping of a single byte area, fix reset and poweroff

git-svn-id: svn://coreboot.org/openbios/openbios-devel@166 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2007-07-20 11:23:30 +00:00
parent 1d39ac97cb
commit bca00a2c33
4 changed files with 15 additions and 11 deletions

View File

@@ -195,7 +195,7 @@ map_io(uint64_t pa, int size)
unsigned int mva;
off = pa & (PAGE_SIZE - 1);
npages = (off + (size - 1) + (PAGE_SIZE - 1)) / PAGE_SIZE;
npages = (off + size - 1) / PAGE_SIZE + 1;
pa &= ~(PAGE_SIZE - 1);
va = mem_alloc(&cio, npages * PAGE_SIZE, PAGE_SIZE);