summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-08-11 18:46:33 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-08-11 18:46:33 +0000
commit71991877bea22a82789b29c8995baf0589fd2be4 (patch)
treecbe3044ff860228bcda532fc2ccb5f9e523a0853 /sys/arch/amd64
parent6a877e9870ae505ac58c542fbf8e5ef5bb58b8ef (diff)
With the SysV memory allocation changes, allocsys() doesn't do anything
anymore. Get rid of it completely.
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/machdep.c49
1 files changed, 5 insertions, 44 deletions
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c
index 4c244b1e2a1..e3802e15839 100644
--- a/sys/arch/amd64/amd64/machdep.c
+++ b/sys/arch/amd64/amd64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.99 2009/08/09 10:40:17 blambert Exp $ */
+/* $OpenBSD: machdep.c,v 1.100 2009/08/11 18:46:31 miod Exp $ */
/* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */
/*-
@@ -251,8 +251,6 @@ u_int32_t bios_cksumlen;
phys_ram_seg_t mem_clusters[VM_PHYSSEG_MAX];
int mem_cluster_cnt;
-vaddr_t allocsys(vaddr_t);
-void setup_buffers(void);
int cpu_dump(void);
int cpu_dumpsize(void);
u_long cpu_dump_mempagecnt(void);
@@ -298,8 +296,6 @@ int allowaperture = 0;
void
cpu_startup(void)
{
- vaddr_t v;
- vsize_t sz;
vaddr_t minaddr, maxaddr;
msgbuf_vaddr = PMAP_DIRECT_MAP(msgbuf_paddr);
@@ -311,16 +307,11 @@ cpu_startup(void)
ptoa((psize_t)physmem)/1024/1024);
/*
- * Find out how much space we need, allocate it,
- * and then give everything true virtual addresses.
+ * Determine how many buffers to allocate.
+ * We allocate bufcachepercent% of memory for buffer space.
*/
- sz = allocsys(0);
- if ((v = uvm_km_zalloc(kernel_map, round_page(sz))) == 0)
- panic("startup: no room for tables");
- if (allocsys(v) - v != sz)
- panic("startup: table size inconsistency");
-
- setup_buffers();
+ if (bufpages == 0)
+ bufpages = physmem * bufcachepercent / 100;
/*
* Allocate a submap for exec arguments. This map effectively
@@ -361,36 +352,6 @@ cpu_startup(void)
}
/*
- * Allocate space for system data structures. We are given
- * a starting virtual address and we return a final virtual
- * address; along the way we set each data structure pointer.
- *
- * We call allocsys() with 0 to find out how much space we want,
- * allocate that much and fill it with zeroes, and then call
- * allocsys() again with the correct base virtual address.
- */
-vaddr_t
-allocsys(vaddr_t v)
-{
-
-#define valloc(name, type, num) \
- v = (vaddr_t)(((name) = (type *)v) + (num))
-
- return v;
-}
-
-void
-setup_buffers()
-{
- /*
- * Determine how many buffers to allocate.
- * We allocate bufcachepercent% of memory for buffer space.
- */
- if (bufpages == 0)
- bufpages = physmem * bufcachepercent / 100;
-}
-
-/*
* Set up proc0's TSS and LDT.
*/
void