debuggers.hg

changeset 21053:6450dfb7737f

PV-GRUB: Fix gzip support and iso support on x86_64

Signed-off-by: Samuel Thibault <sthibault@debian.org>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Mar 08 19:09:23 2010 +0000 (2010-03-08)
parents 8dada4c897c9
children 2fc43ea6b8de
files stubdom/grub.patches/99minios
line diff
     1.1 --- a/stubdom/grub.patches/99minios	Sat Mar 06 13:31:42 2010 +0000
     1.2 +++ b/stubdom/grub.patches/99minios	Mon Mar 08 19:09:23 2010 +0000
     1.3 @@ -1501,3 +1501,70 @@ diff -u -p -r1.5 fsys_xfs.c
     1.4   #else
     1.5   	/* This is slower but this works on all x86 architectures.  */
     1.6   	__asm__("xchgb %b0, %h0" \
     1.7 +--- grub.orig/stage2/gunzip.c	2010-03-07 23:03:34.000000000 +0100
     1.8 ++++ grub/stage2/gunzip.c	2010-03-07 23:05:36.000000000 +0100
     1.9 +@@ -141,7 +141,7 @@
    1.10 + static int gzip_filemax;
    1.11 + static int gzip_fsmax;
    1.12 + static int saved_filepos;
    1.13 +-static unsigned long gzip_crc;
    1.14 ++static unsigned int gzip_crc;
    1.15 + 
    1.16 + /* internal extra variables for use of inflate code */
    1.17 + static int block_type;
    1.18 +@@ -157,7 +157,7 @@
    1.19 +  *  Linear allocator.
    1.20 +  */
    1.21 + 
    1.22 +-static unsigned long linalloc_topaddr;
    1.23 ++static unsigned int linalloc_topaddr;
    1.24 + 
    1.25 + static void *
    1.26 + linalloc (int size)
    1.27 +@@ -253,7 +253,7 @@
    1.28 + 
    1.29 + typedef unsigned char uch;
    1.30 + typedef unsigned short ush;
    1.31 +-typedef unsigned long ulg;
    1.32 ++typedef unsigned int ulg;
    1.33 + 
    1.34 + /*
    1.35 +  *  Window Size
    1.36 +@@ -316,8 +316,8 @@
    1.37 +       return 0;
    1.38 +     }
    1.39 + 
    1.40 +-  gzip_crc = *((unsigned long *) buf);
    1.41 +-  gzip_fsmax = gzip_filemax = *((unsigned long *) (buf + 4));
    1.42 ++  gzip_crc = *((unsigned int *) buf);
    1.43 ++  gzip_fsmax = gzip_filemax = *((unsigned int *) (buf + 4));
    1.44 + 
    1.45 +   initialize_tables ();
    1.46 + 
    1.47 +diff -ur grub.orig/stage2/fsys_iso9660.c grub-upstream/stage2/fsys_iso9660.c
    1.48 +--- grub.orig/stage2/fsys_iso9660.c	2010-03-07 23:39:00.000000000 +0100
    1.49 ++++ grub/stage2/fsys_iso9660.c	2010-03-07 23:39:56.000000000 +0100
    1.50 +@@ -43,7 +43,7 @@
    1.51 + 
    1.52 + /* iso fs inode data in memory */
    1.53 + struct iso_inode_info {
    1.54 +-  unsigned long file_start;
    1.55 ++  unsigned int file_start;
    1.56 + };
    1.57 + 
    1.58 + #define ISO_SUPER	\
    1.59 +@@ -88,12 +88,12 @@
    1.60 +   if (byte_len <= 0)
    1.61 +     return 1;
    1.62 + 
    1.63 +-  sector += (byte_offset >> sector_size_lg2);
    1.64 +-  byte_offset &= (buf_geom.sector_size - 1);
    1.65 +   asm volatile ("shl%L0 %1,%0"
    1.66 + 		: "=r"(sector)
    1.67 + 		: "Ic"((int8_t)(ISO_SECTOR_BITS - sector_size_lg2)),
    1.68 + 		"0"(sector));
    1.69 ++  sector += (byte_offset >> sector_size_lg2);
    1.70 ++  byte_offset &= (buf_geom.sector_size - 1);
    1.71 + 
    1.72 + #if !defined(STAGE1_5)
    1.73 +   if (disk_read_hook && debug)