Opened 10 years ago

Closed 3 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:
Has a Patch: yes 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 8 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 7 years ago.
Added stub for get_nth_pci_info. BeRometer works now.
BeRometer.results_without_whetstone (539 bytes) - added by Premislaus 7 years ago.
BeRometer_bt.JPG (74.8 KB) - added by Premislaus 7 years ago.
BeRometer.zip (743.6 KB) - added by diver 4 years ago.
BeRometer binary with a patched libroot.so. Whetstone test deadlocks Haiku.

Download all attachments as: .zip

Change History (19)

comment:1 Changed 10 years ago by 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.

comment:2 in reply to:  1 Changed 10 years ago by andrewbachmann

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?

Changed 8 years ago by BeSman

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 Changed 8 years ago by BeSman

Has a Patch: set

comment:4 in reply to:  3 ; Changed 8 years ago by siarzhuk

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 Changed 8 years ago by BeSman

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

comment:6 in reply to:  4 Changed 8 years ago by phoudoin

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

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

comment:7 Changed 8 years ago by anevilyak

Has a Patch: unset

comment:8 Changed 7 years ago by mmadia

Description: modified (diff)

comment:9 Changed 7 years ago by diver

Has a Patch: set

comment:10 Changed 7 years ago by diver

Version: R1/alpha1R1/Development

Changed 7 years ago by diver

Added stub for get_nth_pci_info. BeRometer works now.

comment:11 in reply to:  10 Changed 7 years ago by Premislaus

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 7 years ago by Premislaus (previous) (next) (diff)

Changed 7 years ago by Premislaus

Changed 7 years ago by Premislaus

Attachment: BeRometer_bt.JPG added

comment:13 Changed 5 years ago by jackburton

Can we close this ?

Changed 4 years ago by diver

Attachment: BeRometer.zip added

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

comment:14 Changed 3 years ago by pulkomandy

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.