aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extras/mini-os/gnttab.c5
-rw-r--r--extras/mini-os/netfront.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/extras/mini-os/gnttab.c b/extras/mini-os/gnttab.c
index da92fc33c9..4d75897a98 100644
--- a/extras/mini-os/gnttab.c
+++ b/extras/mini-os/gnttab.c
@@ -21,7 +21,12 @@
#define NR_RESERVED_ENTRIES 8
+/* NR_GRANT_FRAMES must be less than or equal to that configured in Xen */
+#ifdef __ia64__
+#define NR_GRANT_FRAMES 1
+#else
#define NR_GRANT_FRAMES 4
+#endif
#define NR_GRANT_ENTRIES (NR_GRANT_FRAMES * PAGE_SIZE / sizeof(grant_entry_t))
static grant_entry_t *gnttab_table;
diff --git a/extras/mini-os/netfront.c b/extras/mini-os/netfront.c
index 4c10dc8770..088f67a3bb 100644
--- a/extras/mini-os/netfront.c
+++ b/extras/mini-os/netfront.c
@@ -349,7 +349,9 @@ done:
init_rx_buffers();
unsigned char rawmac[6];
- sscanf(mac,"%x:%x:%x:%x:%x:%x",
+ /* Special conversion specifier 'hh' needed for __ia64__. Without
+ this mini-os panics with 'Unaligned reference'. */
+ sscanf(mac,"%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
&rawmac[0],
&rawmac[1],
&rawmac[2],