⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mapin.c

📁 操作系统SunOS 4.1.3版本的源码
💻 C
字号:
#if !defined(lint) && !defined(BOOTBLOCK)static char sccsid[] = "@(#)mapin.c 1.1 92/07/30 SMI";#endif#include <sys/types.h>#include <machine/param.h>#include <machine/pte.h>#include <machine/mmu.h>/* * We must map in the devices ourselves on a Sun-4c. */mapin(vaddr, paddr, pte, pmeg)	caddr_t vaddr, paddr;	u_int *pte;	int *pmeg;{	int lopm, i, pm;	*pmeg = pm = getsegmap(vaddr);	/*	 * If the EEPROM segment isn't mapped in, find a pmeg to use:	 * assume the monitor uses the last pmegs (before INVALID). Find	 * the first unused pmeg below the monitor's and borrow it.	 */	if (pm == PMGRP_INVALID) {		lopm = PMGRP_INVALID;		for (i = MONSTART; i < MONEND; i += PMGRPSIZE)			if (((pm = getsegmap(i)) < lopm) && pm)				lopm = pm;		setsegmap(vaddr, --lopm);	}	*pte = getpgmap((caddr_t)vaddr);	setpgmap((caddr_t)vaddr,	    PG_V|PG_NC|PG_KW|PGT_OBIO|btop(paddr));}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -