public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: Kernel interrupts disable at user level - RIGHT/ WRONG - Help
@ 2005-12-20  6:57 Mukund JB.
  2005-12-20  7:09 ` Dave Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Mukund JB. @ 2005-12-20  6:57 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1448 bytes --]


Dear Alan,

I want the contents of A, B, C, D registers of CMOS mapped registers.
But instead the driver gives the details about the bit masks of few of register A, B only.
The others are NOT available. 

I would also require to retrieve the day of the week info in RTC information. 
I tried the /dev/rtc but I don't get it there.

at the same time, I am able to get the entire CMOS information using the application attached which does not use any driver interface and instead use the ports directly.
But, the application tried to disable the interrupts on the processor. 
Suggest me the pros & cons of using this application.

Regards,
Mukund Jampala


-----Original Message-----
From: Alan Cox [mailto:alan@lxorguk.ukuu.org.uk]
Sent: Monday, December 19, 2005 11:13 PM
To: Mukund JB.
Cc: linux-kernel@vger.kernel.org
Subject: Re: Kernel interrupts disable at user level - RIGHT/ WRONG -
Help


On Llu, 2005-12-19 at 17:45 +0530, Mukund JB. wrote:
> Dear Kernel Developers,
> 
> I have a requirement of getting the CMOS details at the user level. I have identified the interfaces as /dev/nvram & /dev/rtc.
> But, the complete CMOS details are available to the user Applications as the driver does not provide the suitable interface to get the complete CMOS details.

Then you'll need to enhance the nvram or rtc driver to support the extra
bits you need. What doesn't it provide access to that you require >


[-- Attachment #2: dmpCmos.c --]
[-- Type: application/octet-stream, Size: 867 bytes --]

/*
*                      CMOS DUMPER
*          Endrazine endrazine@pulltheplug.org
*
*
* compiling : gcc cmosd.c -o cmosd.o
* usage : #cmosd > cmos.dump
*
*/

#include <stdio.h>
#include <unistd.h>
#include <asm/io.h>


int main ()
{
        int i;

        if (ioperm(0x70, 2, 1))   //Ask Permission (set to 1) 
        {                         //for ports 0x70 and 0x71
                perror("ioperm");
                exit (1);
        }

        for (i=0;i<128;i++)
        {
          outb(i,0x70);// Write to port 0x70
          usleep(100000);
          printf("%c",inb(0x71));

        }

        if (ioperm(0x71, 2, 0)) // We don't need Permission anymore
        {                        // (set permissions to 0).
                 perror("ioperm");
                 exit(1);
        }

        exit (0);// Quit
}

^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: Kernel interrupts disable at user level - RIGHT/ WRONG - Help
@ 2005-12-20  9:02 Mukund JB.
  0 siblings, 0 replies; 6+ messages in thread
From: Mukund JB. @ 2005-12-20  9:02 UTC (permalink / raw)
  To: Dave Jones; +Cc: Alan Cox, linux-kernel



> -----Original Message-----
> From: Dave Jones [mailto:davej@redhat.com]
> Sent: Tuesday, December 20, 2005 12:39 PM
> To: Mukund JB.
> Cc: Alan Cox; linux-kernel@vger.kernel.org
> Subject: Re: Kernel interrupts disable at user level - RIGHT/ WRONG -
> Help
> 
> 
> On Tue, Dec 20, 2005 at 12:27:13PM +0530, Mukund JB. wrote:
>  > 
>  > Dear Alan,
>  > 
>  > I want the contents of A, B, C, D registers of CMOS mapped 
> registers.
>  > But instead the driver gives the details about the bit 
> masks of few of register A, B only.
>  > The others are NOT available. 
>  > 
>  > I would also require to retrieve the day of the week info 
> in RTC information. 
>  > I tried the /dev/rtc but I don't get it there.
> 
> Use /dev/nvram instead.
> 
> 		Dave

/dev/nvram does not give the cpomplete CMOS details. A part of RTC & date, tine and other info will be missing.

Regards,
Mukund Jampala


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Kernel interrupts disable at user level - RIGHT/ WRONG - Help
@ 2005-12-19 12:15 Mukund JB.
  2005-12-19 13:51 ` linux-os (Dick Johnson)
  2005-12-19 17:42 ` Alan Cox
  0 siblings, 2 replies; 6+ messages in thread
From: Mukund JB. @ 2005-12-19 12:15 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 799 bytes --]


Dear Kernel Developers,

I have a requirement of getting the CMOS details at the user level. I have identified the interfaces as /dev/nvram & /dev/rtc.
But, the complete CMOS details are available to the user Applications as the driver does not provide the suitable interface to get the complete CMOS details.

I found an application that reads directly form the port 70, 71 and gets the complete details about the CMOS. It does not use any Device Interface and at the same disables all the interruptson the HOST system.

I would like to hear from you whether this kind of Applications can be used or NOT? Please see the attached source code I am planning to use to access the CMOS contents.

Please give me ur valuable suggestions. 

Regards,
Mukund Jampala

  

 <<dmpCmos.c>> 

[-- Attachment #2: dmpCmos.c --]
[-- Type: application/octet-stream, Size: 895 bytes --]



/*
* 0486 5230593 5232717 
*                     CMOS DUMPER
*          Endrazine endrazine@pulltheplug.org
*
*
* compiling : gcc cmosd.c -o cmosd.o
* usage : #cmosd > cmos.dump
*
*/

#include <stdio.h>
#include <unistd.h>
#include <asm/io.h>


int main ()
{
        int i;

        if (ioperm(0x70, 2, 1))   //Ask Permission (set to 1) 
        {                         //for ports 0x70 and 0x71
                perror("ioperm");
                exit (1);
        }

        for (i=0;i<128;i++)
        {
          outb(i,0x70);// Write to port 0x70
          usleep(100000);
          printf("%c",inb(0x71));

        }

        if (ioperm(0x71, 2, 0)) // We don't need Permission anymore
        {                        // (set permissions to 0).
                 perror("ioperm");
                 exit(1);
        }

        exit (0);// Quit
}

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-12-20  9:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-20  6:57 Kernel interrupts disable at user level - RIGHT/ WRONG - Help Mukund JB.
2005-12-20  7:09 ` Dave Jones
  -- strict thread matches above, loose matches on Subject: below --
2005-12-20  9:02 Mukund JB.
2005-12-19 12:15 Mukund JB.
2005-12-19 13:51 ` linux-os (Dick Johnson)
2005-12-19 17:42 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox