?? hal.h
字號:
#ifndef CYGONCE_PKGCONF_HAL_H#define CYGONCE_PKGCONF_HAL_H// ====================================================================//// pkgconf/hal.h//// HAL configuration file//// ====================================================================//####COPYRIGHTBEGIN####//// -------------------------------------------// The contents of this file are subject to the Cygnus eCos Public License// Version 1.0 (the "License"); you may not use this file except in// compliance with the License. You may obtain a copy of the License at// http://sourceware.cygnus.com/ecos// // Software distributed under the License is distributed on an "AS IS"// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the// License for the specific language governing rights and limitations under// the License.// // The Original Code is eCos - Embedded Cygnus Operating System, released// September 30, 1998.// // The Initial Developer of the Original Code is Cygnus. Portions created// by Cygnus are Copyright (C) 1998,1999 Cygnus Solutions. All Rights Reserved.// -------------------------------------------////####COPYRIGHTEND####// ====================================================================//#####DESCRIPTIONBEGIN####//// Author(s): nickg, jskov// Contributors: nickg, jskov,// jlarmour// Date: 1999-01-21// Purpose: To allow the user to edit HAL configuration options.// Description:////####DESCRIPTIONEND####//// ====================================================================/* --------------------------------------------------------------------- * Some of the HAL configuration options depend on global options, * so it is necessary to include the global options first. */#include <pkgconf/system.h>/* --------------------------------------------------------------------- Define an overall package for the HAL. All other HAL packages live below this. {{CFG_DATA cdl_package CYGPKG_HAL { display "eCos HAL" type dummy description " The eCos HAL package provide a porting layer for higher-level parts of the system such as the kernel and the C library. Each installation should have HAL packages for one or more architectures, and for each architecture there may be one or more supported platforms. It is necessary to select one target architecture and one platform for that architecture. There are also a number of configuration options that are common to all HAL packages." doc ref/ecos-ref/the-ecos-hardware-abstraction-layer-hal.html } }}CFG_DATA *//* --------------------------------------------------------------------- * The platform-independent HAL configuration options go here, * inside a component CYGPKG_HAL_COMMON. In practice some of the * options are not completely platform-independent, but they are * likely to be available on the vast majority of platforms and * it is more convenient to provide them by default and let the * appropriate platforms disable them (probably via a suitable * interface). * * The common component is subdivided into components for * interrupt handling, thread context, and rom monitor/gdb support. {{CFG_DATA cdl_component CYGPKG_HAL_COMMON { display "Platform-independent HAL options" parent CYGPKG_HAL type dummy description " A number of configuration options are common to most or all HAL packages, for example options controlling how much state should be saved during a context switch. The implementations of these options will vary from architecture to architecture." } cdl_option CYGFUN_HAL_COMMON_KERNEL_SUPPORT { display "Provide eCos kernel support" parent CYGPKG_HAL_COMMON requires CYGPKG_KERNEL description " The HAL can be configured to either support the full eCos kernel, or to support only very simple applications which do not require a full kernel. If kernel support is not required then some of the startup, exception, and interrupt handling code can be eliminated." } }}CFG_DATA */#define CYGFUN_HAL_COMMON_KERNEL_SUPPORT/* {{CFG_DATA cdl_component CYGPKG_HAL_COMMON_INTERRUPTS { display "HAL interrupt handling" parent CYGPKG_HAL_COMMON type dummy description " A number of configuration options related to interrupt handling are common to most or all HAL packages, even though the implementations will vary from architecture to architecture." } cdl_option CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK { display "Use separate stack for interrupts" parent CYGPKG_HAL_COMMON_INTERRUPTS description " When an interrupt occurs this interrupt can be handled either on the current stack or on a separate stack maintained by the HAL. Using a separate stack requires a small number of extra instructions in the interrupt handling code, but it has the advantage that it is no longer necessary to allow extra space in every thread stack for the interrupt handlers. The amount of extra space required depends on the interrupt handlers that are being used." } # NOTE: various parts of the system such as device drivers should # impose lower bounds on this. The actual lower bound depends on a # platform-specific value for startup overheads, and the minimum # sizes specified by the various device drivers. If interrupts are # not handled on a separate stack then only the startup overheads # are significant. If nested interrupts are disabled then the # lower bound is the maximum of the individual sizes, otherwise # it is the sum of these sizes. It is not currently possible to # express a relationship like this. cdl_option CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE { display "Interrupt stack size" parent CYGPKG_HAL_COMMON_INTERRUPTS type count legal_values 1024 to 1048576 description " This configuration option specifies the stack size in bytes for the interrupt stack. Typically this should be a multiple of 16, but the exact requirements will vary from architecture to architecture. The interrupt stack serves two separate purposes. It is used as the stack during system initialization. In addition, if the interrupt system is configured to use a separate stack then all interrupts will be processed on this stack. The exact memory requirements will vary from application to application, and will depend heavily on whether or not other interrupt-related options, for example nested interrupts, are enabled." } cdl_option CYGSEM_HAL_COMMON_INTERRUPTS_ALLOW_NESTING { display "Allow nested interrupts" parent CYGPKG_HAL_COMMON_INTERRUPTS description " When an interrupt occurs the HAL interrupt handling code can either leave interrupts disabled for the duration of the interrupt handling code, or by doing some extra work it can reenable interrupts before invoking the interrupt handler and thus allow nested interrupts to happen. If all the interrupt handlers being used are small and do not involve any loops then it is usually better to disallow nested interrupts. However if any of the interrupt handlers are more complicated than nested interrupts will usually be required." } cdl_option CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT { display "Save minimum context on interrupt" parent CYGPKG_HAL_COMMON_INTERRUPTS description " The HAL interrupt handling code can exploit the calling conventions defined for a given architecture to reduce the amount of state that has to be saved. Generally this improves performance and reduces code size. However it can make source-level debugging more difficult. " } cdl_option CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN { display "Chain all interrupts together" parent CYGPKG_HAL_COMMON_INTERRUPTS description " Interrupts can be attached to vectors either singly, or be chained together. The latter is necessary if there is no way of discovering which device has interrupted without inspecting the device itself. It can also reduce the amount of RAM needed for interrupt decoding tables and code." } }}CFG_DATA*/#define CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK#define CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE 4096#undef CYGSEM_HAL_COMMON_INTERRUPTS_ALLOW_NESTING#define CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT#undef CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN/* {{CFG_DATA cdl_component CYGPKG_HAL_COMMON_CONTEXT { display "HAL context switch support" parent CYGPKG_HAL_COMMON type dummy description " A number of configuration options related to thread contexts are common to most or all HAL packages, even though the
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -