linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Onkar N Mahajan <kernzap@gmail.com>
To: linux-pci@vger.kernel.org
Subject: pci_check_type2() help.
Date: Mon, 16 Apr 2012 21:32:40 +0530	[thread overview]
Message-ID: <1334592160.26350.13.camel@oc4748611672.ibm.com> (raw)

Hello list, 

I am trying to understand the PCI functionality in Linux kernel. 
What is the best way to start to understanding this - where to start 
in the kernel code ? Books ? Manuals ? 

I started reading the code - where I am stuck in this function -
pci_check_type2() ; Wherein I am not able to get from where these values
0xCFB,0xCF8,0xCFA are arrived at ? I guess these are port numbers , but 
in which manuals can I find this all information. 

linux/arch/x86/pci/init.c: 
static int __init pci_check_type2(void)
{
    unsigned long flags;
    int works = 0;

    local_irq_save(flags);

    outb(0x00, 0xCFB);
    outb(0x00, 0xCF8);
    outb(0x00, 0xCFA);
    if (inb(0xCF8) == 0x00 && inb(0xCFA) == 0x00 &&
        pci_sanity_check(&pci_direct_conf2)) {
        works = 1;
    }

    local_irq_restore(flags);

    return works;
}


Please help me figuring out right manuals for this. 


-- Onkar





             reply	other threads:[~2012-04-16 16:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-16 16:02 Onkar N Mahajan [this message]
2012-04-16 19:13 ` pci_check_type2() help Randy Dunlap
2012-04-16 16:20   ` Onkar N Mahajan
2012-04-16 19:21     ` Randy Dunlap

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=1334592160.26350.13.camel@oc4748611672.ibm.com \
    --to=kernzap@gmail.com \
    --cc=linux-pci@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;
as well as URLs for NNTP newsgroup(s).