lkml.org 
[lkml]   [1998]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: x86 internals help
Date
Followup to:  <Pine.SUN.3.96.980212182953.19487A-100000@amsterdam.lcs.mit.edu>
By author: "C. Scott Ananian" <cananian@lcs.mit.edu>
In newsgroup: linux.dev.kernel

> The APM spec says (regarding calling the 32-bit APM BIOS routines):
> - "The code segment descriptors must specify protection level 0, and
> the APM BIOS routines must be invoked with CPL=0 so they can execute
> privileged instructions such as port inputs and outputs."
>
> OK, this is an easy one: any kernel code will be running at
> protection level 0, right?

Yes.

> - "The caller must supply a stack large enough for use by the APM BIOS
> and potential interrupt handlers... The APM BIOS 32-bit protected mode
> interface must be called with a 32-bit stack."
>
> I'm *assuming* I don't have to worry about this. Is it even possible
> to change the kernel stack size? [interrupts are disabled before the
> apm routines are called, but I'm not ruling out some silly recursive
> routine in the BIOS.]

What constitutes "large enough"? There should be a figure, otherwise
the spec is broken.

> - "When the APM BIOS routines are called in protected mode, the current
> I/O permission bit map must allow access to the I/O ports the BIOS may
> need to access in the process of performing the selected function."
>
> This goes with the first question. Is there a special I/O port
> permissions map I need to fiddle with, or can I assume that kernel
> code will be running with all permissions wide open?

This is a nonsense requirement, which worries me. If CPL <= IOPL the
I/O permissions bitmap is never consulted, and given the CPL 0
requirement, CPL is always <= IOPL, it should make no difference at all.

-hpa
--
PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD 1E DF FE 69 EE 35 BD 74
See http://www.zytor.com/~hpa/ for web page and full PGP public key
I am Bahá'í -- ask me about it or see http://www.bahai.org/
"To love another person is to see the face of God." -- Les Misérables

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.035 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site