ia64/xen-unstable

changeset 17626:4c3140455620

minios: clear FB content since _xmalloc may return non-zeroed memory
(in debug mode, notably).

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon May 12 10:10:45 2008 +0100 (2008-05-12)
parents 3b20e543b52d
children aadde6652457
files extras/mini-os/kernel.c
line diff
     1.1 --- a/extras/mini-os/kernel.c	Mon May 12 10:10:03 2008 +0100
     1.2 +++ b/extras/mini-os/kernel.c	Mon May 12 10:10:45 2008 +0100
     1.3 @@ -303,13 +303,10 @@ static void fbfront_thread(void *p)
     1.4  
     1.5      memsize = n * PAGE_SIZE;
     1.6      fb = _xmalloc(memsize, PAGE_SIZE);
     1.7 +    memset(fb, 0, memsize);
     1.8      mfns = xmalloc_array(unsigned long, n);
     1.9 -    for (i = 0; i < n; i++) {
    1.10 -        /* trigger CoW */
    1.11 -        ((char *) fb) [i * PAGE_SIZE] = 0;
    1.12 -        barrier();
    1.13 +    for (i = 0; i < n; i++)
    1.14          mfns[i] = virtual_to_mfn((char *) fb + i * PAGE_SIZE);
    1.15 -    }
    1.16      fb_dev = init_fbfront(NULL, mfns, WIDTH, HEIGHT, DEPTH, line_length, n);
    1.17      xfree(mfns);
    1.18      if (!fb_dev) {