[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: vpd query
Don't use a single bit to identify the state that your
hardware is in. Instead have 3 bits:
- PCI status bit that is read back by config read accesses
- currently_reading bit that gets set when a 0 write occurrs
- currently_writing bit that gets set when a 1 write occurrs
And have all of the appropriate changing of the bits done when the right
Basically make a small state machine that does your task.
On Wed, 22 Nov 2000, Mario da Costa wrote:
> firstname.lastname@example.org wrote:
> > Hi there,
> > For a multiple function device, we know the first function header type has to be set 0x8x, but what about the other functions' header types of this same device? should we set their hearder types as 0x8x also?
> > thanks
> > Paul Yang C.M.
> > Philips Semiconductors
> Thanks for your reply, however I think you have misunderstood my doubt.
> I am copying and pasting my previous mail below. I am pretty clear about
> how the VPD registers are accessed through the CApabilities list. What
> baffles me is how the data transfer will take place between the VPD
> hardware device and the system. Especially after a read operation, when
> the harware device sets the flag to 1 to indicate that the system can
> now read the data, what happens when the system wants to write to the
> VPD device ? If the flag is already 1, then will this not lead to some
> confusion ??? Especially if the system wants to write data immediately
> after it reads the VPD data.
> Part of my previous mail is below :
> You are familiar with the procedure to read and write the VPD data.
> Supposing Software is reading the data, it writes the VPD address (how
> does it know this address i.e. what to write in the VPD address register
> ????) and sets the flag to zero.
> hardware fetches the data places it in the VPD data reg, then it sets
> the flag to one.
> software will see this flag as one, then read the data.
> my doubt is after this what happens to the flag ?? will it remain one
> and if it does, will the hardware on seeing this one assume that now the
> software wants to write VPD data ? Will this not lead to some amount of
> confusion. ??
> Best Regards,
> ..... in life, there is more imagination
> than in all our dreams .....
-- Neal Palmer
The Dini Group
1010 Pearl St #6
La Jolla, CA 92037
(858) 454-3419 x16
(858) 454-1728 (Fax)