From: "Igor Levicki" <levicki@yubc.net>
To: "torvalds@transmeta.com" <torvalds@transmeta.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Using %cr2 to reference "current"
Date: Sun, 10 Nov 2002 22:23:36 +0100 [thread overview]
Message-ID: <200211102123.WAA08573@avala.yubc.net> (raw)
Hi,
>I could well imagine a x86-compatible chip where %cr2 isn't even
>writable. In fact, reading the intel documentation, I see _nowhere_ a
>mention of %cr2 being writable at all - it all just says "contains the
>fault address".
>From Intel System Programmers Guide:
"The control registers can be read and loaded (or modified) using the
move-to-or-from-controlregisters
forms of the MOV instruction. In protected mode, the MOV instructions
allow the
control registers to be read or loaded (at privilege level 0 only).
This restriction means that application
programs or operating-system procedures (running at privilege levels 1,
2, or 3) are
prevented from reading or loading the control registers.
When loading the control register, reserved bits should always be set
to the values previously
read."
>(I don't know what the effect of the P4 half-cacheline
>thing is, I don't know if the CPU can have just a 64-byte block coherent,
>or what..
Cache sector size is 64 bytes on Pentium 4. When CPU reads from memory
it reads 2 sectors x 64 bytes = 128 byte cache line. Hardware
prefetcher fetches 2 x 128 byte cache line = 256 bytes of memory. On
write CPU writes 64 bytes always.
Now if you read 16 bytes from some address and then for example add
something to them and write them back to the same address you will have
a penalty when you read next 16 bytes from that address because you
have just trashed the 64 byte sector and you have to wait for
back-propagation.
Hope this helps.
Regards,
Igor Levicki
levicki@yubc.net
next reply other threads:[~2002-11-10 21:17 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-10 21:23 Igor Levicki [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-11-06 22:05 Using %cr2 to reference "current" Mikael Pettersson
2001-11-06 7:18 H. Peter Anvin
2001-11-06 8:01 ` Robert Love
2001-11-06 10:55 ` Alan Cox
2001-11-06 17:31 ` Michael Barabanov
2001-11-06 14:14 ` Manfred Spraul
2001-11-06 10:58 ` Alan Cox
2001-11-06 17:04 ` Linus Torvalds
2001-11-06 17:46 ` Alan Cox
2001-11-06 17:59 ` Linus Torvalds
2001-11-06 18:14 ` Alan Cox
2001-11-06 16:55 ` Marcelo Tosatti
2001-11-06 18:14 ` Linus Torvalds
2001-11-06 18:31 ` Alan Cox
2001-11-06 22:38 ` Linus Torvalds
2001-11-07 0:00 ` Martin Dalecki
2001-11-06 23:19 ` Alan Cox
2001-11-07 0:43 ` Martin Dalecki
2001-11-07 0:27 ` Alan Cox
2001-11-07 0:35 ` Jeff Garzik
2001-11-07 14:00 ` Martin Dalecki
2001-11-07 13:38 ` Alan Cox
2001-11-07 14:59 ` Martin Dalecki
2001-11-07 14:17 ` Alan Cox
2001-11-07 14:34 ` Dirk Moerenhout
2001-11-07 14:54 ` Alan Cox
2001-11-07 15:32 ` David Howells
2001-11-07 15:36 ` Martin Dalecki
2001-11-08 14:08 ` Martin Dalecki
2001-11-07 20:04 ` Andrew Morton
2001-11-11 13:16 ` Martin Dalecki
2001-11-11 13:06 ` Keith Owens
2001-11-06 17:02 ` Linus Torvalds
2001-11-06 17:13 ` Benjamin LaHaise
2001-11-06 17:49 ` Linus Torvalds
2001-11-06 18:19 ` Alan Cox
2001-11-09 21:52 ` Jamie Lokier
2001-11-06 18:42 ` Benjamin LaHaise
2001-11-06 19:09 ` H. Peter Anvin
2001-11-06 19:16 ` Dave Jones
2001-11-06 20:10 ` Ricky Beam
2001-11-06 23:09 ` Alan Cox
2001-11-06 23:15 ` Dave Jones
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=200211102123.WAA08573@avala.yubc.net \
--to=levicki@yubc.net \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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