Port-ofppc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

ofppc port is started on MPC8260 FADS board



Hi, All
Recently I've executed ofppc port on MPC8260 FADS board. Now it starts
in single user mode and executed simple command, such as ls and ps :-).

The details:
Ofppc port is started unchanged. Devices are accepted through Open
Firmware Generic Drivers. Now supported only network device (Ethernet)
on FCC2 and console device on SCC. ATM drivers and virtual disk to be
implemented in future. Root device is mounted on network device.
Open Firmware implementation for this board is written as my diploma
project and now is going to be published. The exact location is become
to be defined more precisely.

The problems:
1. There are problems with NFS access. Every request is sent twice. So
time of access to NFS disk is incredible high. I suppose there is a bug
in my implementation of Open Firmware, but I don't know exactly. Now I'm
seeking for the error.

2. There is a problem with ofnet driver. According to Open Firmware
standard,
network device should return 0 as len of received packet, if
there are no new packets received. (addition requirements for the read
method).

The code from ofnet.c, function ofnet_read()
----------
while(1){
  if ((len =3D OF_read(of->sc_ihandle, buf, sizeof buf)) < 0) {
   if (len =3D=3D -2 || len =3D=3D 0)
    return;
   ifp->if_ierrors++;
   continue;
  }
...
}
----------
The only chance to leave infite loop is receive negative value of length
from Open Firmware.
So, the return value of 0 is treated as the packet is received, and  driver
will hang-up. I've patched driver inside my Open Firmware implementation,
but I think it is wrong.
May be, I don't understand some statements of Open Firmware standard?




Home | Main Index | Thread Index | Old Index