4 * Copyright (C) 2004 Eric Kohl
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 DBG_DEFAULT_CHANNEL(HWDETECT
);
38 Int386(0x15, &RegsIn
, &RegsOut
);
40 if (INT386_SUCCESS(RegsOut
))
42 TRACE("Found APM BIOS\n");
43 TRACE("AH: %x\n", RegsOut
.b
.ah
);
44 TRACE("AL: %x\n", RegsOut
.b
.al
);
45 TRACE("BH: %x\n", RegsOut
.b
.bh
);
46 TRACE("BL: %x\n", RegsOut
.b
.bl
);
47 TRACE("CX: %x\n", RegsOut
.w
.cx
);
52 TRACE("No APM BIOS found\n");
59 DetectApmBios(PCONFIGURATION_COMPONENT_DATA SystemKey
, ULONG
*BusNumber
)
61 PCONFIGURATION_COMPONENT_DATA BiosKey
;
62 PCM_PARTIAL_RESOURCE_LIST PartialResourceList
;
65 Size
= sizeof(CM_PARTIAL_RESOURCE_LIST
) -
66 sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR
);
70 /* Create 'Configuration Data' value */
71 PartialResourceList
= FrLdrHeapAlloc(Size
, TAG_HW_RESOURCE_LIST
);
72 memset(PartialResourceList
, 0, Size
);
73 PartialResourceList
->Version
= 0;
74 PartialResourceList
->Revision
= 0;
75 PartialResourceList
->Count
= 0;
77 /* Create new bus key */
78 FldrCreateComponentKey(SystemKey
,
89 /* Increment bus number */
93 /* FIXME: Add configuration data */