diff -r a75564db03c3 -r 0d375492beb7 util/m5/Makefile.x86 --- a/util/m5/Makefile.x86 Wed Jul 21 09:55:57 2010 -0700 +++ b/util/m5/Makefile.x86 Wed Jul 21 14:55:38 2010 -0700 @@ -31,7 +31,8 @@ AS=as LD=ld -CFLAGS=-O2 +CFLAGS=-O2 +LDFLAGS=-static OBJS=m5.o m5op_x86.o all: m5 @@ -43,7 +44,7 @@ $(CC) $(CFLAGS) -o $@ -c $< m5: $(OBJS) - $(CC) -o $@ $(OBJS) + $(CC) $(LDFLAGS) -o $@ $(OBJS) clean: rm -f *.o m5 diff -r a75564db03c3 -r 0d375492beb7 util/m5/m5.c --- a/util/m5/m5.c Wed Jul 21 09:55:57 2010 -0700 +++ b/util/m5/m5.c Wed Jul 21 14:55:38 2010 -0700 @@ -65,6 +65,11 @@ int offset = 0; int len; + // Touch all buffer pages to ensure they are mapped in the + // page table. This is required in the case of X86_FS, where + // Linux does demand paging. + memset(buf, 0, sizeof(buf)); + while ((len = m5_readfile(buf, sizeof(buf), offset)) > 0) { write(dest_fid, buf, len); offset += len; diff -r a75564db03c3 -r 0d375492beb7 util/m5/m5ops.h --- a/util/m5/m5ops.h Wed Jul 21 09:55:57 2010 -0700 +++ b/util/m5/m5ops.h Wed Jul 21 14:55:38 2010 -0700 @@ -52,6 +52,7 @@ #define addsymbol_func 0x53 #define panic_func 0x54 +#define reserved1_func 0x55 // Reserved for user #define reserved2_func 0x56 // Reserved for user #define reserved3_func 0x57 // Reserved for user #define reserved4_func 0x58 // Reserved for user