Linux 版 (精华区)

发信人: tcpip (偶的昵称改了), 信区: Linux
标  题: holly大虾的内核分析报告(五)(转寄)
发信站: 哈工大紫丁香 (Sat Jan 22 16:30:57 2000), 转信

发信人: stable (xixi), 信区: FreeBSD       

标  题: holly大虾的内核分析报告(五)

发信站: BBS 水木清华站 (Fri Jan 21 21:48:03 2000)

#define MAXSSAVER       16

struct ssaver   {

        char    name[MAXSSAVER];

        int     num;

        long    time;

};

/* video mode information block */

struct video_info {

    int                 vi_mode;

    int                 vi_flags;

#define V_INFO_COLOR    (1<<0)

#define V_INFO_GRAPHICS (1<<1)

#define V_INFO_LINEAR   (1<<2)

#define V_INFO_VESA     (1<<3)

    int                 vi_width;

    int                 vi_height;

    int                 vi_cwidth;

    int                 vi_cheight;

    int                 vi_depth;

    int                 vi_planes;

    u_int               vi_window;      /* physical address */

    size_t              vi_window_size;

    size_t              vi_window_gran;

    u_int               vi_buffer;      /* physical address */

    size_t              vi_buffer_size;

    /* XXX pixel format, memory model,... */

};

/* adapter infromation block */

struct video_adapter {

    int                 va_index;

    int                 va_type;

    char                *va_name;

    int                 va_unit;

    int                 va_minor;

    int                 va_flags;

#define V_ADP_COLOR     (1<<0)

#define V_ADP_MODECHANGE (1<<1)

#define V_ADP_STATESAVE (1<<2)

#define V_ADP_STATELOAD (1<<3)

#define V_ADP_FONT      (1<<4)

#define V_ADP_PALETTE   (1<<5)

#define V_ADP_BORDER    (1<<6)

#define V_ADP_VESA      (1<<7)

#define V_ADP_PROBED    (1<<16)

#define V_ADP_INITIALIZED (1<<17)

#define V_ADP_REGISTERED (1<<18)

    int                 va_io_base;

    int                 va_io_size;

    int                 va_crtc_addr;

    int                 va_mem_base;

    int                 va_mem_size;

    u_int               va_window;      /* virtual address */

    size_t              va_window_size;

    size_t              va_window_gran;

    u_int               va_buffer;      /* virtual address */

    size_t              va_buffer_size;

    int                 va_initial_mode;

    int                 va_initial_bios_mode;

    int                 va_mode;

    struct video_info   va_info;

    int                 va_line_width;

    void                *va_token;

};

struct video_adapter_info {

    int                 va_index;

    int                 va_type;

    char                va_name[16];

    int                 va_unit;

    int                 va_flags;

    int                 va_io_base;

    int                 va_io_size;

    int                 va_crtc_addr;

    int                 va_mem_base;

    int                 va_mem_size;

    u_int               va_window;      /* virtual address */

    size_t              va_window_size;

    size_t              va_window_gran;

    u_int               va_buffer;      /* virtual address */

    size_t              va_buffer_size;

    int                 va_initial_mode;

    int                 va_initial_bios_mode;

    int                 va_mode;

    int                 va_line_width;

};

#define V_ADP_PRIMARY           0

#define V_ADP_SECONDARY         1

struct keyboard_info {

    int                 kb_index;       /* kbdio index# */

    char                kb_name[16];    /* driver name */

    int                 kb_unit;        /* unit# */

    int                 kb_type;        /* KB_84, KB_101, KB_OTHER,... */

    int                 kb_config;      /* device configuration flags */

    int                 kb_flags;       /* internal flags */

};

typedef struct accentmap accentmap_t;

typedef struct fkeytab fkeytab_t;

typedef struct fkeyarg fkeyarg_t;

typedef struct vid_info vid_info_t;

typedef struct mouse_info mouse_info_t;

typedef struct {char scrmap[256];} scrmap_t;

typedef struct {char fnt8x8[8*256];} fnt8_t;

typedef struct {char fnt8x14[14*256];} fnt14_t;

typedef struct {char fnt8x16[16*256];} fnt16_t;

typedef struct ssaver ssaver_t;

typedef struct video_adapter video_adapter_t;

typedef struct video_adapter_info video_adapter_info_t;

typedef struct video_info video_info_t;

typedef struct keyboard_info keyboard_info_t;

typedef struct {int scr_size[3];} scr_size_t;

typedef struct {int kbd_delay[2];} keyboard_delay_t;

/* defines for "special" keys (spcl bit set in keymap) */

#define NOP             0x00            /* nothing (dead key)           */

#define LSH             0x02            /* left shift key               */

#define RSH             0x03            /* right shift key              */

#define CLK             0x04            /* caps lock key                */

#define NLK             0x05            /* num lock key                 */

#define SLK             0x06            /* scroll lock key              */

#define LALT            0x07            /* left alt key                 */

#define BTAB            0x08            /* backwards tab                */

#define LCTR            0x09            /* left control key             */

#define NEXT            0x0a            /* switch to next screen        */

#define F_SCR           0x0b            /* switch to first screen       */

#define L_SCR           0x1a            /* switch to last screen        */

#define F_FN            0x1b            /* first function key           */

#define L_FN            0x7a            /* last function key            */

/*                      0x7b-0x7f          reserved do not use !        */

#define RCTR            0x80            /* right control key            */

#define RALT            0x81            /* right alt (altgr) key        */

#define ALK             0x82            /* alt lock key                 */

#define ASH             0x83            /* alt shift key                */

#define META            0x84            /* meta key                     */

#define RBT             0x85            /* boot machine                 */

#define DBG             0x86            /* call debugger                */

#define SUSP            0x87            /* suspend power (APM)          */

#define SPSC            0x88            /* toggle splash/text screen    */

#define F_ACC           DGRA            /* first accent key             */

#define DGRA            0x89            /* grave                        */

#define DACU            0x8a            /* acute                        */

#define DCIR            0x8b            /* circumflex                   */

#define DTIL            0x8c            /* tilde                        */

#define DMAC            0x8d            /* macron                       */

#define DBRE            0x8e            /* breve                        */

#define DDOT            0x8f            /* dot                          */

#define DUML            0x90            /* umlaut/diaresis              */

#define DDIA            0x90            /* diaresis                     */

#define DSLA            0x91            /* slash                        */

#define DRIN            0x92            /* ring                         */

#define DCED            0x93            /* cedilla                      */

#define DAPO            0x94            /* apostrophe                   */

#define DDAC            0x95            /* double acute                 */

#define DOGO            0x96            /* ogonek                       */

#define DCAR            0x97            /* caron                        */

#define L_ACC           DCAR            /* last accent key              */

#define STBY            0x98            /* Go into standby mode (apm)   */

--

※ 来源:·BBS 水木清华站 smth.org·[FROM: ox2.ios.ac.cn]


--
☆ 来源:.哈工大紫丁香 bbs.hit.edu.cn.[FROM: bin@mtlab.hit.edu.cn]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:203.452毫秒