Re: Port 73h?
- From: "Mark_Larson" <spamtrap@xxxxxxxxxx>
- Date: 24 Oct 2006 08:26:58 -0700
spamtrap@xxxxxxxxxx wrote:
Hi:
I've been looking for a source code and I find this instruction
in ax,0x73
I've been searching in the web to find what is 73 direction for but I
can't find anything.... someone could help me?
On some chipsets they have support for an alternate set of I/O
registers for doing CMOS reads/writes. These have the exact same
functionality as the ones at 70h/71h. A lot of times in BIOS we will
use them in interrupts or SMI ( system management interrupt) so that we
don't trash the result in the register. A write to 72h and a write to
70h doesn't go to the same location. So you don't have to worry about
trashing the CMOS index in 70h if you use 72h instead.
Failing scenario that these help resolve:
In the OS someone writes a 03h to 70h
Interrupt occurs
In the interrupt they write an 05h to 70h
In the interrupt they read 71h - they're getting the contents of
CMOS address 05h
Exit the interrupt
Code in OS had just written a 03h to 70h, and now
Tries to read port 71h to get the contents of 03h, but instead they
get the contents of 05h.
So in Interrupt handlers and SMI we use that a lot. There is an
additional work around that we do. You can find out what the latched
address is in 70h. We have a means through the chipset to be able to
get the value. Save it at the beginning of the interrupt handler. Do
all the CMOS accesses you want, and restore it at the end. I prefer
the first method of having ports 72h/73h. It is easier and requires
less code.
.
- References:
- Port 73h?
- From: spamtrap
- Port 73h?
- Prev by Date: Do "nops" add to the latency of a program?
- Next by Date: Re: Port 73h?
- Previous by thread: Re: Port 73h?
- Next by thread: Re: Port 73h?
- Index(es):
Relevant Pages
|