AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20081208174605.4e6b177b@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:exch1.onstor.net
NSV:
SSH:
R:<maxim.kozlovsky@onstor.com>,<bfisher@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/andys@onstor.net@exch1.onstor.net/INBOX	0	2779531E7C760D4491C96305019FEEB5175DB9E731@exch1.onstor.net
X-Sylpheed-End-Special-Headers: 1
Date: Mon, 8 Dec 2008 17:46:08 -0800
From: Andrew Sharp <andy.sharp@onstor.com>
To: Maxim Kozlovsky <maxim.kozlovsky@onstor.com>
Cc: Bill Fisher <bfisher@onstor.com>
Subject: Re: code to export memory through pci
Message-ID: <20081208174608.0c2a13a9@ripper.onstor.net>
In-Reply-To: <2779531E7C760D4491C96305019FEEB5175DB9E731@exch1.onstor.net>
References: <2779531E7C760D4491C96305019FEEB5175DB9E715@exch1.onstor.net>
	<20081208171815.55395317@ripper.onstor.net>
	<2779531E7C760D4491C96305019FEEB5175DB9E731@exch1.onstor.net>
Organization: Onstor
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Mon, 8 Dec 2008 17:23:29 -0800 Maxim Kozlovsky
<maxim.kozlovsky@onstor.com> wrote:

> When the prom loading it has the range starting from 0x83000000
> exported, which is where the kernel is loaded. After the kernel boots
> it should allocate a contiguous 16mb chunk of memory, map it locally
> and export it through PCI by executing this magic sequence.

We never did anything like that on the SSC.  That I know of.

> >-----Original Message-----
> >From: Andy Sharp
> >Sent: Monday, December 08, 2008 5:18 PM
> >To: Maxim Kozlovsky
> >Cc: Bill Fisher
> >Subject: Re: code to export memory through pci
> >
> >Doesn't the prom set it up that way for us?
> >
> >On Mon, 8 Dec 2008 16:56:53 -0800 Maxim Kozlovsky
> ><maxim.kozlovsky@onstor.com> wrote:
> >
> >> Code/sm-pci/pci-init.c ~100
> >>
> >>     pci_cfg_write(0, 0, 0, PHB_EXTCONFIGDIS, 1);
> >>
> >>     /* Each PCI configuration register from 0x44 to 0x80 provides
> >> access to
> >>      * 1MB of memory, 0x1 is enable bit.
> >>          */
> >>         uintptr_t pci_phys_start = virt_to_phys(LOCAL_MEM);
> >>         uintptr_t pci_phys_end = pci_phys_start + 16 * 1024 * 1024;
> >>         uintptr_t addr;
> >>     int n;
> >>
> >>         for (addr = pci_phys_start, n = 0;
> >>                   addr < pci_phys_end;
> >>                   addr += 1024 * 1024, n++) {
> >>                 pci_cfg_write(0, 0, 0, R_BCM1480_PHB_MAP(n), (addr
> >> >> 8) | 0x1); }
> >>
> >>         /* Disable access to map registers.
> >>          */
> >>     pci_cfg_write(0, 0, 0, PHB_EXTCONFIGDIS, 0);
> >>
