ia64/xen-unstable

changeset 10772:cc991d9953d2

[MINI-OS] Fix a bug which prevented map_frames being used more than once.
Found by John D. Ramsdell <ramsdell@mitre.org>

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
author sos22@douglas.cl.cam.ac.uk
date Tue Jul 25 10:59:02 2006 +0100 (2006-07-25)
parents bbabdebc54ad
children 7d6f0791c650
files extras/mini-os/mm.c
line diff
     1.1 --- a/extras/mini-os/mm.c	Wed Jul 19 21:13:36 2006 +0100
     1.2 +++ b/extras/mini-os/mm.c	Tue Jul 25 10:59:02 2006 +0100
     1.3 @@ -687,7 +687,7 @@ void *map_frames(unsigned long *f, unsig
     1.4      /* Find a run of n contiguous frames */
     1.5      for (x = 0; x <= 1024 - n; x += y + 1) {
     1.6          for (y = 0; y < n; y++)
     1.7 -            if (demand_map_pgt[y] & _PAGE_PRESENT)
     1.8 +            if (demand_map_pgt[x+y] & _PAGE_PRESENT)
     1.9                  break;
    1.10          if (y == n)
    1.11              break;