Re: [ACPI-sppt] ASUS M2400N update > ASUS Centrino update

Ducrot Bruno <[email protected]> Sat, 20 Sep 2003 15:03:52 +0200
Newsgroups gmane.linux.acpi.support
Message-ID <[email protected]>
On Sat, Sep 20, 2003 at 02:22:09PM +0200, Ducrot Bruno wrote:
> On Sat, Sep 20, 2003 at 01:40:56PM +0200, Robert Vollmert wrote:
> > > > >here's as small patch to the custom DSDT from acpi.sf.net. The address
> > > > >TSAD that was supposed to be read somewhere from system memory is now
> > > > >hard-coded to a value obtained from the official L3800C DSDT.
> > > 
> > > Unfortunately this was the easy part.  You still have trouble with other
> > > component of the thermal zone.
> > 
> > I realize this wasn't a complex modification :). Also, I doubt I would
> > have found this without your previous efforts on tracking down the
> > problem.
> > 
> > Anyway, as far as I understand the DSDT and your previous mails, the
> > information that should be in \RAMW is not there. Is it more likely
> > (or even possible) that RAMB is wrong, or that the DSDT expects the OS
> > to provide the data at that address. Would it be possible to check how
> > this looks in Windows?
> > 
> 
> Unfortunately, I have no idea to do that in Windows, but that is easy
> under linux.  If you can write an equivalent program (still have to be
> done though), but under Windows, it may be possible to get that RAMB.
> 

Something like that:

#include <stdio.h>
#include <sys/io.h>

static inline int read_cmos(addr)
{
	int val = -1;
	char *p = (char *) &val;

	outb_p(addr, 0x72);
	*p++ = inb_p(0x73);
	addr++;

	outb_p(addr, 0x72);
	*p++ = inb_p(0x73);
	addr++;

	outb_p(addr, 0x72);
	*p++ = inb_p(0x73);
	addr++;

	outb_p(addr, 0x72);
	*p++ = inb_p(0x73);
	addr++;

	return val;
};


int main()
{
	if (iopl(3)) {
		printf("must be root.\n");
		exit(1);
	}

	printf("ramb: %0x\n", read_cmos(0x10 + 1 + 2));

	return 0;
}


-- 
Ducrot Bruno

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf