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

📄 memdef_depend.h

📁 T-kernel 的extension源代码
💻 H
字号:
/* *---------------------------------------------------------------------- *    T-Kernel / Standard Extension * *    Copyright (C) 2006 by Ken Sakamura. All rights reserved. *    T-Kernel / Standard Extension is distributed  *      under the T-License for T-Kernel / Standard Extension. *---------------------------------------------------------------------- * *    Version:   1.00.00 *    Released by T-Engine Forum(http://www.t-engine.org) at 2006/8/11. * *---------------------------------------------------------------------- *//* *	memdef.h * *	Memory map definitions */#ifndef __SYS_MEMDEF_DEPEND_H__#define __SYS_MEMDEF_DEPEND_H__#include <tk/sysdef.h>#define	PAGESIZE	4096		/* Page size (number of bytes) *//* * Memory maps of T-Engine/S1C38000 * * # Process-specific space * *   0x40000000 +-----------------------+ *              | Program	        | *              | (text,data,bss)       | *              +-----------------------+   -- *              | Local memory	        |   ^  Allocate logical space *              | User stack            |   |  by memory management. *              |                       |   v *   0x50000000 +-----------------------+   -- *              | (Not used)            |*1 *   0x7fffffff +-----------------------+ * * # System space * *   0x80000000 +-----------------------+   -- *              | Shared memory         |   ^ *              | System memory	        |   |  Allocate logical space *              | Disk map	        |   |  by memory management. *              | Outer shell, driver   |   v *   0xc0000000 +-----------------------+   -- *              | For program map   	| *   0xd0000000 +-----------------------+ *              | For I/O space map     | *   0xe0000000 +-----------------------+ * * # Physical space (directly can be seen from: logical address = physical address) * *   0x00000000 +-----------------------+   -- *              | Monitor	        |   ^ *              | ROM disk	        |   |	ROM area *   0x00800000 +-----------------------+   | *              | (for extension)       |*1 v *   0x01000000 +-----------------------+   -- *              | (Open to user)        |*2 *              | Peripheral device     |*2 *   0x08000000 +-----------------------+ *              | (Not used)            |*1 *   0x10000000 +-----------------------+   -- *              | Page directory        |   ^ *              | Monitor, etc          |   | *              | SYSCONF               |   |	RAM area *              | DEVCONF               |   | *              +-----------------------+   | *              | Page frame	        |   | *              | Page table	        |   | *   0x12000000 +-----------------------+   +  <- Can be specified by SYSCONF:RealMemEnd *              | (for RAM extension)   |*1 v *   0x18000000 +-----------------------+   -- *              | (Not used)            |*1 *   0x40000000 +-----------------------+ * *   0xe0000000 +-----------------------+ *              | (Not used)            |*1 *   0xe8000000 +-----------------------+ *              | Built-in device       |*2 *   0xffffffff +-----------------------+ * * * In physical space areas, set the page table at system startup so that logical and *   physical addresses become identical (logical address = physical address). However, *   disable any user-level access. * * In areas indicated by *1, do not perform mapping and disable access. * * In areas indicated by *2, turn off cache and write buffer. *//* * Conversion between physical and logical addresses in real memory area */#define	toLogicalAddress(paddr)		(VP)(paddr)#define	toPhysicalAddress(laddr)	(VP)(laddr)/* * Range of address in real memory area */#define	REALMEMORY_TOP			0x10000000U#define	REALMEMORY_END			0x18000000U/* * Range of address in local space (0x40000000  -  0x50000000) */#define	LOCALSPACE_TOP			( TOP_PDIR_ENTRIES * 0x00100000U )#define	LOCALSPACE_END			( (TOP_PDIR_ENTRIES + NUM_PDIR_ENTRIES) * 0x00100000U )/* * Range of address in shared/system memory space */#define	SYSSPACE_TOP			0x80000000U#define	SYSSPACE_END			0xc0000000U/* * Range of address in system program map space */#define	SYSPRGSPACE_TOP			0xc0000000U#define	SYSPRGSPACE_END			0xd0000000U/* * Range of address in I/O space */#define	IOSPACE_TOP			0xd0000000U#define	IOSPACE_END			0xe0000000U/* * Within ROM area: True */#define	isROM(addr)			( (UW)(addr) < 0x01000000U )/* * Within logical space: True */#define	isLogicalSpace(addr)		(  ((UW)(addr) >= 0x40000000U) \					&& ((UW)(addr) <  0xe0000000U) )/* * Range of section corresponding to logical space */#define	LOGICALSPACE_SECTION_TOP	( 0x40000000U / (1024 * 1024) )#define	LOGICALSPACE_SECTION_END	( 0xe0000000U / (1024 * 1024) )#endif

⌨️ 快捷键说明

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