diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-04-09 20:20:32 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-04-09 20:20:32 +0000 |
commit | 1938e0a5e4df7faf68cae995eddc27e634c6d85e (patch) | |
tree | 36fdb34dc13c4ecc87d09de94f9143495edf25f4 | |
parent | 61628d873251fdaa0cdf611354f0b0d92415a68f (diff) |
repair a 32-bit truncation in paddr_t calculation, allowing my 8GB
o350 to boot once again
ok miod
-rw-r--r-- | sys/arch/mips64/include/pte.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/mips64/include/pte.h b/sys/arch/mips64/include/pte.h index d1129832109..6cd1600dd46 100644 --- a/sys/arch/mips64/include/pte.h +++ b/sys/arch/mips64/include/pte.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pte.h,v 1.10 2009/12/07 19:05:57 miod Exp $ */ +/* $OpenBSD: pte.h,v 1.11 2011/04/09 20:20:31 deraadt Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -90,7 +90,7 @@ typedef u_int32_t pt_entry_t; /* Mips page table entry */ #define PG_FRAME 0x3fffffc0 #define PG_SHIFT 6 -#define pfn_to_pad(pa) (((pa) & PG_FRAME) << PG_SHIFT) +#define pfn_to_pad(pa) ((((paddr_t)pa) & PG_FRAME) << PG_SHIFT) #define vad_to_pfn(va) (((va) >> PG_SHIFT) & PG_FRAME) #define PG_SIZE_4K 0x00000000 |