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

📄 xllp_restart_data.h

📁 Intel PXA270底层设备驱动代码
💻 H
字号:
#ifndef _RESTART_DATA_INCLUDED    
#define _RESTART_DATA_INCLUDED 1   
/******************************************************************************
 *  COPYRIGHT (C) 2005 Intel Corporation.
 *
 *  This software as well as the software described in it is furnished under 
 *  license and may only be used or copied in accordance with the terms of the 
 *  license. The information in this file is furnished for informational use 
 *  only, is subject to change without notice, and should not be construed as 
 *  a commitment by Intel Corporation. Intel Corporation assumes no 
 *  responsibility or liability for any errors or inaccuracies that may appear 
 *  in this document or any software that may be provided in association with 
 *  this document.
 * 
 *  Except as permitted by such license, no part of this document may be 
 *  reproduced, stored in a retrieval system, or transmitted in any form or by 
 *  any means without the express written consent of Intel Corporation. 
 *
 *******************************************************************************
 */
    // RESTART_DATA is used by soft reset and suspend/resume.
    // It's physical address (within the IMAGE_SHARE_ARGS area) is defined in args.h 
    //
    // RESET_REASON is the value of R10 saved by the boot loader (ie. RCSR and PSSR).
    // KERNEL_STARTUP_ADDRESS is used by the boot code in physical mode.
    // It's the physical address of the routine that will launch the OS kernel.
    // SHUTDOWN_REASON is currently used to distinguish between suspend and soft reset
    // WAKEUP_SOURCES is used as a parameter passed to the PowerOff routine.
    // The RESUME_DATA member is defined in XLLP (where SUSPEND/RESUME code is implemented).
    // Note that RESUME_DATA need not contain all of the saved state of the system.
    // It needs to contain enough state to restore the MMU for virtual addressing, the processor mode, the PC, and the SP.
    // These values need to be accessed via physical addresses so they need to reside in physically contiguous memory.
    // The IMAGE_SHARE_ARGS region is therefore a convenient place to sotre them.
    // The actual structure need only be known to the suspend/resume code in XLLP. 
    // Other platform state can be stored at any virtual address the XLLP suspend/resume code sees fit. 
typedef struct {
    unsigned long VERSION;
    unsigned long RESET_REASON;            // from RCSR and PSSR (ie. r10 in boot code)
    unsigned long KERNEL_STARTUP_ADDRESS;  // Address of code that will launch OS kernel
    unsigned long SHUTDOWN_REASON;         // Reason for shutdown (suspend, soft reset, etc. - see definitions below)
    unsigned long WAKEUP_SOURCES;          // Bit mask of sources that will trigger resume
    unsigned long reserved1[2];            // for possible future expansion (of WAKEUP_SOURCES or additional params)
    unsigned long WAKEUP_REASON;           // Wakeup source that triggerred resume
    unsigned long RESUME_DATA[248];        // register save area used for suspend/resume.
} RESTART_DATA_T;

#define RESTART_DATA_VERSION     3

#define SHUTDOWN_REASON_SUSPEND  1
#define SHUTDOWN_REASON_RESET    2

    // WAKEUP_SOURCES
    // Not all sources defined here will necessarily be implemented.
    // Indeed some may not be implementable at all on some platforms.
    // eg. On Mainstone, INSERT/REMOVE events cannot be implemented seperately.
    //     Only both or neither can be implemented.

// Unsilicited sources
#define WS_RTC_ALARM             0x00000001
#define WS_PHONECALL             0x00000002  // incoming phone call

// User activities
#define WS_KEYPAD                0x00000100
#define WS_TOUCH                 0x00000200
#define WS_BUTTON                0x00000400

#define WS_CARD_INSERT           0x00010000  // SD/MMC, MEM STICK, PCMCIA, etc.  
#define WS_CARD_REMOVE           0x00020000  // SD/MMC, MEM STICK, PCMCIA, etc.

#define WS_CABLE_INSERT          0x01000000  // USB, SERIAL, etc.
#define WS_CABLE_REMOVE          0x02000000  // USB, SERIAL, etc.

#endif // INCLUDED

⌨️ 快捷键说明

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