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

📄 vxlib.c

📁 VXWORKS源代码
💻 C
📖 第 1 页 / 共 2 页
字号:
* set (all PPC).* .iP "VX_POWER_MODE_FULL (0x2)"* All CPU units are active while the kernel is idle (PPC603, PPCEC603 and* PPC860 only).* .iP "VX_POWER_MODE_DOZE (0x4)"* Only the decrementer, data cache, and bus snooping are active while the* kernel is idle (PPC603, PPCEC603 and PPC860).* .iP "VX_POWER_MODE_NAP (0x8)"* Only the decrementer is active while the kernel is idle (PPC603, PPCEC603 and* PPC604 ).* .iP "VX_POWER_MODE_SLEEP (0x10)"* All CPU units are inactive while the kernel is idle (PPC603, PPCEC603 and* PPC860 - not recommended for the PPC603 and PPCEC603 architecture).* .iP "VX_POWER_MODE_DEEP_SLEEP (0x20)"* All CPU units are inactive while the kernel is idle (PPC860 only - not* recommended).* .iP "VX_POWER_MODE_DPM (0x40)"* Dynamic Power Management Mode (PPC603 and PPCEC603 only).* .iP "VX_POWER_MODE_DOWN (0x80)"* Only a hard reset causes an exit from power-down low power mode (PPC860 only* - not recommended).** USAGE SH:* Power management modes include the following:* .iP "VX_POWER_MODE_DISABLE (0x0)"* Power management is disabled.* .iP "VX_POWER_MODE_SLEEP (0x1)"* The core CPU is halted, on-chip peripherals operating, external memory* refreshing.* .iP "VX_POWER_MODE_DEEP_SLEEP (0x2)"* The core CPU is halted, on-chip peripherals operating, external memory* self-refreshing (SH-4 only).* .iP "VX_POWER_MODE_USER (0xff)"* Set up to three 8-bit standby registers with user-specified values:* .CS*     vxPowerModeSet (VX_POWER_MODE_USER | sbr1<<8 | sbr2<<16 | sbr3<<24);* .CE* The sbr1 value is written to the STBCR or SBYCR1, sbr2 is written to* the STBCR2 or SBYCR2, and sbr3 is written to the STBCR3 register (when* available), depending on the SH processor type.** .LP* USAGE X86:* vxPowerModeSet() is called in the BSP initialization routine sysHwInit().* Power management modes include the following:* .iP "VX_POWER_MODE_DISABLE (0x1)"* Power management is disable: this prevents halting the CPU.* .iP "VX_POWER_MODE_AUTOHALT (0x4)"* Power management is enable: this allows halting the CPU.** RETURNS: OK, or ERROR if <mode> is incorrect or not supported by the* processor.** SEE ALSO:* vxPowerModeGet(), vxPowerDown()*/STATUS vxPowerModeSet    (    UINT32 mode                 /* power management mode to select */    )    {    ...    }/********************************************************************************* vxPowerModeGet - get the power management mode (PowerPC, SH, x86)** This routine returns the power management mode set by vxPowerModeSet().** RETURNS:* The power management mode, or ERROR if no mode has been selected or if * power management is not supported.** SEE ALSO:* vxPowerModeSet(), vxPowerDown()*/UINT32 vxPowerModeGet (void)    {    ...    }/********************************************************************************* vxPowerDown - place the processor in reduced-power mode (PowerPC, SH)** This routine activates the reduced-power mode if power management is enabled.* It is called by the scheduler when the kernel enters the idle loop.* The power management mode is selected by vxPowerModeSet().** RETURNS: OK, or ERROR if power management is not supported or if external* interrupts are disabled.** SEE ALSO: vxPowerModeSet(), vxPowerModeGet()**/UINT32 vxPowerDown (void)    {    ...    }/********************************************************************************* vxCr0Get - get a content of the Control Register 0 (x86)** This routine gets a content of the Control Register 0. ** RETURNS: a value of the Control Register 0*/int vxCr0Get (void)    {    ...    }/********************************************************************************* vxCr0Set - set a value to the Control Register 0 (x86)** This routine sets a value to the Control Register 0.** RETURNS: N/A*/void vxCr0Set    (    int value			/* CR0 value */    )    {    ...    }/********************************************************************************* vxCr2Get - get a content of the Control Register 2 (x86)** This routine gets a content of the Control Register 2. ** RETURNS: a value of the Control Register 2*/int vxCr2Get (void)    {    ...    }/********************************************************************************* vxCr2Set - set a value to the Control Register 2 (x86)** This routine sets a value to the Control Register 2.** RETURNS: N/A*/void vxCr2Set    (    int value			/* CR2 value */    )    {    ...    }/********************************************************************************* vxCr3Get - get a content of the Control Register 3 (x86)** This routine gets a content of the Control Register 3. ** RETURNS: a value of the Control Register 3*/int vxCr3Get (void)    {    ...    }/********************************************************************************* vxCr3Set - set a value to the Control Register 3 (x86)** This routine sets a value to the Control Register 3.** RETURNS: N/A*/void vxCr3Set    (    int value			/* CR3 value */    )    {    ...    }/********************************************************************************* vxCr4Get - get a content of the Control Register 4 (x86)** This routine gets a content of the Control Register 4. ** RETURNS: a value of the Control Register 4*/int vxCr4Get (void)    {    ...    }/********************************************************************************* vxCr4Set - set a value to the Control Register 4 (x86)** This routine sets a value to the Control Register 4.** RETURNS: N/A*/void vxCr4Set    (    int value			/* CR4 value */    )    {    ...    }/********************************************************************************* vxEflagsGet - get a content of the EFLAGS register (x86)** This routine gets a content of the EFLAGS register** RETURNS: a value of the EFLAGS register*/int vxEflagsGet (void)    {    ...    }/********************************************************************************* vxEflagsSet - set a value to the EFLAGS register (x86)** This routine sets a value to the EFLAGS register** RETURNS: N/A*/void vxEflagsSet    (    int value			/* EFLAGS value */    )    {    ...    }/********************************************************************************* vxDrGet - get a content of the Debug Register 0 to 7 (x86)** This routine gets a content of the Debug Register 0 to 7. ** RETURNS: N/A*/void vxDrGet    (    int * pDr0,			/* DR0 */    int * pDr1,			/* DR1 */    int * pDr2,			/* DR2 */    int * pDr3,			/* DR3 */    int * pDr4,			/* DR4 */    int * pDr5,			/* DR5 */    int * pDr6,			/* DR6 */    int * pDr7			/* DR7 */    )    {    ...    }/********************************************************************************* vxDrSet - set a value to the Debug Register 0 to 7 (x86)** This routine sets a value to the Debug Register 0 to 7. ** RETURNS: N/A*/void vxDrSet    (    int dr0,			/* DR0 */    int dr1,			/* DR1 */    int dr2,			/* DR2 */    int dr3,			/* DR3 */    int dr4,			/* DR4 */    int dr5,			/* DR5 */    int dr6,			/* DR6 */    int dr7			/* DR7 */    )    {    ...    }/********************************************************************************* vxTssGet - get a content of the TASK register (x86)** This routine gets a content of the TASK register** RETURNS: a value of the TASK register*/int vxTssGet (void)    {    ...    }/********************************************************************************* vxTssSet - set a value to the TASK register (x86)** This routine sets a value to the TASK register** RETURNS: N/A*/void vxTssSet    (    int value			/* TASK register value */    )    {    ...    }/********************************************************************************* vxGdtrGet - get a content of the Global Descriptor Table Register (x86)** This routine gets a content of the Global Descriptor Table Register** RETURNS: N/A*/void vxGdtrGet    (    long long int * pGdtr	/* memory to store GDTR */    )    {    ...    }/********************************************************************************* vxIdtrGet - get a content of the Interrupt Descriptor Table Register (x86)** This routine gets a content of the Interrupt Descriptor Table Register** RETURNS: N/A*/void vxIdtrGet    (    long long int * pIdtr	/* memory to store IDTR */    )    {    ...    }/********************************************************************************* vxLdtrGet - get a content of the Local Descriptor Table Register (x86)** This routine gets a content of the Local Descriptor Table Register** RETURNS: N/A*/void vxLdtrGet    (    long long int * pLdtr	/* memory to store LDTR */    )    {    ...    }

⌨️ 快捷键说明

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