mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
Initialize bootifo.envp, so that the kernel environment can be used.
Set kernelname. Get it as getenv("kernelname"), bootinfo.booted_kernel does not contain path to the directory.
This commit is contained in:
parent
cd121c9cae
commit
06e4ef1461
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=47025
@ -79,8 +79,6 @@ extern jmp_buf db_jmpbuf;
|
||||
|
||||
extern void gdb_handle_exception __P((db_regs_t *, int, int));
|
||||
|
||||
extern label_t *db_recover;
|
||||
|
||||
#if 0
|
||||
extern char *trap_type[];
|
||||
extern int trap_types;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: machdep.c,v 1.39 1999/04/23 19:53:37 dt Exp $
|
||||
* $Id: machdep.c,v 1.40 1999/04/26 08:57:51 peter Exp $
|
||||
*/
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -629,6 +629,7 @@ alpha_init(pfn, ptb, bim, bip, biv)
|
||||
bootinfo.esym = v1p->esym;
|
||||
bootinfo.kernend = v1p->kernend;
|
||||
bootinfo.modptr = v1p->modptr;
|
||||
bootinfo.envp = v1p->envp;
|
||||
/* hwrpb may not be provided by boot block in v1 */
|
||||
if (v1p->hwrpb != NULL) {
|
||||
bootinfo.hwrpb_phys =
|
||||
@ -788,6 +789,10 @@ alpha_init(pfn, ptb, bim, bip, biv)
|
||||
preload_metadata = (caddr_t)bootinfo.modptr;
|
||||
kern_envp = bootinfo.envp;
|
||||
|
||||
p = getenv("kernelname");
|
||||
if (p)
|
||||
strncpy(kernelname, p, sizeof(kernelname) - 1);
|
||||
|
||||
kernstartpfn = atop(ALPHA_K0SEG_TO_PHYS(kernstart));
|
||||
kernendpfn = atop(ALPHA_K0SEG_TO_PHYS(kernend));
|
||||
#ifdef SIMOS
|
||||
|
@ -43,7 +43,7 @@
|
||||
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
|
||||
* from: i386 Id: pmap.c,v 1.193 1998/04/19 15:22:48 bde Exp
|
||||
* with some ideas from NetBSD's alpha pmap
|
||||
* $Id: pmap.c,v 1.20 1999/04/23 20:29:58 dt Exp $
|
||||
* $Id: pmap.c,v 1.21 1999/04/28 15:52:09 dt Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -2169,6 +2169,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_offset_t pa, vm_prot_t prot,
|
||||
*pte = newpte;
|
||||
if (origpte)
|
||||
pmap_invalidate_page(pmap, va);
|
||||
if (prot & VM_PROT_EXECUTE)
|
||||
alpha_pal_imb();
|
||||
}
|
||||
}
|
||||
|
||||
@ -2187,7 +2189,8 @@ static vm_page_t
|
||||
pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_offset_t pa, vm_page_t mpte)
|
||||
{
|
||||
register pt_entry_t *pte;
|
||||
|
||||
pt_entry_t npte;
|
||||
pv_table_t* ppv;
|
||||
|
||||
/*
|
||||
* In the case that a page table page is not
|
||||
@ -2259,10 +2262,14 @@ pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_offset_t pa, vm_page_t mpte)
|
||||
*/
|
||||
pmap->pm_stats.resident_count++;
|
||||
|
||||
ppv = pa_to_pvh(pa);
|
||||
|
||||
/*
|
||||
* Now validate mapping with RO protection
|
||||
*/
|
||||
*pte = pmap_phys_to_pte(pa) | PG_V | PG_KRE | PG_URE | PG_MANAGED;
|
||||
*pte = pmap_phys_to_pte(pa) | PG_V | PG_KRE | PG_URE | PG_MANAGED |
|
||||
(!(ppv->pv_flags & PV_TABLE_REF) ? (PG_FOR | PG_FOW | PG_FOE) : 0);
|
||||
pmap_invalidate_page(pmap, va);
|
||||
|
||||
return mpte;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user