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
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 #include "../../reactos/registry.h"
42 Int386(0x15, &RegsIn
, &RegsOut
);
44 if (INT386_SUCCESS(RegsOut
))
46 DbgPrint((DPRINT_HWDETECT
, "Found APM BIOS\n"));
47 DbgPrint((DPRINT_HWDETECT
, "AH: %x\n", RegsOut
.b
.ah
));
48 DbgPrint((DPRINT_HWDETECT
, "AL: %x\n", RegsOut
.b
.al
));
49 DbgPrint((DPRINT_HWDETECT
, "BH: %x\n", RegsOut
.b
.bh
));
50 DbgPrint((DPRINT_HWDETECT
, "BL: %x\n", RegsOut
.b
.bl
));
51 DbgPrint((DPRINT_HWDETECT
, "CX: %x\n", RegsOut
.w
.cx
));
56 printf("No APM BIOS found\n");
63 DetectApmBios(HKEY SystemKey
, U32
*BusNumber
)
71 /* Create new bus key */
73 "MultifunctionAdapter\\%u", *BusNumber
);
74 Error
= RegCreateKey(SystemKey
,
77 if (Error
!= ERROR_SUCCESS
)
79 DbgPrint((DPRINT_HWDETECT
, "RegCreateKey() failed (Error %u)\n", (int)Error
));
84 /* Set 'Component Information' */
85 SetComponentInformation(BiosKey
,
91 /* Increment bus number */
94 /* Set 'Identifier' value */
95 Error
= RegSetValue(BiosKey
,
100 if (Error
!= ERROR_SUCCESS
)
102 DbgPrint((DPRINT_HWDETECT
, "RegSetValue() failed (Error %u)\n", (int)Error
));
108 /* FIXME: Add congiguration data */