📄 sys_conf.h
字号:
/* bytes at the end of the stack (of each task) which will be filled *//* with a known pattern, and which will be checked for being *//* overwritten at each system call. In case overwrite is detected, *//* then pSOS execution will abort with fatal error FAT_STKOVF (0xF30) *//* SC_STACK_OVF_CHECK will be truncated to an integral number of words.*//* It has a default of 8 bytes (but set to a slightly higher value *//* below). *//*---------------------------------------------------------------------*/#define SC_STACK_OVF_CHECK 24/*---------------------------------------------------------------------*//* TCS_MALLOC_USE: When YES, do *not* map malloc/free on *//* rn_getseg/rn_free from region 0, as is standard*//* in pSOS. Instead, use the TCS memory manager *//* instead. *//* The pSOS region manager might be more *//* predictable in its real-time behavior, but this*//* at the cost of larger unit sizes (see *//* KC_RN0USIZE). Also, the pSOS region manager *//* cannot hold more than 32K units, which is 8M *//* with the current KC_RN0USIZE, but *//* proportionally less when the unit size is *//* decreased. *//* If this option is enabled, then define *//* TCS_REGION0_SIZE such that region 0 does not *//* occupy all free memory. *//*---------------------------------------------------------------------*/#define TCS_MALLOC_USE YES/*---------------------------------------------------------------------*//* TCS_REGION0_SIZE: When *not* defined, all free memory is given *//* to pSOS's region 0. Otherwise, region 0 is *//* created with the specified size. *//* Remember that only 32k allocations can be *//* made from region zero. For this reason, *//* the TCS malloc is often preferred. *//* When a non-zero size is specified, that *//* much memory is reserved for use by pSOS. *//* In DVP applications, pSOS must have some *//* memory available in region zero. For example, *//* the memory used for the variable queues that *//* the OSAL needs must come from region zero. *//* 3Mb assigned to region zero supports a heavy *//* usage by pSOS. Lower it as part of tuning *//* application. *//* *//*---------------------------------------------------------------------*/#define TCS_REGION0_SIZE 32768/*---------------------------------------------------------------------*//* KC_RN0USIZE : Allocations from the pSOS region zero have *//* this granularity. Using a small size is good *//* when you are using region zero for pSOS *//* internals. Remember that 32k * KC_RN0USIZE is *//* the maximum size for TCS_REGION0_SIZE *//*---------------------------------------------------------------------*/#define KC_RN0USIZE 0x40 /* region 0 unit size *//***********************************************************************//* SC_RAM_SIZE *//* *//* Normally, pSOSystem uses ALL of the memory remaining on a board for *//* dynamic allocation ("region 0"). You may override this by setting *//* SC_RAM_SIZE to a non-zero value. If you do, pSOSystem will not *//* touch any memory after address (BSP_RAM_BASE + SC_RAM_SIZE - 1). *//* *//* NOTE: This is useful when making a BOOT ROM and you want to ensure *//* that the ROM's RAM area does not overflow the space alloted for it. *//* (applies only to rn_getseg calls, not TCS malloc) *//***********************************************************************/#define SC_RAM_SIZE (4*1024*1024)/***********************************************************************//* *//* O P E R A T I N G S Y S T E M C O M P O N E N T S *//* *//* Setting the definition line to YES will cause that component to *//* be built into the system. NO means the component will NOT be *//* put into the system. It is an error to specify both SC_PSOS *//* and SC_PSOSM as present! *//* *//* The choice between pSOS+ and pSOS+m and the choice for using PNA, *//* ( SC_PSOS, SC_PSOSM and SC_PNA ) are now defined in TCS standard *//* psos makefile. (in other words, the following are not used) *//* *//* See for instance $(TCS)/examples/psos/psos_demo1 *//***********************************************************************/#define SC_PSOS YES /* pSOS+ real-time kernel */#define SC_PSOSM NO /* pSOS+ real-time multiprocessing kernel */#define SC_PROBE NO /* pROBE+ (processor svcs) */#define SC_PROBE_DISASM NO /* pROBE+ (disassembler) */#define SC_PROBE_CIE NO /* pROBE+ (console executive) */#define SC_PROBE_QUERY NO /* pROBE+ (query services) */#define SC_PROBE_DEBUG NO /* pROBE+ (debug interface executive) */#define SC_PHILE NO /* pHILE+ file system manager */#define SC_PREPC NO /* pREPC+ C run-time library */#define SC_PNA NO /* pNA+ TCP/IP networking manager */#define SC_PRPC NO /* pRPC+ RPC component */#define SC_PSE NO /* pSE+ streams component */#define SC_PTLI NO /* pTLI+ TLI library component */#define SC_PSKT NO /* pSKT+ SKT library component */#define SC_PMONT NO /* pMONT+ *//***********************************************************************//* *//* I / O D E V I C E S *//* *//* Each device may be included in the system by specifying a major *//* number for it, which determines its slot in the pSOS+ I/O switch *//* table. To leave a device driver out of the system, use NO for *//* the major number. *//* *//* Note the following: *//* * Major device 0 is reserved and cannot be used for any of these *//* devices. Setting a device number to 0 here is the same as NO. *//* * No device number may be higher than SC_DEVMAX (SC_DEVMAX may *//* be increased, if desired) *//* * The lines defining the symbols DEV_SERIAL, DEV_TIMER, etc, *//* should not be changed. These are for use by application *//* programs as the "device number" parameter on de_* calls. *//* *//***********************************************************************/#define SC_DEV_SERIAL NO /* Serial driver */#define SC_DEV_TIMER 1 /* Periodic tick timer */#define SC_DEV_RAMDISK NO /* 3 RAM disk */#define SC_DEV_SCSI NO /* 4 SCSI bus */#define SC_DEV_SCSI_TAPE NO /* 5 SCSI bus, tape device */#define SC_DEV_TFTP NO /* 6 TFTP pseudo driver */#define SC_DEV_DLPI NO /* DLPI pseudo driver */#define SC_DEV_OTCP NO /* 8 TCP/IP for OpEN */#define SC_IP SC_DEV_OTCP /* 8 IP */#define SC_ARP NO /* 9 ARP */#define SC_TCP NO /* 10 TCP */#define SC_UDP NO /* 11 UDP */#define SC_RAW NO /* 12 RAW */#define SC_LOOP NO /* 13 LOOP = (SC_DEV_OTCP + 5) */#define SC_DEV_SOSI NO /* 14 OSI for OpEN */#define SC_DEVMAX 20 /* Maximum device number */#define DEV_SERIAL (SC_DEV_SERIAL << 16)#define DEV_TIMER (SC_DEV_TIMER << 16)#define DEV_RAMDISK (SC_DEV_RAMDISK << 16)#define DEV_SCSI (SC_DEV_SCSI << 16)#define DEV_SCSI_TAPE (SC_DEV_SCSI_TAPE << 16)#define DEV_TFTP (SC_DEV_TFTP << 16)/*---------------------------------------------------------------------*//* pSOS+m configuration parameters *//*---------------------------------------------------------------------*/#define MC_NGLBOBJ 8 /* size of gbl obj table */#define MC_NAGENT 10 /* number of RPC agents in this node */#define MC_FLAGS 0 /* operating mode flags *//*---------------------------------------------------------------------*//* The following are examples for modifying the following definition *//* *//* Using a pSOSystem routine as a roster change handler *//* #define MC_ROSTER ((void (*)()) SysInitFail) *//* *//* Using a user written routine as a roster change handler *//* extern void MyHandler (void); *//* #define MC_ROSTER ((void (*)()) MyHandler) *//* *//*---------------------------------------------------------------------*/#define MC_ROSTER 0 /* addr of user roster change callout *//*---------------------------------------------------------------------*//* The max length of buffers are defined here. This is a field required*//* by the the configuration table for pSOS+m. The Kernel Interface *//* driver ki_smem.c also defines the size of buffers for ki MAXPKTSZ. *//* These two definitions must specify the same size of buffers for *//* pSOS+m to work correctly. *//*---------------------------------------------------------------------*/#define MC_KIMAXBUF 100 /* maximum KI packet buffer length */#define MC_ASYNCERR 0 /* asynchronous calls error callout *//*---------------------------------------------------------------------*//* pNA+ configuration parameters *//* *//* NOTE: If you get pNA+ errno 5F01 FAT_INSUFFMEM you may need to *//* decrease the number of buffers allocated here for pNA+. *//* In general this error means pNA+ could not allocate enough *//* memory from Region 0 for the number of buffers requested. *//* NOTE: ethernet sockets require 4k buffers, and 0 length ones *//* are required for proper pna functioning. *//*---------------------------------------------------------------------*/#define NC_NNI 5 /* size of pNA NI Table */#define NC_NROUTE 10 /* size of pNA Routing Table */#define NC_NARP 20 /* size of pNA ARP table */#define NC_DEFUID 0 /* Default User ID of a task */#define NC_DEFGID 0 /* Default Group ID of a task */#define NC_HOSTNAME "scg" /* Hostname of the node */#define NC_NHENTRY 8 /* Number of Host table entries */#define NC_NSOCKETS 20 /* Number of sockets in the system */#define NC_NDESCS 20 /* # of socket descriptors/task */#define NC_MBLKS 300 /* # of message blocks in the system */#define NC_BUFS_0 64 /* number of 0 length buffers */#define NC_BUFS_128 32 /* number of 128 byte buffers */#define NC_BUFS_1024 32 /* number of 1k byte buffers */#define NC_BUFS_2048 32 /* number of 2k byte buffers */#define NC_BUFS_4096 32 /* number of 4k byte buffers */#define SE_MAX_PNA_NC_BUFS 5 /* max number of NC_BUFS types */#define NC_DAEMSSTK KC_ROOTSSTK /* pNA daemon supervisor stack size */#define NC_DAEMUSTK KC_ROOTUSTK /* pNA daemon user stack size */#define NC_DAEMMODE KC_ROOTMODE /* pNA daemon initial mode *//***********************************************************************//* */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -