Unbreak memory sizing for SMP.
This commit is contained in:
parent
4ea5ad99d5
commit
26f13ad079
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.337 1999/06/01 18:19:40 jlemon Exp $
|
||||
* $Id: machdep.c,v 1.338 1999/06/01 18:25:26 jlemon Exp $
|
||||
*/
|
||||
|
||||
#include "apm.h"
|
||||
@ -1352,7 +1352,12 @@ getmemsize(int first)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* XXX former point of mp_probe() and pmap_bootstrap() */
|
||||
#ifdef SMP
|
||||
/* look for the MP hardware - needed for apic addresses */
|
||||
mp_probe();
|
||||
#endif
|
||||
/* call pmap initialization to make new kernel address space */
|
||||
pmap_bootstrap(first, 0);
|
||||
|
||||
/*
|
||||
* Size up each available chunk of physical memory.
|
||||
@ -1361,8 +1366,11 @@ getmemsize(int first)
|
||||
pa_indx = 0;
|
||||
phys_avail[pa_indx++] = physmap[0];
|
||||
phys_avail[pa_indx] = physmap[0];
|
||||
#if 0
|
||||
pte = (pt_entry_t)vtopte(KERNBASE);
|
||||
*pte = (1 << PAGE_SHIFT) | PG_RW | PG_V;
|
||||
#else
|
||||
pte = (pt_entry_t)CMAP1;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* physmap is in bytes, so when converting to page boundaries,
|
||||
@ -1376,7 +1384,11 @@ getmemsize(int first)
|
||||
end = trunc_page(physmap[i + 1]);
|
||||
for (pa = round_page(physmap[i]); pa < end; pa += PAGE_SIZE) {
|
||||
int tmp, page_bad;
|
||||
#if 0
|
||||
int *ptr = 0;
|
||||
#else
|
||||
int *ptr = (int *)CADDR1;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* block out kernel memory as not available.
|
||||
@ -1650,14 +1662,6 @@ init386(first)
|
||||
vm86_initialize();
|
||||
getmemsize(first);
|
||||
|
||||
#ifdef SMP
|
||||
/* look for the MP hardware - needed for apic addresses */
|
||||
mp_probe();
|
||||
#endif
|
||||
|
||||
/* call pmap initialization to make new kernel address space */
|
||||
pmap_bootstrap(first, 0);
|
||||
|
||||
/* now running on new page tables, configured,and u/iom is accessible */
|
||||
|
||||
/* Map the message buffer. */
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.337 1999/06/01 18:19:40 jlemon Exp $
|
||||
* $Id: machdep.c,v 1.338 1999/06/01 18:25:26 jlemon Exp $
|
||||
*/
|
||||
|
||||
#include "apm.h"
|
||||
@ -1352,7 +1352,12 @@ getmemsize(int first)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* XXX former point of mp_probe() and pmap_bootstrap() */
|
||||
#ifdef SMP
|
||||
/* look for the MP hardware - needed for apic addresses */
|
||||
mp_probe();
|
||||
#endif
|
||||
/* call pmap initialization to make new kernel address space */
|
||||
pmap_bootstrap(first, 0);
|
||||
|
||||
/*
|
||||
* Size up each available chunk of physical memory.
|
||||
@ -1361,8 +1366,11 @@ getmemsize(int first)
|
||||
pa_indx = 0;
|
||||
phys_avail[pa_indx++] = physmap[0];
|
||||
phys_avail[pa_indx] = physmap[0];
|
||||
#if 0
|
||||
pte = (pt_entry_t)vtopte(KERNBASE);
|
||||
*pte = (1 << PAGE_SHIFT) | PG_RW | PG_V;
|
||||
#else
|
||||
pte = (pt_entry_t)CMAP1;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* physmap is in bytes, so when converting to page boundaries,
|
||||
@ -1376,7 +1384,11 @@ getmemsize(int first)
|
||||
end = trunc_page(physmap[i + 1]);
|
||||
for (pa = round_page(physmap[i]); pa < end; pa += PAGE_SIZE) {
|
||||
int tmp, page_bad;
|
||||
#if 0
|
||||
int *ptr = 0;
|
||||
#else
|
||||
int *ptr = (int *)CADDR1;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* block out kernel memory as not available.
|
||||
@ -1650,14 +1662,6 @@ init386(first)
|
||||
vm86_initialize();
|
||||
getmemsize(first);
|
||||
|
||||
#ifdef SMP
|
||||
/* look for the MP hardware - needed for apic addresses */
|
||||
mp_probe();
|
||||
#endif
|
||||
|
||||
/* call pmap initialization to make new kernel address space */
|
||||
pmap_bootstrap(first, 0);
|
||||
|
||||
/* now running on new page tables, configured,and u/iom is accessible */
|
||||
|
||||
/* Map the message buffer. */
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: vm86.c,v 1.25 1999/05/12 21:38:45 luoqi Exp $
|
||||
* $Id: vm86.c,v 1.26 1999/06/01 18:19:48 jlemon Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -453,12 +453,14 @@ vm86_initialize(void)
|
||||
|
||||
vm86pcb = pcb;
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* use whatever is leftover of the vm86 page layout as a
|
||||
* message buffer so we can capture early output.
|
||||
*/
|
||||
msgbufinit((vm_offset_t)vm86paddr + sizeof(struct vm86_layout),
|
||||
ctob(3) - sizeof(struct vm86_layout));
|
||||
#endif
|
||||
}
|
||||
|
||||
vm_offset_t
|
||||
|
Loading…
Reference in New Issue
Block a user