hi~
when is use grub-2.06 for uefi. grub_efi_open_protocol to
opening pci protocol, i can grub_efi_pci_io_t *pci, but when i
use 'grub_efi_pci_io_t *pci' for pci config (like
this. pci->pci.read(pci, GRUB_EFI_PCI_IO_WIDTH_UINT16, 0, 1,
&vid); codes ) . i can't get each for pci configs. i print the return
3. could you help me how to use this. thanks!
`
handles = grub_efi_locate_handle (GRUB_EFI_BY_PROTOCOL, &pci_io_guid,
0, &num_handles);
if (!handles) {
grub_printf
("1111111111111111111handles is failed!\n");
return;
}
for (handle = handles; num_handles--; handle++) {
grub_efi_pci_io_t *pci;
grub_efi_device_path_t
*dp, *ldp;
dp =
grub_efi_get_device_path (*handle);
if (!dp) {
grub_printf ("222222222222222222222222dp is failed!\n");
continue;
}
ldp =
grub_efi_find_last_device_path (dp);
if (! ldp) {
grub_printf ("33333333333333ldp is failed!\n");
continue;
}
pci =
grub_efi_open_protocol (*handle, &pci_io_guid,
GRUB_EFI_OPEN_PROTOCOL_GET_PROTOCOL);
//pci =
grub_efi_locate_protocol (&pci_io_guid, NULL);
if (!pci) {
grub_printf ("4444444444444444444444444444pci is failed!\n");
continue;
}
pci->pci.read(pci,
GRUB_EFI_PCI_IO_WIDTH_UINT16, 0, 1, &vid);
pci->pci.read(pci,
GRUB_EFI_PCI_IO_WIDTH_UINT16, 2, 1, &pid);
`