Beginnings of APM support: we now connect to the APM BIOS in 32 bit protected mode.
We don't do anything with it yet, though, so the BIOS will probably ignore us since we are supposed to poll for events. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15900 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#ifndef KERNEL_APM_H
|
||||
#define KERNEL_APM_H
|
||||
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
typedef struct apm_info {
|
||||
uint16 version;
|
||||
uint16 flags;
|
||||
uint16 code32_segment_base;
|
||||
uint32 code32_segment_offset;
|
||||
uint16 code32_segment_length;
|
||||
uint16 code16_segment_base;
|
||||
uint16 code16_segment_length;
|
||||
uint16 data_segment_base;
|
||||
uint16 data_segment_length;
|
||||
} apm_info;
|
||||
|
||||
|
||||
#endif /* KERNEL_APM_H */
|
||||
@@ -1,7 +1,10 @@
|
||||
/*
|
||||
** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||
** Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
* Copyright 2002-2006, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
#ifndef _KERNEL_ARCH_x86_DESCRIPTORS_H
|
||||
#define _KERNEL_ARCH_x86_DESCRIPTORS_H
|
||||
|
||||
@@ -12,14 +15,18 @@
|
||||
#define USER_CODE_SEG 0x1b
|
||||
#define USER_DATA_SEG 0x23
|
||||
|
||||
#define APM_CODE32_SEGMENT 0x28
|
||||
#define APM_CODE16_SEGMENT 0x30
|
||||
#define APM_DATA_SEGMENT 0x38
|
||||
|
||||
#ifndef _ASSEMBLER
|
||||
// this file can also be included from assembler as well
|
||||
// (and is in arch_interrupts.S)
|
||||
|
||||
#define DOUBLE_FAULT_TSS_BASE_SEGMENT 5
|
||||
#define DOUBLE_FAULT_TSS_BASE_SEGMENT 8
|
||||
#define TSS_BASE_SEGMENT (DOUBLE_FAULT_TSS_BASE_SEGMENT + smp_get_num_cpus())
|
||||
#define TLS_BASE_SEGMENT (TSS_BASE_SEGMENT + smp_get_num_cpus())
|
||||
#define APM_BASE_SEGMENT (TLS_BASE_SEGMENT + smp_get_num_cpus())
|
||||
|
||||
|
||||
// defines entries in the GDT/LDT
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2004, Axel Dörfler, [email protected].
|
||||
* Copyright 2003-2006, Axel Dörfler, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef KERNEL_BOOT_PLATFORM_BIOS_IA32_KERNEL_ARGS_H
|
||||
@@ -9,6 +9,8 @@
|
||||
# error This file is included from <boot/kernel_args.h> only
|
||||
#endif
|
||||
|
||||
|
||||
#include <apm.h>
|
||||
#include <bios_drive.h>
|
||||
|
||||
|
||||
@@ -25,6 +27,8 @@ typedef struct {
|
||||
|
||||
uint16 boot_drive_number;
|
||||
bios_drive *drives; // this does not contain the boot drive
|
||||
|
||||
apm_info apm;
|
||||
} platform_kernel_args;
|
||||
|
||||
#endif /* KERNEL_BOOT_PLATFORM_BIOS_IA32_KERNEL_ARGS_H */
|
||||
|
||||
Reference in New Issue
Block a user