tech-embed archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Embedded NetBSD?
Tervehdys
I dont know if this helps but it is something
that I hit while porting netbsd to custom m68k system
that has the network and serial interrupt levels 'backwards'.
At least the symptons are the same.
Originally I had the spl-level as the hardware
has them (the lan has higher level
than the serial devices):
#define splhigh() spl7()
#define splserial() _splraise(PSL_S|PSL_IPL4)
#define splsched() spl7()
#define splclock() spl6()
#define splstatclock() spl6()
#define splimp() _splraise(PSL_S|PSL_IPL5)
#define spltty() _splraise(PSL_S|PSL_IPL4)
#define splsoftseril() spl5()
#define splnet() spl5()
#define splbio() spl2()
#define splsoftnet() spl1()
#define splsoftclock() spl1()
So I tried to be clever and run as low level as possible eg.
splserial() would possibly raise the level so that the uart
interrupts are blocked if not already running at higher level.
But this didn't work. Under moderate load I got kernel page faults.
After changing the spl's
#define splserial() spl7()
#define splimp() spl5()
#define spltty() spl5()
After this change things started to work, but now I'm
running at too high level. If anybody has any suggestions let me know.
73's de ari
"EXT John D. DeHart" <jdd%arl.wustl.edu@localhost> writes:
> David Brownlee wrote:
> > On Mon, 1 May 2000, John D. DeHart wrote:
> >
> > > We are currently trying to debug an embedded system of our own design
> > > with a Pentium processor on which we are running a NetBSD kernel with
> > > the file system in a memory disk.
> > >
> > > Under moderate ping traffic our system is crashing with kernel page
> > > faults which I believe are caused by memory corruption. I think this,
> > > because, if I turn on POOL_DIAGNOSTIC, that diagnostic code often
> > > catches inconsistencies in the mbuf memory pools before it gets to the
> > > point of a kernel page fault.
> > >
> > > At this point we cannot say whether the problem is hardware or
> > > software. We are attacking it from many different angles.
> > >
> > > I'm wondering if there is anyone else who is working with an embedded
> > > NetBSD system that might have some suggestions on anything special
> > > that has to be configured for vm and paging to work right in such a
> > > system.
> >
> > I've not worked in an embedded environment, but on the offchance
> > I might be able to come up with a helpful suggestion...
> >
> > Are you using an existing network driver, or have you written
> > your own? Is is possible you're missing an splnet() call?
> > You could start bracketing sections of code in splhigh() to ensure
> > you're not taking an interrupts at an unhelpful time.
> >
> > What other hardware is hooked up to the machine at this point -
> > serial console?
> >
> > David/absolute
> > -- www.netbsd.org: Value design over
> > hype --
>
> David,
>
> I'll also list the hardware that is on our system at the end here, but for
> anyone interested
> in more details, here is a talk that I gave about the system at a recent
> workshop:
> http://www.arl.wustl.edu/arl/projects/ann/slides/spc.ppt
> http://www.arl.wustl.edu/arl/projects/ann/slides/spc.pdf
>
> This system will plug into our prototype ATM switches which are already
> operational.
> We also have an APIC Nic that plugs into a standard PCI bus that works with
> the
> same driver in a normal PC. We have not had any similar problems in that
> environment.
> I suspect we have splnet() in the right places, but I'll double check.
>
> As we see it, the major differences in the two environments are:
> 1. The hardware. Smart Port Card (SPC: our embedded system) in the switch
> vs.
> APIC Nic in a standard PC.
>
> 2. The NetBSD kernel using a ramdisk filesystem
>
> 3. Use of our own bootloader and BIOS
>
>
> Thanks for any suggestions.
> John
>
> Here is the list of hardware components:
>
> Network Device: APIC
> 1 Gb/s ATM Nic Chip of our own design
> Driver we developed.
>
> Pentium Embedded Module
> 166 MHz MMX Pentium Processor
> L1 Cache: 16KB Data, 16KB Code
> L2 cache: 512 KB
> NorthBridge (430HX) - 33 MHz, 32 bit PCI Bus
>
> System FPGA
> Xilinx XC4020XL-1 FPGA
> Replaces some of the PIIX3 (south bridge)
> Replaces some of the BIOS
> Replaces some of the Super IO Chip
>
> Memory
> EDO DRAM
> 64MB
> 144 pin SODIMM
>
> Switch Interface - 1 Gb Utopia
>
> Link Interface - 1 Gb Utopia
>
> UART
> Two Serial Ports
> NetBSD system console
> TTY port
Home |
Main Index |
Thread Index |
Old Index