Sync with sys/i386/i386/machdep.c revision 1.310.
This commit is contained in:
parent
f36effada3
commit
6a75025663
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=39710
@ -35,14 +35,13 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.94 1998/09/01 07:17:36 kato Exp $
|
||||
* $Id: machdep.c,v 1.95 1998/09/15 03:50:08 kato Exp $
|
||||
*/
|
||||
|
||||
#include "apm.h"
|
||||
#include "ether.h"
|
||||
#include "npx.h"
|
||||
#include "opt_atalk.h"
|
||||
#include "opt_bounce.h"
|
||||
#include "opt_cpu.h"
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_inet.h"
|
||||
@ -160,14 +159,6 @@ int need_pre_dma_flush; /* If 1, use wbinvd befor DMA transfer. */
|
||||
int need_post_dma_flush; /* If 1, use invd after DMA transfer. */
|
||||
#endif
|
||||
|
||||
#ifdef BOUNCE_BUFFERS
|
||||
#ifdef BOUNCEPAGES
|
||||
int bouncepages = BOUNCEPAGES;
|
||||
#else
|
||||
int bouncepages = 0;
|
||||
#endif
|
||||
#endif /* BOUNCE_BUFFERS */
|
||||
|
||||
int _udatasel, _ucodesel;
|
||||
u_int atdevbase;
|
||||
|
||||
@ -351,19 +342,6 @@ cpu_startup(dummy)
|
||||
#define valloclim(name, type, num, lim) \
|
||||
(name) = (type *)v; v = (caddr_t)((lim) = ((name)+(num)))
|
||||
|
||||
#ifdef BOUNCE_BUFFERS
|
||||
/*
|
||||
* If there is more than 16MB of memory, allocate some bounce buffers
|
||||
*/
|
||||
if (Maxmem > 4096) {
|
||||
if (bouncepages == 0) {
|
||||
bouncepages = 64;
|
||||
}
|
||||
v = (caddr_t)((vm_offset_t)round_page(v));
|
||||
valloc(bouncememory, char, bouncepages * PAGE_SIZE);
|
||||
}
|
||||
#endif
|
||||
|
||||
valloc(callout, struct callout, ncallout);
|
||||
valloc(callwheel, struct callout_tailq, callwheelsize);
|
||||
#ifdef SYSVSHM
|
||||
@ -410,15 +388,8 @@ cpu_startup(dummy)
|
||||
if ((vm_size_t)(v - firstaddr) != size)
|
||||
panic("startup: table size inconsistency");
|
||||
|
||||
#ifdef BOUNCE_BUFFERS
|
||||
clean_map = kmem_suballoc(kernel_map, &clean_sva, &clean_eva,
|
||||
(nbuf*BKVASIZE) + (nswbuf*MAXPHYS) +
|
||||
maxbkva + pager_map_size);
|
||||
io_map = kmem_suballoc(clean_map, &minaddr, &maxaddr, maxbkva);
|
||||
#else
|
||||
clean_map = kmem_suballoc(kernel_map, &clean_sva, &clean_eva,
|
||||
(nbuf*BKVASIZE) + (nswbuf*MAXPHYS) + pager_map_size);
|
||||
#endif
|
||||
buffer_map = kmem_suballoc(clean_map, &buffer_sva, &buffer_eva,
|
||||
(nbuf*BKVASIZE));
|
||||
pager_map = kmem_suballoc(clean_map, &pager_sva, &pager_eva,
|
||||
@ -466,13 +437,6 @@ cpu_startup(dummy)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BOUNCE_BUFFERS
|
||||
/*
|
||||
* init bounce buffers
|
||||
*/
|
||||
vm_bounce_init();
|
||||
#endif
|
||||
|
||||
printf("avail memory = %d (%dK bytes)\n", ptoa(cnt.v_free_count),
|
||||
ptoa(cnt.v_free_count) / 1024);
|
||||
|
||||
|
@ -35,14 +35,13 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.94 1998/09/01 07:17:36 kato Exp $
|
||||
* $Id: machdep.c,v 1.95 1998/09/15 03:50:08 kato Exp $
|
||||
*/
|
||||
|
||||
#include "apm.h"
|
||||
#include "ether.h"
|
||||
#include "npx.h"
|
||||
#include "opt_atalk.h"
|
||||
#include "opt_bounce.h"
|
||||
#include "opt_cpu.h"
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_inet.h"
|
||||
@ -160,14 +159,6 @@ int need_pre_dma_flush; /* If 1, use wbinvd befor DMA transfer. */
|
||||
int need_post_dma_flush; /* If 1, use invd after DMA transfer. */
|
||||
#endif
|
||||
|
||||
#ifdef BOUNCE_BUFFERS
|
||||
#ifdef BOUNCEPAGES
|
||||
int bouncepages = BOUNCEPAGES;
|
||||
#else
|
||||
int bouncepages = 0;
|
||||
#endif
|
||||
#endif /* BOUNCE_BUFFERS */
|
||||
|
||||
int _udatasel, _ucodesel;
|
||||
u_int atdevbase;
|
||||
|
||||
@ -351,19 +342,6 @@ cpu_startup(dummy)
|
||||
#define valloclim(name, type, num, lim) \
|
||||
(name) = (type *)v; v = (caddr_t)((lim) = ((name)+(num)))
|
||||
|
||||
#ifdef BOUNCE_BUFFERS
|
||||
/*
|
||||
* If there is more than 16MB of memory, allocate some bounce buffers
|
||||
*/
|
||||
if (Maxmem > 4096) {
|
||||
if (bouncepages == 0) {
|
||||
bouncepages = 64;
|
||||
}
|
||||
v = (caddr_t)((vm_offset_t)round_page(v));
|
||||
valloc(bouncememory, char, bouncepages * PAGE_SIZE);
|
||||
}
|
||||
#endif
|
||||
|
||||
valloc(callout, struct callout, ncallout);
|
||||
valloc(callwheel, struct callout_tailq, callwheelsize);
|
||||
#ifdef SYSVSHM
|
||||
@ -410,15 +388,8 @@ cpu_startup(dummy)
|
||||
if ((vm_size_t)(v - firstaddr) != size)
|
||||
panic("startup: table size inconsistency");
|
||||
|
||||
#ifdef BOUNCE_BUFFERS
|
||||
clean_map = kmem_suballoc(kernel_map, &clean_sva, &clean_eva,
|
||||
(nbuf*BKVASIZE) + (nswbuf*MAXPHYS) +
|
||||
maxbkva + pager_map_size);
|
||||
io_map = kmem_suballoc(clean_map, &minaddr, &maxaddr, maxbkva);
|
||||
#else
|
||||
clean_map = kmem_suballoc(kernel_map, &clean_sva, &clean_eva,
|
||||
(nbuf*BKVASIZE) + (nswbuf*MAXPHYS) + pager_map_size);
|
||||
#endif
|
||||
buffer_map = kmem_suballoc(clean_map, &buffer_sva, &buffer_eva,
|
||||
(nbuf*BKVASIZE));
|
||||
pager_map = kmem_suballoc(clean_map, &pager_sva, &pager_eva,
|
||||
@ -466,13 +437,6 @@ cpu_startup(dummy)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BOUNCE_BUFFERS
|
||||
/*
|
||||
* init bounce buffers
|
||||
*/
|
||||
vm_bounce_init();
|
||||
#endif
|
||||
|
||||
printf("avail memory = %d (%dK bytes)\n", ptoa(cnt.v_free_count),
|
||||
ptoa(cnt.v_free_count) / 1024);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user