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

📄 remap.h

📁 一个用在mips体系结构中的操作系统
💻 H
字号:
/* * Copyright (C) 1996-1998 by the Board of Trustees *    of Leland Stanford Junior University. *  * This file is part of the SimOS distribution.  * See LICENSE file for terms of the license.  * *//***************************************************************** * Hive-specific file used for remapping the address space of  * nodes. *  * $Author: bosch $ * $Date: 1998/02/10 00:32:56 $ *****************************************************************/#ifndef REMAP_H#define REMAP_H#ifndef _LANGUAGE_ASSEMBLY#include "syslimits.h"/***************************************************************** * Remap storage +  some useful macros for interpreting the remap. * **************************************************************/typedef struct RemapVector {   PA            RemapMask[SIM_MAXCPUS];   /* remap mask for each node */   unsigned char RemapEnable[SIM_MAXCPUS]; /* remap enabled? */   PA            NodeAddr[SIM_MAXCPUS];    /* beg. PA of node memory range */   int           NodeAddrInitialized;      /* NodeAddr inited? */   /* whichever memory simulator boots this system fills out the    * nodeaddr array and sets Initialized.  Subsequent memory system    * switches or checkpoint restarts are not allowed to change    * the nodeaddr array because its effects are OS-visible.    */} RemapVector;extern RemapVector *remapVec;    /* NB FIRST_NONREMAPPED_PADDR assumes the RemapMask is of the form (1*0*) */#define FIRST_NONREMAPPED_PADDR(cpuid) \  (remapVec->RemapEnable[cpuid] ? (1+~remapVec->RemapMask[cpuid]) : 0)#define IS_REMAPPED_PADDR(paddr, cpuid) \  (remapVec->RemapEnable[cpuid] ? !((paddr) &remapVec->RemapMask[cpuid]) : 0)#define REMAP_PADDR(paddr, cpuid) \   ((paddr)+(IS_REMAPPED_PADDR(paddr, cpuid) ? remapVec->NodeAddr[cpuid] : 0))#endif /* !LANGUAGE_ASSEMBLY */#endif /* REMAP_H */

⌨️ 快捷键说明

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