mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Richard B. Johnson" <root@chaos.analogic.com>
To: Ben Johnson <ben@blarg.net>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: linear vs. logical addresses?  how does cpu interpret kernel addrs?
Date: Wed, 17 Sep 2003 07:39:53 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.53.0309170734240.881@chaos> (raw)
In-Reply-To: <20030916154747.A22526@blarg.net>

On Tue, 16 Sep 2003, Ben Johnson wrote:

> short version:
>
> 1) When I am referencing a pointer in the kernel, is the value of that
> pointer variable interpreted by the cpu as a logical or linear address?
>
> 2) if I have two overlapping data/stack segments presently selected,
> each with a different base, how does the cpu know which segment/base
> address to use to get the linear address?
>
[SNIPPED...]
All stack offsets are accessed relative to SS. No exceptions.
However a compiler may calculate those offsets based upon
something else.
This is why DS must equal SS if 'C' is going to access both
stack data variables and data segment variables. This is how
the 'C' code converter is set up. It is not a CPU limitation.
If you change the SS in the kernel, strange and wonderful
things will occur.


Cheers,
Dick Johnson
Penguin : Linux version 2.4.22 on an i686 machine (794.73 BogoMips).
            Note 96.31% of all statistics are fiction.



  parent reply	other threads:[~2003-09-17 11:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-16 22:47 Ben Johnson
2003-09-17  0:48 ` Martin J. Bligh
2003-09-17  0:54   ` William Lee Irwin III
2003-09-17  0:58     ` Martin J. Bligh
2003-09-17  1:44       ` Ben Johnson
2003-09-17  1:55         ` William Lee Irwin III
2003-09-17  2:07           ` Ben Johnson
2003-09-17  2:10             ` William Lee Irwin III
2003-09-17  2:32               ` Ben Johnson
2003-09-17  2:10         ` Felipe Alfaro Solana
2003-09-17 11:39 ` Richard B. Johnson [this message]
2003-09-17 19:42   ` Ben Johnson
2003-09-17 20:05     ` Richard B. Johnson
2003-09-17 20:44       ` Jamie Lokier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.53.0309170734240.881@chaos \
    --to=root@chaos.analogic.com \
    --cc=ben@blarg.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®