Opened 14 years ago

Closed 8 years ago

#5146 closed bug (fixed)

get_nth_pci_info missing

Reported by: andrewbachmann Owned by: axeld
Priority: low Milestone: R1
Component: System/libroot.so Version: R1/Development
Keywords: get_nth_pci_info Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by mmadia)

I was trying to run BeRometer to do some performance testing and it complains about this symbol missing. The symbol is in libroot.so on BeOS R 5.

Attachments (5)

get_pci_nth.patch (863 bytes ) - added by BeSman 13 years ago.
BeRometer works well now, but it needs a libmail from BeOS R5 becose it using some undocumented API from it, patch for haiku`s libmail is work-in-progress
0001-Added-stub-for-get_nth_pci_info.-BeRometer-works-now.patch (1.1 KB ) - added by diver 12 years ago.
Added stub for get_nth_pci_info. BeRometer works now.
BeRometer.results_without_whetstone (539 bytes ) - added by Premislaus 12 years ago.
BeRometer_bt.JPG (74.8 KB ) - added by Premislaus 12 years ago.
BeRometer.zip (743.6 KB ) - added by diver 9 years ago.
BeRometer binary with a patched libroot.so. Whetstone test deadlocks Haiku.

Download all attachments as: .zip

Change History (19)

comment:1 by axeld, 14 years ago

But it's also private API. Nevertheless, a nice API to enumerate the hardware (something more/better than the info that is in the device tree) would be appreciated.

in reply to:  1 comment:2 by andrewbachmann, 14 years ago

Replying to axeld:

But it's also private API. Nevertheless, a nice API to enumerate the hardware (something more/better than the info that is in the device tree) would be appreciated.

Yeah, it's private API. Some other programs are also using it. Should we add a stub for the method/symbol and get around to flushing it out later when doing the stack of nice-to-haves?

by BeSman, 13 years ago

Attachment: get_pci_nth.patch added

BeRometer works well now, but it needs a libmail from BeOS R5 becose it using some undocumented API from it, patch for haiku`s libmail is work-in-progress

comment:3 by BeSman, 13 years ago

patch: 01

in reply to:  3 ; comment:4 by siarzhuk, 13 years ago

Replying to BeSman:

BeRometer works well now, but it needs a libmail from BeOS R5 becose it using some undocumented API from it, patch for haiku`s libmail is work-in-progress

long get_nth_pci_info(long index,pci_info *info) 
{ 
    pci_module_info *mod_info; 
    if(mod_info->get_nth_pci_info(index,info)) 
        return B_NO_ERROR; 
    else  
        return B_ERROR; 
}

Please explain what are you trying to do here. Thanks.

BTW, read the Coding Guidelines too. ;-)

comment:5 by BeSman, 13 years ago

Im provided a BeOS R5 compatible callback for get_nth_pci_info() function which we have in pci bus manager but not in libroot.so

in reply to:  4 comment:6 by phoudoin, 13 years ago

mod_info is unset, your code will most probably crash at pointer dereference on next line. You clearly never test this code ;-)

Last edited 13 years ago by phoudoin (previous) (diff)

comment:7 by anevilyak, 12 years ago

patch: 10

comment:8 by mmadia, 12 years ago

Description: modified (diff)

comment:9 by diver, 12 years ago

patch: 01

comment:10 by diver, 12 years ago

Version: R1/alpha1R1/Development

by diver, 12 years ago

Added stub for get_nth_pci_info. BeRometer works now.

in reply to:  10 comment:11 by Premislaus, 12 years ago

Replying to diver:

Thanks! BeRometer works good, but whetstone test deadlocks Haiku ;).

Too bad that this program does not save the results in columns. And that does not save what means another results.

Could you check this program - BeBench?

Version 1, edited 12 years ago by Premislaus (previous) (next) (diff)

by Premislaus, 12 years ago

by Premislaus, 12 years ago

Attachment: BeRometer_bt.JPG added

comment:13 by jackburton, 9 years ago

Can we close this ?

by diver, 9 years ago

Attachment: BeRometer.zip added

BeRometer binary with a patched libroot.so. Whetstone test deadlocks Haiku.

comment:14 by pulkomandy, 8 years ago

Resolution: fixed
Status: newclosed

Patch applied in hrev50554. BeRoMeter now works. I didn't retry the whetstone test. I also noticed that the BeRoMeter installer complains that I have only -94MB of RAM. I guess it overflows somewhere when there are more than 2GB on the system, but I could test diver's binary.

Note: See TracTickets for help on using tickets.