mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
U areas are going away, so don't allocate them. It's worrisome that
mp_machdep.c was using UAREA_PAGES to allocate something that isn't a U area, and that there seems to be an implicit assumption that the PCB is just past the end of the kernel stack. Reviewed by: arch@
This commit is contained in:
parent
11111b709f
commit
449835405d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=137913
@ -160,7 +160,6 @@ struct bootinfo_kernel bootinfo;
|
|||||||
|
|
||||||
struct mtx icu_lock;
|
struct mtx icu_lock;
|
||||||
|
|
||||||
struct user *proc0uarea;
|
|
||||||
vm_offset_t proc0kstack;
|
vm_offset_t proc0kstack;
|
||||||
|
|
||||||
char machine[] = "alpha";
|
char machine[] = "alpha";
|
||||||
@ -848,11 +847,9 @@ alpha_init(pfn, ptb, bim, bip, biv)
|
|||||||
|
|
||||||
proc_linkup(&proc0, &ksegrp0, &thread0);
|
proc_linkup(&proc0, &ksegrp0, &thread0);
|
||||||
/*
|
/*
|
||||||
* Init mapping for u page(s) for proc 0
|
* Init mapping for kernel stack for proc 0
|
||||||
*/
|
*/
|
||||||
proc0uarea = (struct user *)pmap_steal_memory(UAREA_PAGES * PAGE_SIZE);
|
|
||||||
proc0kstack = pmap_steal_memory(KSTACK_PAGES * PAGE_SIZE);
|
proc0kstack = pmap_steal_memory(KSTACK_PAGES * PAGE_SIZE);
|
||||||
proc0.p_uarea = proc0uarea;
|
|
||||||
thread0.td_kstack = proc0kstack;
|
thread0.td_kstack = proc0kstack;
|
||||||
thread0.td_pcb = (struct pcb *)
|
thread0.td_pcb = (struct pcb *)
|
||||||
(thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
|
(thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
|
||||||
@ -861,7 +858,6 @@ alpha_init(pfn, ptb, bim, bip, biv)
|
|||||||
* Setup the per-CPU data for the bootstrap cpu.
|
* Setup the per-CPU data for the bootstrap cpu.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
/* This is not a 'struct user' */
|
|
||||||
size_t sz = round_page(KSTACK_PAGES * PAGE_SIZE);
|
size_t sz = round_page(KSTACK_PAGES * PAGE_SIZE);
|
||||||
pcpup = (struct pcpu *) pmap_steal_memory(sz);
|
pcpup = (struct pcpu *) pmap_steal_memory(sz);
|
||||||
pcpu_init(pcpup, 0, sz);
|
pcpu_init(pcpup, 0, sz);
|
||||||
|
@ -233,7 +233,7 @@ smp_start_secondary(int pal_id, int cpuid)
|
|||||||
if (bootverbose)
|
if (bootverbose)
|
||||||
printf("smp_start_secondary: starting cpu %d\n", pal_id);
|
printf("smp_start_secondary: starting cpu %d\n", pal_id);
|
||||||
|
|
||||||
sz = round_page((UAREA_PAGES + KSTACK_PAGES) * PAGE_SIZE);
|
sz = KSTACK_PAGES * PAGE_SIZE;
|
||||||
pcpu = malloc(sz, M_TEMP, M_NOWAIT);
|
pcpu = malloc(sz, M_TEMP, M_NOWAIT);
|
||||||
if (!pcpu) {
|
if (!pcpu) {
|
||||||
printf("smp_start_secondary: can't allocate memory\n");
|
printf("smp_start_secondary: can't allocate memory\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user