Implemented first basic APM driver. Only tested with QEMU so far, that's why
it's currently disabled. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16120 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -6,7 +6,13 @@ UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
||||
UsePrivateHeaders [ FDirName graphics vesa ] ;
|
||||
UsePrivateHeaders [ FDirName storage ] ;
|
||||
|
||||
SubDirC++Flags -fno-rtti ;
|
||||
{
|
||||
local defines = _BOOT_MODE ;
|
||||
|
||||
defines = [ FDefines $(defines) ] ;
|
||||
SubDirCcFlags $(defines) -Wall -Wno-multichar ;
|
||||
SubDirC++Flags $(defines) -Wall -Wno-multichar -fno-rtti ;
|
||||
}
|
||||
|
||||
KernelMergeObject boot_platform_bios_ia32.o :
|
||||
shell.S
|
||||
|
||||
@@ -20,12 +20,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
// int 0x15 APM definitions
|
||||
#define BIOS_APM_CHECK 0x5300
|
||||
#define BIOS_APM_CONNECT_32_BIT 0x5303
|
||||
#define BIOS_APM_DISCONNECT 0x5304
|
||||
|
||||
|
||||
status_t
|
||||
apm_init(void)
|
||||
{
|
||||
@@ -68,8 +62,11 @@ apm_init(void)
|
||||
regs.eax = BIOS_APM_CONNECT_32_BIT;
|
||||
regs.ebx = 0;
|
||||
call_bios(0x15, ®s);
|
||||
if ((regs.flags & CARRY_FLAG) != 0)
|
||||
if ((regs.flags & CARRY_FLAG) != 0) {
|
||||
// reset the version, so that the kernel won't try to use APM
|
||||
info.version = 0;
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
info.code32_segment_base = regs.eax & 0xffff;
|
||||
info.code32_segment_offset = regs.ebx;
|
||||
|
||||
Reference in New Issue
Block a user