source: trunk/src/include/ahci-idc.h@ 145

Last change on this file since 145 was 133, checked in by Markus Thielen, 13 years ago
  • (#13) added IDC entry point to allow switching back to BIOS mode
  • added IDCTEST driver and program for testing the IDC entry point
  • fixed bug in IOCTL handling (missing 'break')
File size: 2.5 KB
Line 
1/******************************************************************************
2 * ahciidc.h - definitions for the OS2AHCI IDC interface
3 *
4 * Copyright (c) 2011 thi.guten Software Development
5 * Copyright (c) 2011 Mensys B.V.
6 *
7 * Authors: Christian Mueller, Markus Thielen
8 *
9 * Parts copied from/inspired by the Linux AHCI driver;
10 * those parts are (c) Linux AHCI/ATA maintainers
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 */
26
27
28/* -------------------------- macros and constants ------------------------- */
29
30/* IDC category */
31#define OS2AHCI_IDC_CATEGORY 0x88
32
33/* enter BIOS mode (e.g. to generate trap dumps)
34 * Request packet parameters: None
35 */
36#define OS2AHCI_IDC_BIOSMODE 0x66
37
38/* test IOCTL; does nothing but BEEP
39 * Request packet parameters: None
40 */
41#define OS2AHCI_IDC_BEEP 0x67
42
43
44/* ------------------------ typedefs and structures ------------------------ */
45
46/* AHCI_IDC_ENTRY defines a function pointer to the OS2AHCI IDC entry point */
47typedef void (_cdecl _far *PFN_AHCI_IDC_ENTRY) (unsigned short real_ds,
48 RP_GENIOCTL _far *ioctl);
49
50#pragma pack(1)
51
52/*
53 * AHCI_ATTACH_AREA defines the device driver attach table as required
54 * to attach to os2ahci.add using DevHelp_AttachDD
55 */
56typedef struct {
57 PFN_AHCI_IDC_ENTRY real_entry_point; /* real mode entry point address */
58 unsigned short real_ds; /* real mode DS */
59
60 PFN_AHCI_IDC_ENTRY prot_entry_point; /* protected mode entry point address */
61 unsigned short prot_ds; /* protected mode DS */
62 } AHCI_ATTACH_AREA;
63
64#pragma pack()
65
66/* -------------------------- function prototypes -------------------------- */
67
68/* ------------------------ global/static variables ------------------------ */
69
70
Note: See TracBrowser for help on using the repository browser.