Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 62927
b: refs/heads/master
c: 6a28a05
h: refs/heads/master
i:
  62925: 9b3377a
  62923: 199d820
  62919: ae9c0b8
  62911: 00e8fd3
v: v3
  • Loading branch information
Linus Torvalds committed Jul 25, 2007
1 parent 32ac715 commit 1d2a317
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cb7e51d8b1f8e2390970f4bb7d095c414b1bf3cf
refs/heads/master: 6a28a05f9b1b4db920e390ac89968ed6d2e4b8ec
7 changes: 4 additions & 3 deletions trunk/arch/i386/boot/apm.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ int query_apm_bios(void)
if (bx != 0x504d) /* "PM" signature */
return -1;

if (cx & 0x02) /* 32 bits supported? */
if (!(cx & 0x02)) /* 32 bits supported? */
return -1;

/* Disconnect first, just in case */
ax = 0x5304;
bx = 0;
asm volatile("pushl %%ebp ; int $0x15 ; popl %%ebp"
: "+a" (ax)
: : "ebx", "ecx", "edx", "esi", "edi");
: "+a" (ax), "+b" (bx)
: : "ecx", "edx", "esi", "edi");

/* Paranoia */
ebx = esi = 0;
Expand Down
16 changes: 8 additions & 8 deletions trunk/arch/i386/boot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ static void keyboard_set_repeat(void)
}

/*
* Get Intel SpeedStep IST information.
* Get Intel SpeedStep (IST) information.
*/
static void query_speedstep_ist(void)
static void query_ist(void)
{
asm("int $0x15"
: "=a" (boot_params.speedstep_info[0]),
"=b" (boot_params.speedstep_info[1]),
"=c" (boot_params.speedstep_info[2]),
"=d" (boot_params.speedstep_info[3])
: "=a" (boot_params.ist_info.signature),
"=b" (boot_params.ist_info.command),
"=c" (boot_params.ist_info.event),
"=d" (boot_params.ist_info.perf_level)
: "a" (0x0000e980), /* IST Support */
"d" (0x47534943)); /* Request value */
}
Expand Down Expand Up @@ -144,8 +144,8 @@ void main(void)
query_voyager();
#endif

/* Query SpeedStep IST information */
query_speedstep_ist();
/* Query Intel SpeedStep (IST) information */
query_ist();

/* Query APM information */
#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE)
Expand Down
9 changes: 5 additions & 4 deletions trunk/include/asm-i386/bootparam.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
#include <linux/types.h>
#include <linux/screen_info.h>
#include <linux/apm_bios.h>
#include <asm/e820.h>
#include <linux/edd.h>
#include <asm/e820.h>
#include <asm/ist.h>
#include <video/edid.h>

struct setup_header {
Expand Down Expand Up @@ -48,9 +49,9 @@ struct efi_info {
u32 _pad1;
u32 efi_systab;
u32 efi_memdesc_size;
u32 efi_memdec_version;
u32 efi_memdesc_version;
u32 efi_memmap;
u32 fi_memmap_size;
u32 efi_memmap_size;
u32 _pad2[2];
};

Expand All @@ -59,7 +60,7 @@ struct boot_params {
struct screen_info screen_info; /* 0x000 */
struct apm_bios_info apm_bios_info; /* 0x040 */
u8 _pad2[12]; /* 0x054 */
u32 speedstep_info[4]; /* 0x060 */
struct ist_info ist_info; /* 0x060 */
u8 _pad3[16]; /* 0x070 */
u8 hd0_info[16]; /* obsolete! */ /* 0x080 */
u8 hd1_info[16]; /* obsolete! */ /* 0x090 */
Expand Down
10 changes: 6 additions & 4 deletions trunk/include/asm-i386/ist.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@

#ifdef __KERNEL__

#include <linux/types.h>

struct ist_info {
unsigned long signature;
unsigned long command;
unsigned long event;
unsigned long perf_level;
u32 signature;
u32 command;
u32 event;
u32 perf_level;
};

extern struct ist_info ist_info;
Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-x86_64/ist.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include <asm-i386/ist.h>
20 changes: 11 additions & 9 deletions trunk/include/linux/apm_bios.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,22 @@ typedef unsigned short apm_eventinfo_t;

#ifdef __KERNEL__

#include <linux/types.h>

#define APM_CS (GDT_ENTRY_APMBIOS_BASE * 8)
#define APM_CS_16 (APM_CS + 8)
#define APM_DS (APM_CS_16 + 8)

struct apm_bios_info {
unsigned short version;
unsigned short cseg;
unsigned long offset;
unsigned short cseg_16;
unsigned short dseg;
unsigned short flags;
unsigned short cseg_len;
unsigned short cseg_16_len;
unsigned short dseg_len;
u16 version;
u16 cseg;
u32 offset;
u16 cseg_16;
u16 dseg;
u16 flags;
u16 cseg_len;
u16 cseg_16_len;
u16 dseg_len;
};

/* Results of APM Installation Check */
Expand Down

0 comments on commit 1d2a317

Please sign in to comment.