[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-ia64-devel] [OGFW][PATCH] Fix alignment
Hi Tristan, If you would like an attached patch, please apply it. Thanks, Kouya Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx> Tristan Gingold writes: > I have commented out the call to check_regs. If you have a better patch, > I will be happy to apply it. > > Tristan. diff -r ff6062288399 edk2-sparse/EdkXenPkg/Cpu/Itanium/Timer/Dxe/Timer.c --- a/edk2-sparse/EdkXenPkg/Cpu/Itanium/Timer/Dxe/Timer.c Tue Nov 27 23:55:39 2007 +0100 +++ b/edk2-sparse/EdkXenPkg/Cpu/Itanium/Timer/Dxe/Timer.c Wed Nov 28 10:59:16 2007 +0900 @@ -412,25 +412,28 @@ GetItcFreq ( ItcFreq = BaseFrequence * (PalRet.r11 >> 32) / (UINT32)PalRet.r11; } +#define DEBUG_CHECK_REGS 0 + +#if DEBUG_CHECK_REGS #define SAVESZ ((128*2 + 32 + 8 + 6 + 1) * 8) /* FP + r0-r31 + BR + AR + PR */ #define RANDSZ ((128*2 + 32 + 40 + 8 + 6 + 1) * 8) /* FP + r0-r31 + OUT + BR + AR + PR */ -extern long *regcheck(long *, long *); +extern long *regcheck(long double *, long double *); STATIC VOID check_regs (VOID) { - long save[SAVESZ / 8]; - long rand[RANDSZ / 8]; + long double save[(SAVESZ + 8) / 16]; + long double rand[(RANDSZ + 8) / 16]; long *r; int i; for (i = 0; i < RANDSZ; i++) ((unsigned char*)rand)[i] = i ^ 0x59; - if (r = regcheck(save, rand)) { - int reg = r - rand; + if ((r = regcheck(save, rand))) { + int reg = r - (long *)rand; asm volatile ("rsm psr.ic;; mov r2=%0; break 4" : : "r"(reg)); #if 0 if (reg < 256) { @@ -461,11 +464,12 @@ check_regs (VOID) case 4: fprintf(stderr, "ar.lc\n"); return 1; case 5: fprintf(stderr, "ar.ec\n"); return 1; case 6: fprintf(stderr, "pr\n"); return 1; - default: fprintf(stderr, "! %d\n", r - rand); return 1; + default: fprintf(stderr, "! %d\n", r - (long *)rand); return 1; } #endif } } +#endif /* DEBUG_CHECK_REGS */ EFI_STATUS EFIAPI @@ -557,7 +561,7 @@ Returns: ); ASSERT_EFI_ERROR (Status); -#if 0 +#if DEBUG_CHECK_REGS // Check interrupt check_regs(); #endif _______________________________________________ Xen-ia64-devel mailing list Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-ia64-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |