diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-03-21 21:51:02 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-03-21 21:51:02 +0000 |
commit | e1e64eb73e18e7813429c9bc8c24371a2f87189c (patch) | |
tree | 445fe2ebbd78a57482fa2957d8c2ac4128301237 /sys/arch/i386 | |
parent | 7181ac8638a4f9a5e5e67d83ad4e902988843517 (diff) |
NBPG -> PAGE_SIZE, PGSHIFT -> PAGE_SHIFT, PGOFSET -> PAGE_MASK
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/stand/boot/crt0.c | 6 | ||||
-rw-r--r-- | sys/arch/i386/stand/libsa/apmprobe.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/stand/libsa/memprobe.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/sys/arch/i386/stand/boot/crt0.c b/sys/arch/i386/stand/boot/crt0.c index 812d1612454..c92e293b5a2 100644 --- a/sys/arch/i386/stand/boot/crt0.c +++ b/sys/arch/i386/stand/boot/crt0.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crt0.c,v 1.5 2003/06/03 20:22:11 mickey Exp $ */ +/* $OpenBSD: crt0.c,v 1.6 2013/03/21 21:51:00 deraadt Exp $ */ /* * Copyright (c) 1997-1998 Michael Shalayeff @@ -62,10 +62,10 @@ static void domap() { extern char end[]; - register caddr_t p = (caddr_t)(((u_long)end + PGOFSET) & ~PGOFSET); + register caddr_t p = (caddr_t)(((u_long)end + PAGE_MASK) & ~PAGE_MASK); /* map heap */ - if ( (p = ummap(p, 32*NBPG, PROT_READ|PROT_WRITE, + if ( (p = ummap(p, 32*PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_FIXED|MAP_ANON, -1, 0)) == (caddr_t)-1) { printf("mmap failed: %d\n", errno); uexit(1); diff --git a/sys/arch/i386/stand/libsa/apmprobe.c b/sys/arch/i386/stand/libsa/apmprobe.c index ce09fa388d5..ed509886cfe 100644 --- a/sys/arch/i386/stand/libsa/apmprobe.c +++ b/sys/arch/i386/stand/libsa/apmprobe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apmprobe.c,v 1.15 2007/09/13 06:58:47 weingart Exp $ */ +/* $OpenBSD: apmprobe.c,v 1.16 2013/03/21 21:51:00 deraadt Exp $ */ /* * Copyright (c) 1997-2000 Michael Shalayeff @@ -139,7 +139,7 @@ apm_connect(bios_apminfo_t *ai) ai->apm_data_len = 0xffff - (ai->apm_data_base & 0xffff); #endif if (ai->apm_data_base < BOOTARG_OFF) - ai->apm_data_len = NBPG - (ai->apm_data_base & PGOFSET) - 1; + ai->apm_data_len = PAGE_SIZE - (ai->apm_data_base & PAGE_MASK) - 1; #ifdef DEBUG if (debug) diff --git a/sys/arch/i386/stand/libsa/memprobe.c b/sys/arch/i386/stand/libsa/memprobe.c index 74c43c4d169..10645562b64 100644 --- a/sys/arch/i386/stand/libsa/memprobe.c +++ b/sys/arch/i386/stand/libsa/memprobe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: memprobe.c,v 1.51 2012/10/30 14:06:29 jsing Exp $ */ +/* $OpenBSD: memprobe.c,v 1.52 2013/03/21 21:51:00 deraadt Exp $ */ /* * Copyright (c) 1997-1999 Michael Shalayeff @@ -421,7 +421,7 @@ mem_delete(long long sa, long long ea) register int64_t sp = p->addr, ep = p->addr + p->size; /* can we eat it as a whole? */ - if ((sa - sp) <= NBPG && (ep - ea) <= NBPG) { + if ((sa - sp) <= PAGE_SIZE && (ep - ea) <= PAGE_SIZE) { bcopy(p + 1, p, (char *)bios_memmap + sizeof(bios_memmap) - (char *)p); break; |