ia64/xen-unstable

changeset 13857:e1364f2c6867

minios: Fix netfront for ia64.
Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
author kfraser@localhost.localdomain
date Tue Feb 06 23:12:59 2007 +0000 (2007-02-06)
parents 7379c1174155
children 625aa1547cb6
files extras/mini-os/gnttab.c extras/mini-os/netfront.c
line diff
     1.1 --- a/extras/mini-os/gnttab.c	Tue Feb 06 23:10:05 2007 +0000
     1.2 +++ b/extras/mini-os/gnttab.c	Tue Feb 06 23:12:59 2007 +0000
     1.3 @@ -21,7 +21,12 @@
     1.4  
     1.5  #define NR_RESERVED_ENTRIES 8
     1.6  
     1.7 +/* NR_GRANT_FRAMES must be less than or equal to that configured in Xen */
     1.8 +#ifdef __ia64__
     1.9 +#define NR_GRANT_FRAMES 1
    1.10 +#else
    1.11  #define NR_GRANT_FRAMES 4
    1.12 +#endif
    1.13  #define NR_GRANT_ENTRIES (NR_GRANT_FRAMES * PAGE_SIZE / sizeof(grant_entry_t))
    1.14  
    1.15  static grant_entry_t *gnttab_table;
     2.1 --- a/extras/mini-os/netfront.c	Tue Feb 06 23:10:05 2007 +0000
     2.2 +++ b/extras/mini-os/netfront.c	Tue Feb 06 23:12:59 2007 +0000
     2.3 @@ -349,7 +349,9 @@ done:
     2.4      init_rx_buffers();
     2.5  
     2.6      unsigned char rawmac[6];
     2.7 -    sscanf(mac,"%x:%x:%x:%x:%x:%x",
     2.8 +        /* Special conversion specifier 'hh' needed for __ia64__. Without
     2.9 +           this mini-os panics with 'Unaligned reference'. */
    2.10 +    sscanf(mac,"%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
    2.11              &rawmac[0],
    2.12              &rawmac[1],
    2.13              &rawmac[2],