Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Get a Alloc Mem error in e1000: Page 1 of 2 (36 Items)
   
Get a Alloc Mem error in e1000  
So I have an e1000 device (single port) on one PCI bus and another 4 port 82580 chip on another PCI bus.  The startup 
enumeration finds 3 of the 4 ports.  The last port fails with the following error:
Mar 26 15:42:09    2    17     0 addup_resources: Alloc mem failed
Mar 26 15:42:09    2    10     0 pci_attach_device failed

Anyone have ideas why this would happen? It does not appear to have any reason to occur. Put the same card in a PC and 
the hardware *is* working.

Thanks.
Re: Get a Alloc Mem error in e1000  
Please can you post the full sloginfo output as well as the Œpci -v¹
output.



On 2014/3/26, 5:34 PM, "Ray Mack" <community-noreply@qnx.com> wrote:

>So I have an e1000 device (single port) on one PCI bus and another 4 port
>82580 chip on another PCI bus.  The startup enumeration finds 3 of the 4
>ports.  The last port fails with the following error:
>Mar 26 15:42:09    2    17     0 addup_resources: Alloc mem failed
>Mar 26 15:42:09    2    10     0 pci_attach_device failed
>
>Anyone have ideas why this would happen? It does not appear to have any
>reason to occur. Put the same card in a PC and the hardware *is* working.
>
>Thanks.
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post109622
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: Get a Alloc Mem error in e1000  
Hugh:

The log is pretty long so I posted a file to the attachments.  The snippet from the last post was actually a partial 
sloginfo dump rather than a pci-v output.

Thanks for looking.

Ray
Attachment: Text NIC_failure_slog.txt 19.4 KB
Re: Get a Alloc Mem error in e1000  
Ray,

You didn¹t post the Œpci -v¹ output.

Thanks, Hugh.



On 2014/3/27, 9:15 AM, "Ray Mack" <community-noreply@qnx.com> wrote:

>Hugh:
>
>The log is pretty long so I posted a file to the attachments.  The
>snippet from the last post was actually a partial sloginfo dump rather
>than a pci-v output.
>
>Thanks for looking.
>
>Ray
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post109631
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: Get a Alloc Mem error in e1000  
Oops.  Too early and not enough coffee yet :-)

Attached now

Thanks.
Attachment: Text NIC_failure_pci_v_info.txt 12.16 KB
Re: Get a Alloc Mem error in e1000  
Please will you run the attached pci-bios-v2 and see if it resolves the
problem. If not, please send me the sloginfo and Œpci -v¹ output again.




On 2014/3/27, 9:29 AM, "Ray Mack" <community-noreply@qnx.com> wrote:

>Oops.  Too early and not enough coffee yet :-)
>
>Attached now
>
>Thanks.
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post109634
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Attachment: Text pci-bios-v2 96.3 KB
Re: Get a Alloc Mem error in e1000  
Here is the result of running the utility you sent:
# pci-bios-v2
unknown symbol: hwi_off2tag
unknown symbol: hwi_find_item
unknown symbol: __hwi_find_string
ldd:FATAL: Could not resolve all symbols

It was not clear to me if you intended me to run this from the command line or if this file is supposed to replace the 
file /sbin/pci-bios for use during the system init process.  I just ran it from the command line.   Good guess that I am
 running an x86 system.

New sloginfo file attached.  Turns out you can only attach one file at a time.  Also includes pci -v results
Attachment: Text NIC_failure_pci_v_info-2.txt 12.16 KB
Re: Get a Alloc Mem error in e1000  
Are you running 6.5.0 SP1?




On 2014/3/27, 11:21 AM, "Ray Mack" <community-noreply@qnx.com> wrote:

>Here is the result of running the utility you sent:
># pci-bios-v2
>unknown symbol: hwi_off2tag
>unknown symbol: hwi_find_item
>unknown symbol: __hwi_find_string
>ldd:FATAL: Could not resolve all symbols
>
>It was not clear to me if you intended me to run this from the command
>line or if this file is supposed to replace the file /sbin/pci-bios for
>use during the system init process.  I just ran it from the command line.
>  Good guess that I am running an x86 system.
>
>New sloginfo file attached.  Turns out you can only attach one file at a
>time.  Also includes pci -v results
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post109642
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: Get a Alloc Mem error in e1000  
Yes to 6.5.0. No to SP1
Re: Get a Alloc Mem error in e1000  
OK, I¹ll have to setup a 6.5.0 system and build you a new pci-bios-v2. It
will take a while, as I¹m busy right now.



On 2014/3/27, 11:25 AM, "Ray Mack" <community-noreply@qnx.com> wrote:

>Yes to 6.5.0. No to SP1
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post109644
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: Get a Alloc Mem error in e1000  
Here is a 6.5.0 version of pci-bios-v2. Please rebuild your boot image
with this version and reboot your system.

Thanks, Hugh.



On 2014/3/27, 11:25 AM, "Ray Mack" <community-noreply@qnx.com> wrote:

>Yes to 6.5.0. No to SP1
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post109644
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Attachment: Text pci-bios-v2.650 96.51 KB
Re: Get a Alloc Mem error in e1000  
Hugh:
Our O/S build guy did the new build and I tested this morning.  We still see the Alloc Mem error on PCI when it goes to 
add that 5th ethernet port.

The sloginfo and pci -v output look just as they did before.  The hardware is certainly visible since we see all 4 PCI 
index values for the IC.

Can you give some insight into what is different in the v2 bios image you sent?

Thanks.

Ray
Re: Get a Alloc Mem error in e1000  
The pci-bios-v2 that I sent you contains a fix to not allocate memory
above 0xfe000000, as this is the area for the APIC.
I will still need the Œpci -v¹ output together with the sloginfo output to
compare it with the last one.

Thanks, Hugh.



On 2014/3/28, 2:40 PM, "Ray Mack" <community-noreply@qnx.com> wrote:

>Hugh:
>Our O/S build guy did the new build and I tested this morning.  We still
>see the Alloc Mem error on PCI when it goes to add that 5th ethernet port.
>
>The sloginfo and pci -v output look just as they did before.  The
>hardware is certainly visible since we see all 4 PCI index values for the
>IC.
>
>Can you give some insight into what is different in the v2 bios image you
>sent?
>
>Thanks.
>
>Ray
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post109680
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: Get a Alloc Mem error in e1000  
Here is the latest log and pci -v output

Is there some change you need me to make in the log level to give more details on the error?

I'll try setting it to verbose=3 while you peruse this data to see if anything jumps out.

Ray
Attachment: Text NIC_failure_slog-3.txt 31.43 KB
Re: Get a Alloc Mem error in e1000  
What I really need you to do is to create a larger slog buffer, so that
you can capture all of the output. ¹slogger -s256k¹ should do the trick.
Looking at the output that you sent me, it still looks as though the old
pci-bios-v2 is running.




On 2014/3/28, 2:53 PM, "Ray Mack" <community-noreply@qnx.com> wrote:

>Here is the latest log and pci -v output
>
>Is there some change you need me to make in the log level to give more
>details on the error?
>
>I'll try setting it to verbose=3 while you peruse this data to see if
>anything jumps out.
>
>Ray
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post109684
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: Get a Alloc Mem error in e1000  
I agree that it looks suspiciously like the original from March 26.  I have to get with the old timers and figure out 
where to go next with the build, etc.  I am the new kid in town.  I need to understand this in any event, so it may be 
Tuesday before I get back to you.
Re: Get a Alloc Mem error in e1000  
Hugh:

I spent the past week getting my brain around all things QNX especially getting the BIOS built and loaded on our system.
  Here is an update on where I am in the process:

Our BSP is based on the Cinnamon Bay board from ADI.  I have the PCI BIOS src from that distribution.  I can build and 
make changes now (more or less).

I am running into configuration issues where changes are not being picked up by the build system.  I am making changes 
to server.c in the PCI bios directory and they are not being included into the IPL image.  I can tell because the 
datestamp of pci-adi (our equivalent of pci-bios if I understand correctly) is not changing.  I have tried to force a 
change by doing a clean and build and I *still* do not pick up the changes.

Here is the text from the man page for pci-bios and pci-bios-v2
--------------------------------------------------------------------------------
 If you're using pci-bios-v2, you must name it pci-bios in order for the enumerators to work correctly. In your 
buildfile, add pci-bios-v2 like this: 
pci-bios=pci-bios-v2 

--------------------------------------------------------------------------------
This is terribly un-useful for someone who is not a build file expert.  I presume this is an indication that I should 
change fastboot.sd.build to pick up either my changes or the file that you sent me a week ago.  What is not clear is *
which* part of fastboot.sd.build I should place that configuration line.

I have gone so far as to delete pci-adi in both the "x86/o" directory and in the "install" directory without picking up 
changes I have made to server.c.  I have been trying to increase the verbosity of the PCI server so we can see where the
 allocation problem is arising but without success.  

I *was* able to get the slogger size increased to 256k by editing fastboot.sd.build.

Looking for insight into how to get the file you sent installed or how to do debugging in server.c (printfs or slog 
would be nice)

Thanks.

Ray
Re: Get a Alloc Mem error in e1000  
Ray,

If you place the pci-bios-v2 that I sent you in a temporary directory (eg.
/tmp) and then change the pci-bios line in your build file to read
³pci-bios=/tmp/pci-bios-v2², then when you rebuild your boot image, it
should pick up my pci-bios-v2.
You can change the verbosity of the pci-bios in your build file by adding
the following lines after the procmgr_symlink line:

slogger -s256k
pci-bios -vvv
waitfor /dev/pci

After you have rebuilt your boot image and rebooted the target, you should
have all the verbose output in sloginfo.

Hugh.




On 2014/4/4, 12:01 PM, "Ray Mack" <community-noreply@qnx.com> wrote:

>Hugh:
>
>I spent the past week getting my brain around all things QNX especially
>getting the BIOS built and loaded on our system.  Here is an update on
>where I am in the process:
>
>Our BSP is based on the Cinnamon Bay board from ADI.  I have the PCI BIOS
>src from that distribution.  I can build and make changes now (more or
>less).
>
>I am running into configuration issues where changes are not being picked
>up by the build system.  I am making changes to server.c in the PCI bios
>directory and they are not being included into the IPL image.  I can tell
>because the datestamp of pci-adi (our equivalent of pci-bios if I
>understand correctly) is not changing.  I have tried to force a change by
>doing a clean and build and I *still* do not pick up the changes.
>
>Here is the text from the man page for pci-bios and pci-bios-v2
>--------------------------------------------------------------------------
>------
> If you're using pci-bios-v2, you must name it pci-bios in order for the
>enumerators to work correctly. In your buildfile, add pci-bios-v2 like
>this: 
>pci-bios=pci-bios-v2
>
>--------------------------------------------------------------------------
>------
>This is terribly un-useful for someone who is not a build file expert.  I
>presume this is an indication that I should change fastboot.sd.build to
>pick up either my changes or the file that you sent me a week ago.  What
>is not clear is *which* part of fastboot.sd.build I should place that
>configuration line.
>
>I have gone so far as to delete pci-adi in both the "x86/o" directory and
>in the "install" directory without picking up changes I have made to
>server.c.  I have been trying to increase the verbosity of the PCI server
>so we can see where the allocation problem is arising but without
>success.  
>
>I *was* able to get the slogger size increased to 256k by editing
>fastboot.sd.build.
>
>Looking for insight into how to get the file you sent installed or how to
>do debugging in server.c (printfs or slog would be nice)
>
>Thanks.
>
>Ray
>
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post109800
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: Get a Alloc Mem error in e1000  
Hugh:

I finally sorted out all of my tool issues.  A lot of newbie mistakes...

I finally got the pci bios you sent installed but it does not start up correctly in our system.  It does not play well 
with the rest of the system.  The sloginfo output is really short:

# sloginfo
Time             Sev Major Minor Args
Apr 07 20:43:00    6    17     0 pci_dll_load
Apr 07 20:43:00    2    17     0 pci-bios: No BIOS present - Status 0xffffffff - errno 14!
Apr 07 20:43:00    2    17     0 pci-bios: HWI failed!
Apr 07 20:43:00    2    17     0 pci_server: No dll loaded!
Apr 07 20:43:10    2    19   1800 devb-mmcsd 1.00A (Apr  7 2014 14:03:47)
Apr 07 20:43:10    2     5     0 libcam.so (Jul  9 2010 13:53:08) bver 6040207
Apr 07 20:43:10    2    19   1800 sdhci_init: pci_attach failed

I got our pci bios as delivered as part of our Cinnamon Bay BSP to work and give us some useful verbose information.  I 
have attached a combination file of sloginfo and pci -v.  Look around line 908 for what happens when the software sees 
that 5th ethernet port.

Since I actually have source that I can recompile, any suggestions on changes I can make to increase debug information 
is doable now.

Does anything in the latest sloginfo point out an issue with memory allocation?

Thanks.

Ray
Attachment: Text debug.txt 75.43 KB
Re: Get a Alloc Mem error in e1000  
Well there is something really wrong here if it cannot even find the BIOS.
The first thing that the PCI server does is to look for the BIOS and if it
cannot find it, it puts out the message you see in sloginfo.



On 2014/4/7, 4:46 PM, "Ray Mack" <community-noreply@qnx.com> wrote:

>Hugh:
>
>I finally sorted out all of my tool issues.  A lot of newbie mistakes...
>
>I finally got the pci bios you sent installed but it does not start up
>correctly in our system.  It does not play well with the rest of the
>system.  The sloginfo output is really short:
>
># sloginfo
>Time             Sev Major Minor Args
>Apr 07 20:43:00    6    17     0 pci_dll_load
>Apr 07 20:43:00    2    17     0 pci-bios: No BIOS present - Status
>0xffffffff - errno 14!
>Apr 07 20:43:00    2    17     0 pci-bios: HWI failed!
>Apr 07 20:43:00    2    17     0 pci_server: No dll loaded!
>Apr 07 20:43:10    2    19   1800 devb-mmcsd 1.00A (Apr  7 2014 14:03:47)
>Apr 07 20:43:10    2     5     0 libcam.so (Jul  9 2010 13:53:08) bver
>6040207
>Apr 07 20:43:10    2    19   1800 sdhci_init: pci_attach failed
>
>I got our pci bios as delivered as part of our Cinnamon Bay BSP to work
>and give us some useful verbose information.  I have attached a
>combination file of sloginfo and pci -v.  Look around line 908 for what
>happens when the software sees that 5th ethernet port.
>
>Since I actually have source that I can recompile, any suggestions on
>changes I can make to increase debug information is doable now.
>
>Does anything in the latest sloginfo point out an issue with memory
>allocation?
>
>Thanks.
>
>Ray
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post109833
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: Get a Alloc Mem error in e1000  
I must have taken too long to compose my last message and it disappeared when I did save :-(
Is there a more interactive way to do this rather than clogging up the forum with a million messages?

I looked through server.c and did an fgrep on BIOS in my BSP tree.  I suspect that maybe the file you sent was for a "
regular" BIOS and we are doing fastboot.  Is that a possible source of the the problem?  We are using version 6.4.1 
Cinnamon Bay BIOS so we may be behind the version that is shipping with QNX version 6.5.0, but just guessing at that.  I
 did not find "BIOS" or "pci_dll_load" in a slog message in my version of server.c.

Is it possible to send just the few lines of code that you changed in server.c (guessing it was that small a change) and
 the original lines so I can compare and do the changes in our local copy?

Thanks.

Re: Get a Alloc Mem error in e1000  
I suspect this points to the issue (from the file pinfo.mk):

define PINFO
PINFO DESCRIPTION=Intel 854 non-BIOS PCI server
endef

But then again, I have been confused by the variations in this project before.
Re: Get a Alloc Mem error in e1000  
I finally understand what is happening.  I am not sure how to resolve it.

So, the PCI server allocates a block of memory for all busses from 0xff900000 to 0xffdfffff.  There are a number of 
devices that are on Bus 1 that start allocating that memory in fairly small chunks starting at 0xffdfffff and working 
down.  

Next the 82574 driver grabs 0x24000 in memory starting at 0xff900000.  It grabs a full 1 MB of memory even though it 
only needs a little more than 128kB. Both requests are given an alignment value of 0x80000.

Then the driver for the Intel 82580 in e1000 starts grabbing memory.  It grabs two buffers for each ethernet port in the
 52850. the first is 0x80000 bytes and the second is 0x4000.  The problem is that for some reason *both* allocation 
requests are given an alignment value of 0x80000.  That means we only need 16kB for that small buffer but we chew up an 
entire 1 MB of memory for the two buffers.

By the time it allocates buffers for the first 4 ethernet ports, we have chewed up 4 MB of memory when the devices 
arguably only need 2 MB plus another 64 kB.

Now that 5th ethernet port comes along and *should* be able to grab 1/2 MB for its big buffer at 0xffd00000 and another 
16 kB at 0xffd80000 for its small buffer.  However, since the request sets a 0x80000 alignment, the request fails.

So, is there some reason that the e1000 driver needs to have those memory buffers on 1 MB boundaries?  Is there memory 
available at 0xff800000 that would give us the space we need for one more buffer?

Thanks.
Re: Get a Alloc Mem error in e1000  
The PCI server determines the size of the memory/I/O aperture by writing
all F¹s to the register and then reading it back. You can see the size of
the apertures by starting the PCI server with Œ-vvv¹ and looking at the
sloginfo output. There you should see something like ³MEM 0xffc00000
0x80000². This is where the PCI server has determined the size of the
aperture. You could maybe expand the find_all() function in the PCI server
to dump the base address registers to see what the BIOS assigns to them.



On 2014/4/14, 6:17 PM, "Ray Mack" <community-noreply@qnx.com> wrote:

>I finally understand what is happening.  I am not sure how to resolve it.
>
>So, the PCI server allocates a block of memory for all busses from
>0xff900000 to 0xffdfffff.  There are a number of devices that are on Bus
>1 that start allocating that memory in fairly small chunks starting at
>0xffdfffff and working down.
>
>Next the 82574 driver grabs 0x24000 in memory starting at 0xff900000.  It
>grabs a full 1 MB of memory even though it only needs a little more than
>128kB. Both requests are given an alignment value of 0x80000.
>
>Then the driver for the Intel 82580 in e1000 starts grabbing memory.  It
>grabs two buffers for each ethernet port in the 52850. the first is
>0x80000 bytes and the second is 0x4000.  The problem is that for some
>reason *both* allocation requests are given an alignment value of
>0x80000.  That means we only need 16kB for that small buffer but we chew
>up an entire 1 MB of memory for the two buffers.
>
>By the time it allocates buffers for the first 4 ethernet ports, we have
>chewed up 4 MB of memory when the devices arguably only need 2 MB plus
>another 64 kB.
>
>Now that 5th ethernet port comes along and *should* be able to grab 1/2
>MB for its big buffer at 0xffd00000 and another 16 kB at 0xffd80000 for
>its small buffer.  However, since the request sets a 0x80000 alignment,
>the request fails.
>
>So, is there some reason that the e1000 driver needs to have those memory
>buffers on 1 MB boundaries?  Is there memory available at 0xff800000 that
>would give us the space we need for one more buffer?
>
>Thanks.
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post109915
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: Get a Alloc Mem error in e1000  
A quick test to see why my posts are not making it to the forum.  I have tried at least 5 messages recently that have 
not made it to the forum.

I know what is happening just not why.  devb-mmcsd is starting libcam.so which gets 0x100 bytes from ethernet memory and
 cam-disk.so is getting allocated 0x400 bytes from ethernet memory.

If this post works, I'll try again with appropriate information.