pci support
Hi!
I was wondering if there was still an interest in pci support as discussed previously. That is a general interface exported by a module such as
struct grub_pci_support
{
/* My name. */
const char *name;
void (*init)(void); void (*fini)(void); void (*adjust) (grub_pci_device_t p);
/* Base Address Register helper functions. There are up to 6 BARs
PCI_BASE_ADDRESS_{[0-5]} in the configuration space of each device */
unsigned long (*bar_start) (grub_pci_device_t, unsigned int bar); unsigned long (*bar_size) (grub_pci_device_t, unsigned int bar);
int (*find_capability) (grub_pci_device_t, int cap);
/* Call HOOK with each pci device. */ grub_err_t (*iterate) (int (*hook) (grub_pci_device_t));
/* Fill the pci device structure (romaddr, ioaddr, membase, irq)*/ grub_err_t (*init_pdev) (grub_pci_device_t);
/* Low level io functions. */
struct grub_pci_io_support *io;
};
which allows multiple implementations such as one for instance from etherboot which I have now.
It was written original with the idea of importing the etherboot drivers so I don't know if it would still be usefull. The implementation that I have uses direct pci access which maybe does not fit very well with the idea of using pxe later on as it will require dealing with some bios stuff anyway. It is basically usefull now for the lspci command which could be made to print some nice text just like the Linux lspci command.
If so, I can prepare a separated patch for it and prepare the changelog.
Cheers,
--
Vincent Guffens
Quoted 5 lines · vincent guffens
Hi!
I was wondering if there was still an interest in pci support as discussed previously. That is a general interface exported by a module such as
Yes there is, in example PCI support would be enable usage of more ATA Controllers than legacy ports support. PCI device enumeration could be used to scan for ports to access those other controllers in system.
Quoted 6 lines
If so, I can prepare a separated patch for it and prepare the changelog.
Cheers,
--
Vincent Guffens
Please do :).
Thanks,
Vesa Jääskeläinen
vincent guffens <[email protected]> writes:
Hi Vincent,
Quoted 3 lines
I was wondering if there was still an interest in pci support as discussed previously. That is a general interface exported by a module such as
Yes, that will make it possible to implement all kinds of drivers and make something like lspci possible.
Sorry I still didn't start working on the networking stuff as planned. Scripting and other stuff occupies me longer than I originally expected. :)
--
Marco
Quoted 10 lines · Marco Gerards
vincent guffens <[email protected]> writes:
Hi Vincent,
Quoted 3 lines
I was wondering if there was still an interest in pci support as discussed previously. That is a general interface exported by a module such as
Quoted 6 lines
Yes, that will make it possible to implement all kinds of drivers and make something like lspci possible.
Sorry I still didn't start working on the networking stuff as planned. Scripting and other stuff occupies me longer than I originally expected. :)
Sure, no problem! In fact, I was wondering if it would be possible to have a discussion about the overall networking strategy that will be put in place for grub2 (and which is schedulled for the next release !).
As I understand, supporting the etherboot drivers is no longer the primary option. As it is out of the question to have its own set of driver, the UNDI driver seems like a good idea. However, UNDI support would constrain significantly the design of the network stack. In particular, it defines a lot of structure such as dhcp header, ipv4 addresses and so on. It also involves interruption while it was assumed previously that the interfaces would be polled.
There is also the option of calling etherboot from grub2, which seems quite appealing but I think I don't really quite get that.
cheers!
Quoted 14 lines · vincent guffens
Quoted 13 lines · Marco Gerards
vincent guffens <[email protected]> writes:
Hi Vincent,
Quoted 3 lines
I was wondering if there was still an interest in pci support as discussed previously. That is a general interface exported by a module such as
Yes, that will make it possible to implement all kinds of drivers and make something like lspci possible.
Quoted 7 lines
Quoted 3 lines
Sorry I still didn't start working on the networking stuff as planned. Scripting and other stuff occupies me longer than I originally expected. :)
Sure, no problem! In fact, I was wondering if it would be possible to have a discussion about the overall networking strategy that will be put in place for grub2 (and which is schedulled for the next release !).
Sure!
Quoted 7 lines
As I understand, supporting the etherboot drivers is no longer the primary option. As it is out of the question to have its own set of driver, the UNDI driver seems like a good idea. However, UNDI support would constrain significantly the design of the network stack. In particular, it defines a lot of structure such as dhcp header, ipv4 addresses and so on. It also involves interruption while it was assumed previously that the interfaces would be polled.
Well, I do not really know UNDI. I had the impression it was able to send and receive raw ehternet frames. Which is what I want, nothing more and nothing less.
At interrupt time, you can store the frames in a queue so they can be polled at a later moment. Or the design should be changed so interruptions can be supported. That's not a big issue I think.
Quoted 2 lines
There is also the option of calling etherboot from grub2, which seems quite appealing but I think I don't really quite get that.
Is that etherboot specific or is that the case for every UNDI implementation?
--
Marco
Quoted 40 lines · Marco Gerards
Quoted 16 lines · vincent guffens
Quoted 14 lines · Marco Gerards
vincent guffens <[email protected]> writes:
Hi Vincent,
Quoted 3 lines
I was wondering if there was still an interest in pci support as discussed previously. That is a general interface exported by a module such as
Yes, that will make it possible to implement all kinds of drivers and make something like lspci possible.
Quoted 7 lines
Quoted 3 lines
Sorry I still didn't start working on the networking stuff as planned. Scripting and other stuff occupies me longer than I originally expected. :)
Sure, no problem! In fact, I was wondering if it would be possible to have a discussion about the overall networking strategy that will be put in place for grub2 (and which is schedulled for the next release !).
Sure!
Quoted 7 lines
As I understand, supporting the etherboot drivers is no longer the primary option. As it is out of the question to have its own set of driver, the UNDI driver seems like a good idea. However, UNDI support would constrain significantly the design of the network stack. In particular, it defines a lot of structure such as dhcp header, ipv4 addresses and so on. It also involves interruption while it was assumed previously that the interfaces would be polled.
Quoted 7 lines
Well, I do not really know UNDI. I had the impression it was able to send and receive raw ehternet frames. Which is what I want, nothing more and nothing less.
At interrupt time, you can store the frames in a queue so they can be polled at a later moment. Or the design should be changed so interruptions can be supported. That's not a big issue I think.
yes, you can use it with a polling mechanism as well. But UNDI has a much more complex API then just sending and receiving raw frames. You have API calls to request a file via tftp or even mtftp, get the information received from the dhcp server, send UDP packets and so on. It would be waste, I think, to go through the work of supporting UNDI and not getting the entire benefit which would require a strong coordination between the PXE/UNDI code and the net code of grub2 (through the PXE specification)
Quoted 7 lines
Quoted 3 lines
There is also the option of calling etherboot from grub2, which seems quite appealing but I think I don't really quite get that.
Is that etherboot specific or is that the case for every UNDI implementation?
well, I just mentioned the idea that was raised by Okuji in an earlier post. That is what I meant and I don't know if I understood properly but etherboot implements a PXE stacks. So if a network card does not support it, it would be possible to use etherboot as the PXE stack. But I don't know how it would work. When etherboot is located in an extension rom, then maybe the bios can scan it and use it ? I am not sure but I have sent the question to the etherboot mailing list, I am waiting for some comments.
Quoted 17 lines · vincent guffens
Quoted 9 lines
Quoted 7 lines
As I understand, supporting the etherboot drivers is no longer the primary option. As it is out of the question to have its own set of driver, the UNDI driver seems like a good idea. However, UNDI support would constrain significantly the design of the network stack. In particular, it defines a lot of structure such as dhcp header, ipv4 addresses and so on. It also involves interruption while it was assumed previously that the interfaces would be polled.
Quoted 7 lines
Well, I do not really know UNDI. I had the impression it was able to send and receive raw ehternet frames. Which is what I want, nothing more and nothing less.
At interrupt time, you can store the frames in a queue so they can be polled at a later moment. Or the design should be changed so interruptions can be supported. That's not a big issue I think.
Quoted 8 lines
yes, you can use it with a polling mechanism as well. But UNDI has a much more complex API then just sending and receiving raw frames. You have API calls to request a file via tftp or even mtftp, get the information received from the dhcp server, send UDP packets and so on. It would be waste, I think, to go through the work of supporting UNDI and not getting the entire benefit which would require a strong coordination between the PXE/UNDI code and the net code of grub2 (through the PXE specification)
The less we rely on PXE code, the less bugs we have to deal with I think. Most firmware implementations are full of bugs, I don't expect the PXE implementations are an exception.
Ad besides that, we need full networking support anyways. For example for the PPC port.
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
There is also the option of calling etherboot from grub2, which seems quite appealing but I think I don't really quite get that.
Is that etherboot specific or is that the case for every UNDI implementation?
Quoted 8 lines
well, I just mentioned the idea that was raised by Okuji in an earlier post. That is what I meant and I don't know if I understood properly but etherboot implements a PXE stacks. So if a network card does not support it, it would be possible to use etherboot as the PXE stack. But I don't know how it would work. When etherboot is located in an extension rom, then maybe the bios can scan it and use it ? I am not sure but I have sent the question to the etherboot mailing list, I am waiting for some comments.
Please let me know.
--
Marco