summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/include/param.h6
-rw-r--r--sys/arch/i386/include/pmap.h12
-rw-r--r--sys/arch/i386/stand/libsa/apmprobe.c10
3 files changed, 14 insertions, 14 deletions
diff --git a/sys/arch/i386/include/param.h b/sys/arch/i386/include/param.h
index 001d7ac1e3f..d0dbf627058 100644
--- a/sys/arch/i386/include/param.h
+++ b/sys/arch/i386/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.30 2005/07/31 15:31:13 miod Exp $ */
+/* $OpenBSD: param.h,v 1.31 2005/11/14 23:50:26 martin Exp $ */
/* $NetBSD: param.h,v 1.29 1996/03/04 05:04:26 cgd Exp $ */
/*-
@@ -148,7 +148,3 @@
#define i386_trunc_pdr(x) ((unsigned)(x) & ~PDOFSET)
#define i386_btod(x) ((unsigned)(x) >> PDSHIFT)
#define i386_dtob(x) ((unsigned)(x) << PDSHIFT)
-#define i386_round_page(x) ((((unsigned)(x)) + PGOFSET) & ~PGOFSET)
-#define i386_trunc_page(x) ((unsigned)(x) & ~PGOFSET)
-#define i386_btop(x) ((unsigned)(x) >> PGSHIFT)
-#define i386_ptob(x) ((unsigned)(x) << PGSHIFT)
diff --git a/sys/arch/i386/include/pmap.h b/sys/arch/i386/include/pmap.h
index 9ffdf455622..7f9c32fad35 100644
--- a/sys/arch/i386/include/pmap.h
+++ b/sys/arch/i386/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.37 2004/12/14 16:57:22 hshoexer Exp $ */
+/* $OpenBSD: pmap.h,v 1.38 2005/11/14 23:50:26 martin Exp $ */
/* $NetBSD: pmap.h,v 1.44 2000/04/24 17:18:18 thorpej Exp $ */
/*
@@ -197,13 +197,13 @@
* plus alternative versions of the above
*/
-#define vtopte(VA) (PTE_BASE + i386_btop(VA))
+#define vtopte(VA) (PTE_BASE + atop(VA))
#define kvtopte(VA) vtopte(VA)
-#define ptetov(PT) (i386_ptob(PT - PTE_BASE))
+#define ptetov(PT) (ptoa(PT - PTE_BASE))
#define vtophys(VA) ((*vtopte(VA) & PG_FRAME) | \
((unsigned)(VA) & ~PG_FRAME))
-#define avtopte(VA) (APTE_BASE + i386_btop(VA))
-#define ptetoav(PT) (i386_ptob(PT - APTE_BASE))
+#define avtopte(VA) (APTE_BASE + atop(VA))
+#define ptetoav(PT) (ptoa(PT - APTE_BASE))
#define avtophys(VA) ((*avtopte(VA) & PG_FRAME) | \
((unsigned)(VA) & ~PG_FRAME))
@@ -362,7 +362,7 @@ extern int pmap_pg_g; /* do we support PG_G? */
#define pmap_copy(DP,SP,D,L,S)
#define pmap_is_modified(pg) pmap_test_attrs(pg, PG_M)
#define pmap_is_referenced(pg) pmap_test_attrs(pg, PG_U)
-#define pmap_phys_address(ppn) i386_ptob(ppn)
+#define pmap_phys_address(ppn) ptoa(ppn)
#define pmap_valid_entry(E) ((E) & PG_V) /* is PDE or PTE valid? */
#define pmap_proc_iflush(p,va,len) /* nothing */
diff --git a/sys/arch/i386/stand/libsa/apmprobe.c b/sys/arch/i386/stand/libsa/apmprobe.c
index 8c4a4aa0b4e..645fd5260ed 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.13 2004/03/11 17:41:23 tom Exp $ */
+/* $OpenBSD: apmprobe.c,v 1.14 2005/11/14 23:50:26 martin Exp $ */
/*
* Copyright (c) 1997-2000 Michael Shalayeff
@@ -54,11 +54,15 @@
#include "libsa.h"
#include <stand/boot/bootarg.h>
+#include <uvm/uvm_extern.h>
+
#include <dev/isa/isareg.h>
#include <machine/apmvar.h>
#include <machine/biosvar.h>
+#define vm_page_size 4096
+
#include "debug.h"
extern int debug;
@@ -194,6 +198,6 @@ apmfixmem(void)
printf("apmremove (%d)", ai.apm_detail);
#endif
if (ai.apm_detail)
- mem_delete(i386_trunc_page(ai.apm_data_base),
- i386_round_page(ai.apm_data_base + ai.apm_data_len));
+ mem_delete(trunc_page(ai.apm_data_base),
+ round_page(ai.apm_data_base + ai.apm_data_len));
}