Broadcom Management API PDF
Broadcom Management API PDF
Broadcom Corporation reserves the right to make changes to the products or information contained
in this document without notice. No liability is assumed as a result of their use or application. No
rights under any patent accompany the sale of any such products or information.
Broadcom Corporation
5300 California Avenue
Irvine CA 92617
www.broadcom.com
page ii
Broadcom Confidential and Proprietary
Broadcom Management API
1. REVISION HISTORY..........................................................................................................................1
2. INTRODUCTION .................................................................................................................................5
3. BLOCK DIAGRAM..............................................................................................................................6
4. IMPLEMENTATION...........................................................................................................................7
5. API REFERENCE ................................................................................................................................8
5.1 BmapiGetVersion ..........................................................................................................................8
5.2 BmapiInitialize...............................................................................................................................8
5.3 BmapiUninitialize ..........................................................................................................................9
5.4 BmapiGetNumPhyNic ...................................................................................................................9
5.5 BmapiGetAllPhyNic ....................................................................................................................10
5.6 BmapiGetNumUnassignedNic.....................................................................................................11
5.7 BmapiGetAllUnassignedNic........................................................................................................11
5.8 BmapiGetNumTeam ....................................................................................................................12
5.9 BmapiGetAllTeam .......................................................................................................................12
5.10 BmapiApplyLBFOCfg.................................................................................................................13
5.11 BmapiGetTeamListSnapShot.......................................................................................................14
5.12 BmapiGetTeamSnapShot.............................................................................................................15
5.13 BmapiGetTeamStatisticsSnapShot ..............................................................................................15
5.14 BmapiDoNicIOCTL ....................................................................................................................16
5.15 BmapiGetNicStatistics .................................................................................................................17
5.16 BmapiRetrieveLinkStatus ............................................................................................................17
5.17 BmapiGetBRCMNicInfo .............................................................................................................18
5.18 BmapiTestControlRegisters .........................................................................................................19
5.19 BmapiTestMIIRegisters ...............................................................................................................20
5.20 BmapiTestEEPROM....................................................................................................................20
5.21 BmapiTestInternalMemory ..........................................................................................................21
5.22 BmapiTestInterrupt ......................................................................................................................22
5.23 BmapiTestLoopBack ...................................................................................................................22
5.24 BmapiTestCPU ............................................................................................................................23
5.25 BmapiTestLEDs...........................................................................................................................24
5.26 BmapiGetServiceName................................................................................................................25
5.27 BmapiGetBRCMNicStatistics......................................................................................................25
5.28 BmapiForceBRCMNicLinkSpeed ...............................................................................................26
5.29 BmapiLBFOSoftwareStatus.........................................................................................................27
5.30 BmapiGetPnpDevId.....................................................................................................................27
5.31 BmapiSuspendDriver...................................................................................................................28
5.32 BmapiResumeDriver....................................................................................................................29
5.33 BmapiEnableDevice ....................................................................................................................30
5.34 BmapiRegisterEvent ....................................................................................................................30
5.35 BmapiUnRegisterEvent ...............................................................................................................32
5.36 BmapiInitializeEx ........................................................................................................................32
5.37 BmapiIsInitialized........................................................................................................................33
5.38 BmapiGetBRCMNicParam..........................................................................................................33
5.39 BmapiSetBRCMNicParam ..........................................................................................................33
5.40 BmapiGetMultiBRCMNicParams ...............................................................................................33
5.41 BmapiSetMultiBRCMNicParams ................................................................................................34
5.42 BmapiRefreshData .......................................................................................................................34
5.43 BmapiGetHandleByServiceName................................................................................................34
5.44 BmapiIMOnlineDevice................................................................................................................35
5.45 BmapiGetNicStatistics64 .............................................................................................................35
5.46 BmapiGetNicPciInfo....................................................................................................................36
page iii
Broadcom Confidential and Proprietary
Broadcom Management API
5.47 BmapiInitDiag..............................................................................................................................37
5.48 BmapiUnInitDiag.........................................................................................................................37
5.49 BmapiGetNumPhyNicEx.............................................................................................................38
5.50 BmapiGetAllPhyNicHandles .......................................................................................................38
5.51 BmapiGetPhyNic .........................................................................................................................39
5.52 BmapiGetASFTable.....................................................................................................................40
5.53 BmapiSetASFTable .....................................................................................................................41
5.54 BmapiGetBIOS ............................................................................................................................41
5.55 BmapiTestControlRegistersEx.....................................................................................................42
5.56 BmapiTestMIIRegistersEx...........................................................................................................42
5.57 BmapiTestEEPROMEx ...............................................................................................................43
5.58 BmapiTestInternalMemoryEx......................................................................................................44
5.59 BmapiTestInterruptEx..................................................................................................................44
5.60 BmapiTestLoopBackEx ...............................................................................................................45
5.61 BmapiTestCPUEx........................................................................................................................46
5.62 BmapiTestLEDsEx ......................................................................................................................46
5.63 BmapiSuspendDriverEx ..............................................................................................................47
5.64 BmapiResumeDriverEx ...............................................................................................................47
5.65 BmapiGetFirmwareInfo ...............................................................................................................48
5.66 BmapiTestASF.............................................................................................................................49
5.67 BmapiWriteFirmware ..................................................................................................................49
5.68 BmapiReadFirmware ...................................................................................................................50
5.69 BmapiGetSystemASFTables........................................................................................................51
5.70 BmapiGetBrcmVirNic .................................................................................................................51
5.71 BmapiReadNicMem.....................................................................................................................52
5.72 BmapiWriteNicMem....................................................................................................................52
5.73 BmapiGetIpAddrInfo...................................................................................................................53
5.74 BmapiTestNetwork ......................................................................................................................54
5.75 BmapiGetPowerMode..................................................................................................................55
5.76 BmapiSetPowerMode ..................................................................................................................55
5.77 BmapiGetBRCMNicInfoEx.........................................................................................................56
5.78 BmapiGetLastDiagPort................................................................................................................57
5.79 BmapiWriteFirmwareInfo............................................................................................................57
5.80 BmapiGetTTBRCMNicInfo ........................................................................................................58
5.81 BmapiGetPHYStatus ...................................................................................................................58
5.82 BmapiSetPHYStatus ....................................................................................................................58
5.83 BmapiRetrieveLinkStatusEx........................................................................................................59
5.84 BmapiTestLEDsEx2 ....................................................................................................................60
5.85 BmapiGetNicStatistics64Ex.........................................................................................................60
5.86 BmapiGetTeamSnapShot2...........................................................................................................61
5.87 BmapiTeamFallbackPrimary .......................................................................................................62
5.88 BmapiGetTeamDrvVersion .........................................................................................................62
5.89 BmapiGetBRCMNicStatisticsEx .................................................................................................63
5.90 BmapiGetBrcmNicParamList ......................................................................................................64
5.91 BmapiGetBrcmNicParamInfo......................................................................................................64
5.92 BmapiSetBrcmNicParam2 ...........................................................................................................66
5.93 BmapiGetVbdEnumInfo ..............................................................................................................67
5.94 BmapiSetVbdEnumInfo...............................................................................................................67
5.95 BmapiGetLicenseKey ..................................................................................................................68
5.96 BmapiSetLicenseKey...................................................................................................................69
5.97 BmapiGetResourceConfig ...........................................................................................................69
5.98 BmapiSetResourceConfig............................................................................................................70
5.99 BmapiGetTeamIDList..................................................................................................................71
5.100 BmapiGetTeamInfo .................................................................................................................71
5.101 BmapiApplyLBFOCfgEx........................................................................................................72
page iv
Broadcom Confidential and Proprietary
Broadcom Management API
5.102 BmapiGetTeamStatisticsSnapShotEx......................................................................................73
5.103 BmapiGet5706FwInfo .............................................................................................................73
5.104 BmapiTestLEDsAsyncStart.....................................................................................................74
5.105 BmapiTestLEDsAsyncStop.....................................................................................................74
5.106 BmapiGetASFMailboxCount ..................................................................................................75
5.107 BmapiGetASFMailboxStatus ..................................................................................................76
5.108 BmapiSetASFMailboxStatus...................................................................................................76
5.109 BmapiGetASFMailboxContents..............................................................................................77
5.110 BmapiSetASFMailboxContents ..............................................................................................78
5.111 BmapiTestASFMailboxes .......................................................................................................78
5.112 BmapiTestCable ......................................................................................................................79
5.113 BmapiGetOffloadStackInfo.....................................................................................................80
5.114 BmapiGetISCSIConfig............................................................................................................80
5.115 BmapiSetISCSIConfig.............................................................................................................81
5.116 BmapiGet57710FwInfo ...........................................................................................................81
5.117 BmapiGetMgmtProcessors ......................................................................................................82
5.118 BmapiGetMgmtEnableState ....................................................................................................83
5.119 BmapiSetMgmtEnableState.....................................................................................................83
5.120 BmapiAssertMgmtEvent .........................................................................................................84
5.121 BmapiGetMgmtOTPKeys .......................................................................................................85
5.122 BmapiGetMgmtDataLength ....................................................................................................85
5.123 BmapiGetMgmtData................................................................................................................86
5.124 BmapiSetMgmtData ................................................................................................................87
5.125 BmapiGetMgmtConfigLength.................................................................................................87
5.126 BmapiGetMgmtConfig ............................................................................................................88
5.127 BmapiSetMgmtConfig.............................................................................................................88
5.128 BmapiGetMgmtSharedMem....................................................................................................89
5.129 BmapiGetISCSIConfig2..........................................................................................................90
5.130 BmapiSetISCSIConfig2...........................................................................................................91
5.131 BmapiWritePhyFirmware........................................................................................................92
5.132 BmapiCreateMgmtData...........................................................................................................92
5.133 BmapiGetMgmtWebDataLength.............................................................................................93
5.134 BmapiGetMgmtWebData ........................................................................................................94
5.135 BmapiSetMgmtWebData.........................................................................................................94
5.136 BmapiCreateMgmtWebData ...................................................................................................95
5.137 BmapiRetrieveMultiLinkStatus ...............................................................................................96
5.138 BmapiGetISCSIRuntimeIPCount ............................................................................................96
5.139 BmapiGetISCSIRuntimeIP......................................................................................................97
5.140 BmapiGetISCSIRuntimeStatistics ...........................................................................................98
5.141 BmapiGetISCSISessionStatistics ............................................................................................98
5.142 BmapiResetNdisStatistics........................................................................................................99
5.143 BmapiWriteFirmware2 ............................................................................................................99
5.144 BmapiReadFirmware2...........................................................................................................100
5.145 BmapiGetReverseNWayStatus..............................................................................................101
5.146 BmapiSetReverseNWay ........................................................................................................102
5.147 BmapiGetNicStatisticsV3......................................................................................................102
5.148 BmapiOfldStatistics...............................................................................................................103
6. QUICK PROGRAMMING GUIDE ................................................................................................105
6.1 How to get physical network adapter information? ...................................................................105
6.2 How to get handle to a physical network adapter? ....................................................................105
6.3 How to do diagnoctics?..............................................................................................................105
6.4 How to do ASF? ........................................................................................................................105
6.5 How to tell which type of NIC it is? ..........................................................................................106
7. APPENDIX ........................................................................................................................................107
page v
Broadcom Confidential and Proprietary
Broadcom Management API
page vi
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
1. Revision History
page 1
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
4. Modify BmapiGetFirmwareInfo().
5. Modify BmapiGetPowerMode().
6. Modify BmapiSetPowerMode().
7. Modify BmapiWriteFirmwareInfo().
3.0.7 9/24/02 Hao-Yang Feng Add 'MaxSpeed' in
BM_BRCM_ADAPTER_INFO_EX.
3.0.9 10/16/02 Hao-Yang Feng Add BmapiGetTTBRCMNicInfo()
3.0.10 10/21/02 Hao-Yang Feng Add supported network adapter information to each
API.
3.0.13 11/8/02 Hao-Yang Feng 1. Add BmapiSetPHYStatus().
2. Add BmapiGetPHYStatus()
3. Add ‘DisablePowerSaving’ bit.
6.1.0 3/19/03 Hao-Yang Feng Add BmapiRetrieveLinkStatusEx().
6.1.2 5/5/03 Hao-Yang Feng 1. Add BmapiTestLEDsEx2().
2. Support PXE version in
BmapiGetFirmwareInfo().
3. Change the way to show debug message for
BMAPI.
6.2.1 7/22/03 Hao-Yang Feng 1. Enhancement BmapiTestLoopBackEx() and
BmapiTestLoopBack() to support
BMAPI_LOOPBACK_TYPE_EXTERNAL
option for 570x based NICs.
2. Add BmapiGetNicStatistics64Ex().
6.2.4 9/8/03 Hao-Yang Feng Enhance BM_LINK_STATUS_EX.
6.3.0 10/14/03 Hao-Yang Feng 1. Add BmapiGetTeamSnapShot2()
2. Add BmapiTeamFallbackPrimary()
3. Add BmapiGetTeamDrvVersion()
4. Enhance BM_LINK_STATUS_EX
6.3.5 12/18/03 Hao-Yang Feng Update Appendix section.
6.3.7 1/16/04 Hao-Yang Feng Update Appendix section.
6.4.0 2/18/04 Hao-Yang Feng 1. Add BmapiGetBRCMNicStatisticsEx()
2. Obsolete BmapiGetTTBRCMNicInfo() and
BmapiGetLastDiagPort()
6.4.1 3/3/04 Hao-Yang Feng Modify BM_ASF_TABLE.
6.4.2 3/12/04 Hao-Yang Feng Modify BmapiGetPowerMode() and
BmapiSetPowerMode().
6.4.8 4/20/04 Hao-Yang Feng Change to BM_ASF_INFO and BM_ASF_ALRT
structures for ASF 2.0-compliance.
6.5.0 5/18/04 Hao-Yang Feng 1. Add BmapiGetBrcmNicParamList(),
BmapiGetBrcmNicParamInfo() and
BmapiSetBrcmNicParam2().
2. Obsolete BmapiGetBRCMNicParam(),
BmapiSetBRCMNicParam(),
BmapiGetMultiBRCMNicParams() and
BmapiSetMultiBRCMNicParams()
page 2
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
7.0.1 10/25/04 Hao-Yang Feng Support for NetXtreme II architecture (5706 series).
Due to the large scale of changes, please see each
individual API for detail information.
7.1.0 11/12/04 Hao-Yang Feng Add BmapiGetTeamIDList(), BmapiGetTeamInfo(),
BmapiApplyLBFOCfgEx() and
BmapiGetTeamStatisticsSnapShotEx().
7.2.6 1/19/05 Hao-Yang Feng Update 7.1 data structure and definitions.
7.2.7 1/25/05 Hao-Yang Feng Correct wring Notes for BmapiGetASFTable() and
BmapiSetASFTable().
7.2.10 2/17/05 Hao-Yang Feng Modify definitions for
BM_FW_MEDIA_MANUFACT_REGION and
BM_NIC_SHARED_CONFIG
7.2.11 2/28/05 Hao-Yang Feng Add more information for BmapiGetASFTable().
7.3.0 6/9/05 Hao-Yang Feng Add BmapiGet5706FwInfo(),
BmapiTestLEDsAsyncStart() and
BmapiTestLEDsAsyncStop().
7.4.0 2/1/06 Hao-Yang Feng Add BmapiGetASFMailboxCount(),
BmapiGetASFMailboxStatus(),
BmapiSetASFMailboxStatus(),
BmapiGetASFMailboxContents(),
BmapiSetASFMailboxContents() and
BmapiTestASFMailboxes().
7.5.0 3/8/06 Hao-Yang Feng Add BmapiTestCable().
7.6.0 11/20/06 Hao-Yang Feng Add BmapiGetOffloadStackInfo().
7.8.0 9/7/07 Hao-Yang Feng Add BmapiGetISCSIConfig(),
BmapiSetISCSIConfig() and
BmapiGet57710FwInfo().
7.9.0 2/27/08 Hao-Yang Feng Add BmapiGetMgmtProcessors(),
BmapiGetMgmtEnableState(),
BmapiSetMgmtEnableState(),
BmapiAssertMgmtEvent(),
BmapiGetMgmtOTPKeys(),
BmapiGetMgmtDataLength(),
BmapiGetMgmtData(), BmapiSetMgmtData(),
BmapiGetMgmtConfigLength(),
BmapiGetMgmtConfig(), BmapiSetMgmtConfig(),
and BmapiGetMgmtSharedMem().
7.11.0 4/16/08 Hao-Yang Feng Add BmapiGetISCSIConfig2(),
BmapiSetISCSIConfig2(),
And BmapiWritePhyFirmware().
7.12.0 6/4/08 Hao-Yang Feng Add BmapiCreateMgmtData(),
BmapiGetMgmtWebDataLength(),
BmapiGetMgmtWebData(),
BmapiSetMgmtWebData(),
BmapiCreateMgmtWebData().
page 3
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
page 4
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
2. Introduction
The purposes to have Broadcom Management API (BMAPI) are
• Help applications to view status, statistics and configuration on network Interface
Cards (NIC).
• Help applications to configure and diagnose Broadcom made NIC and
configuration related to Broadcom products.
• Help applications not to include driver specific or implementation related
knowledge.
• Help applications to immune from the change of driver’s implementation.
• Help applications to work with all Broadcom made NIC products with same API
set.
Few of BMAPI functions allow applications to set configuration data for Broadcom
drivers. However, users should not using BMAPI and driver configuration property
pages at the same time to configure drivers. The result may be overwritten with each
other.
page 5
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
3. Block Diagram
BRCM
VLAN and
Load Balance/Fault Tolerant
NDIS Intermediate Driver
NDIS.SYS
page 6
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
4. Implementation
Broadcom Management API will be implemented in ANSI C as much as possible to
make the module more portable. Current implementation supports Windows Me,
Windows 98, Microsoft Windows NT 4.0, Windows 2000 and later.
For Windows platforms, applications can enable trace log for BMAPI to help
debugging applications. To enable trace log:
1. Delete BMAPI.dll. If any application is currently using and BMAPI.dll is locked,
rename BMAPI.dll to something else.
2. Copy BMAPIdbg.dll to the BMAPI.dll directory and rename BMAPIdbg.dll to
BMAPI.dll.
3. Restart the system to make sure all applications switch to the new BMAPI dll
with debug message.
4. Open registry editor.
5. Open ‘HKEY_LOCAL_MACHINE\SOFTWARE’.
6. Open ‘Broadcom’ key or create one if not exists.
7. Open ‘BMAPI’ key or create one if not exists.
8. Create ‘DebugLevel’ as ‘DWORD’ value.
9. Enter value for ‘DebugLevel’. It could be one or combination of:
• BMAPI_DEBUG_INFORMATION (0x00000001)
• BMAPI_DEBUG_WARNING (0x00000002)
• BMAPI_DEBUG_ERROR (0x00000004)
• BMAPI_DEBUG_LOG_TO_FILE (0x00000008)
Once ‘DebugLevel’ is set, applications must restart to make the change take effect.
The log file, named ‘BmapiDbg.log’, will be created at the application’s current
directory every time application starts if BMAPI_DEBUG_LOG_TO_FILE is set. All
trace log messages will be displayed in debugger console if debugger is running.
page 7
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5. API reference
5.1 BmapiGetVersion
void BmapiGetVersion(
OUT U32 *pMajorVersion,
OUT U32 *pMinorVersion,
OUT U32 *pServicePack );
Parameters:
pMajorVersion
Pointer to major version number.
pMinorVersion
Pointer to minor version number.
pServicePack
Pointer to service pack number.
Return Value:
No return value.
Remarks:
Applications can call this function to verify that it is using the correct version of
BMAPI. Applications can call this function at any time i.e. it can be called before
BMAPI is initialized.
5.2 BmapiInitialize
Parameters:
This function does not have parameters.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
page 8
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
Applications MUST call this function before calling any other functions except
BmapiGetVersion(). Applications only need to call once. However, application
can call more than once without getting error. When applications are finished,
applications MUST call BmapiUninitialize().
The calling thread of BmapiUninitialize() MUST be the thread called
BmapiInitialize().
Multithread applications should call BmapiInitializeEx().
5.3 BmapiUninitialize
Parameters:
This function does not have parameters.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications MUST call BmapiUninitialize() before exiting, otherwise,
application may have memory leak. An application need to call
BmapiUninitialize() as many times as it calls BmapiInitialize() or
BmapiInitializeEx().
The calling thread of BmapiUninitialize() MUST be the thread called
BmapiInitialize().
5.4 BmapiGetNumPhyNic
The BmapiGetNumPhyNic will return the number of physical network adapters that
are installed with drivers in the system.
U32 BmapiGetNumPhyNic(
OUT U32 *pNumOfPhy );
Parameters:
page 9
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
pNumOfPhy
Pointer to the number of physical network adapters.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications call this function to understand how many physical network adapters
are installed with driver in the system, allocate enough buffers to fill all adapters’
data and call BmapiGetAllPhyNic() to retrieve all data.
5.5 BmapiGetAllPhyNic
The BmapiGetAllPhyNic will return information for all physical network adapters.
U32 BmapiGetAllPhyNic(
OUT BM_ADAPTER_INFO *pPhyList,
IN U32 uNumOfPhy );
Parameters:
pPhyList
Pointer to the array of BM_ADAPTER_INFO for all physical network
adapters.
uNumOfPhy
Number of BM_ADAPTER_INFO structure allocated for pPhyList array.
This number must be more than the number of physical network adapters in
the system. If not, the function will return error code BMAPI_BUFSHORT.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetNumPhyNic() to understand how many NICs are
in system first. Applications, then, allocate enough buffers to fill all adapters’ data
and call BmapiGetAllPhyNic() to retrieve data. If uNumOfPhy is not enough, the
function will return error code.
page 10
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.6 BmapiGetNumUnassignedNic
U32 BmapiGetNumUnassignedNic(
OUT U32 *pNumOfUnassigned );
Parameters:
pNumOfUnassigned
Pointer to the number of unassigned network adapters.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications call this function to understand how many unassigned network
adapters are in the system, allocate enough buffers to fill all adapters’ data and
call BmapiGetAllUnassignedNic() to retrieve all data.
5.7 BmapiGetAllUnassignedNic
U32 BmapiGetAllUnassignedNic(
OUT BM_ADAPTER_INFO *pUnassignedList,
IN U32 uNumOfUnassigned );
Parameters:
pUnassignedList
Pointer to the array of BM_ADAPTER_INFO for all unassigned network
adapters.
uNumOfUnassigned
Number of adapter structure allocated for pUnassignedList array. This
number must be more than the number of unassigned network adapters in the
system. If not, the function will return error code BMAPI_BUFSHORT.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
page 11
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
Applications must call BmapiGetNumUnassignedNic() to understand how many
unassigned network adapters are in system first. Applications, then, allocate
enough buffers to fill all adapters’ data and call BmapiGetAllUnassignedNic() to
retrieve data. If uNumOfUnassigned is not enough, the function will return error
code.
5.8 BmapiGetNumTeam
The BmapiGetNumTeam will return the number of BASP team (Load Balance/Fail
Over team) configured in the system.
U32 BmapiGetNumTeam(
OUT U32 *pNumOfTeam );
Parameters:
pNumOfTeam
Pointer to the number of team.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications call this function to understand how many BASP teams are
configured in system, allocate enough buffers to fill all teams’ data and call
BmapiGetAllTeam() to retrieve all data.
5.9 BmapiGetAllTeam
U32 BmapiGetAllTeam(
OUT BM_TEAM_INFO *pTeamList,
IN U32 uNumOfTeam );
page 12
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Parameters:
pTeamList
Pointer to the array of BM_TEAM_INFO for all BASP teams.
uNumOfTeam
Number of team structure allocated for pTeamList array. This number must
be more than the number of teams in the system. If not, the function will
return error code BMAPI_BUFSHORT.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetNumTeam() to understand how many teams are
configured in system. Applications, then, allocate enough buffers to fill all teams’
data and call BmapiGetAllTeam() to retrieve data. If uNumOfTeam is not
enough, the function will return error code.
5.10 BmapiApplyLBFOCfg
U32 BmapiApplyLBFOCfg(
IN BM_TEAM_INFO *pTeamList,
IN U32 uNumOfTeam,
OUT U32 *pReboot );
Parameters:
pTeamList
Pointer to the array of BM_TEAM_INFO for all teams.
uNumOfTeam
Number of team structure allocated for pTeamList array.
pReboot
Pointer to a boolean flag to indicate system need to reboot or not.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
page 13
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.11 BmapiGetTeamListSnapShot
The BmapiGetTeamListSnapShot will return to caller a list of team IDs that are
configured and running in teaming (VLAN/Load Balance/Fail Over) driver.
U32 BmapiGetTeamListSnapShot(
IN OUT U32 *pNumOfTeam,
OUT U32 *pIDList );
Parameters:
pNumOfTeam
On input, pointer to number of U32 allocated in pIDList array. On output,
number of team IDs in pIDList array.
pIDList
Pointer to team ID array.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications call this function to understand the number of teams in driver and
their corresponding team ID. Application can use the team ID to call
BmapiGetTeamSnapShot() to retrieve a team’s data from driver.
If pIDList is NULL, pNumOfTeam will be the number of teams in driver.
Applications can call the function with pIDList set to NULL first to get the
number of team. Then, call the function second time with enough buffer allocated
and assigned to pIDList to retrieve the id list.
page 14
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.12 BmapiGetTeamSnapShot
U32 BmapiGetTeamSnapShot(
IN U32 teamId,
OUT BM_TEAM_INFO *pTeam );
Parameters:
teamId
Team ID of the team information application wants to retrieve.
pTeam
Pointer to a BM_TEAM_INFO structure for information of a team.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetTeamListSnapShot() to learn available teams
information in teaming driver. Applications, then, call BmapiGetTeamSnapShot()
to retrieve team information.
5.13 BmapiGetTeamStatisticsSnapShot
U32 BmapiGetTeamStatisticsSnapShot(
IN U32 teamId,
OUT BM_TEAM_STATISTICS *pTeamStatistics );
Parameters:
teamId
Team ID of the team statistics information application wants to retrieve.
pTeamStatistics
Pointer to a BM_TEAM_STATISTICS structure for statistics information of
a team.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
page 15
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Not applicable
Remarks:
Applications must call BmapiGetTeamListSnapShot() to learn available teams
information in teaming driver. Applications, then, call
BmapiGetTeamStatisticsSnapShot() to retrieve statistics information of a team.
5.14 BmapiDoNicIOCTL
The BmapiDoNicIOCTL will issue IOCTL command to the driver that the ‘handle’
belongs to.
U32 BmapiDoNicIOCTL(
IN U32 handle,
IN U32 ioctlCode,
IN void *pInBuf,
IN U32 inBufSize,
IN/OUT void *pOutBuf,
IN/OUT U32 *pOutBufSize,
OUT U32 *pResult );
Parameters:
handle
Handle to an adapter. (can be found in BM_ADAPTER_INFO structure)
ioctlCode
IOCTL control code.
pInBuf
Pointer to an input buffer that will pass to driver.
inBufSize
Size of the input buffer pointed pInBuf.
pOutBuf
Pointer to an output buffer that will pass to driver and filled by driver.
pOutBufSize
On input, it is the size of the output buffer pointed pOutBuf. On output, it is
the amount of data stored in pOutBuf.
pResult
Applications must pass a pointer to a U32 variable. The variable will store
the result of GetLastError().
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
page 16
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
Applications could call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO. Applications
should use the ‘handle’ to call BmapiDoNicIOCTL(). If the driver is not running
at the time application calls BmapiDoNicIOCTL(), BmapiDoNicIOCTL() will
return error code.
5.15 BmapiGetNicStatistics
U32 BmapiGetNicStatistics(
IN U32 handle,
OUT BM_GENERAL_STATISTICS *pGenStatistics,
OUT BM_ETHERNET_STATISTICS *pEthStatistics );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pGenStatistics
Pointer to a BM_GENERAL_STATISTICS structure for general statistics
information of a network adapter. The data will be filled out on return.
pEthStatistics
Pointer to an BM_ETHERNET_STATISTICS structure for ethernet statistics
information of a network adapter. The data will be filled out on return.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications should allocate buffers for the statistics structures and pass pointers
to those structures to the function. Application should be aware that some
information might not be available. In case of NIC is disabled, the return code
will be BMAPI_DRIVER_NOT_LOADED.
5.16 BmapiRetrieveLinkStatus
The BmapiRetrieveLinkStatus will retrieve link status and link negotiation status for
Broadcom made network adapters.
page 17
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U32 BmapiRetrieveLinkStatus(
IN U32 handle,
OUT BM_LINK_STATUS *pLinkStatus );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pLinkStatus
On input, applications pass a pointer to a BM_LINK_STATUS structure. On
output, data will be filled out in the BM_LINK_STATUS structure.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
For all non-Broadcom made network adapters and BASP created virtual adapters,
only “link_status” is available.
For 4401 network adapters, only “link_status”, “duplex_mode” and “link_speed”
are available.
5.17 BmapiGetBRCMNicInfo
U32 BmapiGetBRCMNicInfo(
IN U32 handle,
OUT BM_BRCM_ADAPTER_INFO *pBRCMNicInfo );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pBRCMNicInfo
On input, applications pass a pointer to a BM_BRCM_ADAPTER_INFO
structure. On output, data will be filled out in the
BM_BRCM_ADAPTER_INFO structure.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
page 18
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
5.18 BmapiTestControlRegisters
The BmapiTestControlRegisters will return test result of control registers for
Broadcom made network adapters.
BOOL BmapiTestControlRegisters(
IN U32 handle,
IN OUT CHAR *pRstr );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pRstr
On input, applications need to pass a 200 bytes long buffer. On output, if the
function returns error, BMAPI may return an ASCII string to indicate the
reason of error.
Return Value:
Return TRUE if successful; otherwise return FALSE.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
The function will not validate the buffer. If applications do not pass a correct
length of buffer, memory corruption may occur.
Before calling the function, make sure application had called BmapiInitDiag() and
BmapiSuspendDriverEx() to initialize diagnostic setup and suspend the NIC.
After the function returned, call BmapiResumeDriverEx() and
BmapiUnInitDiag() to resume the NIC traffic and terminate diagnostic setup.
page 19
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.19 BmapiTestMIIRegisters
The BmapiTestMIIRegisters will return test result of MII control registers for
Broadcom made network adapters.
BOOL BmapiTestMIIRegisters(
IN U32 handle,
IN OUT CHAR *pRstr );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pRstr
On input, applications need to pass a 200 bytes long buffer. On output, if the
function returns error, BMAPI may return an ASCII string to indicate the
reason of error.
Return Value:
Return TRUE if successful; otherwise return FALSE.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
The function will not validate the buffer. If applications do not pass a correct
length of buffer, memory corruption may occur.
Before calling the function, make sure application had called BmapiInitDiag() and
BmapiSuspendDriverEx() to initialize diagnostic setup and suspend the NIC.
After the function returned, call BmapiResumeDriverEx() and
BmapiUnInitDiag() to resume the NIC traffic and terminate diagnostic setup.
5.20 BmapiTestEEPROM
The BmapiTestEEPROM will return test result of EEPROM for Broadcom made
network adapters.
BOOL BmapiTestEEPROM(
IN U32 handle,
IN OUT CHAR *pRstr );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pRstr
page 20
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
On input, applications need to pass a 200 bytes long buffer. On output, if the
function returns error, BMAPI may return an ASCII string to indicate the
reason of error.
Return Value:
Return TRUE if successful; otherwise return FALSE.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
The function will not validate the buffer. If applications do not pass a correct
length of buffer, memory corruption may occur.
Before calling the function, make sure application had called BmapiInitDiag() to
initialize diagnostic setup. After the function returned, call BmapiUnInitDiag() to
terminate diagnostic setup.
5.21 BmapiTestInternalMemory
The BmapiTestInternalMemory will test internal memory and return result for
Broadcom made network adapters.
BOOL BmapiTestInternalMemory(
IN U32 handle,
IN OUT CHAR *pRstr );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pRstr
On input, applications need to pass a 200 bytes long buffer. On output, if the
function returns error, BMAPI may return an ASCII string to indicate the
reason of error.
Return Value:
Return TRUE if successful; otherwise return FALSE.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
page 21
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
The function will not validate the buffer. If applications do not pass a correct
length of buffer, memory corruption may occur.
Before calling the function, make sure application had called BmapiInitDiag() and
BmapiSuspendDriverEx() to initialize diagnostic setup and suspend the NIC.
After the function returned, call BmapiResumeDriverEx() and
BmapiUnInitDiag() to resume the NIC traffic and terminate diagnostic setup.
5.22 BmapiTestInterrupt
The BmapiTestInterrupt will test internal memory and return result for Broadcom
made network adapters.
BOOL BmapiTestInterrupt(
IN U32 handle,
IN OUT CHAR *pRstr );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pRstr
On input, applications need to pass a 200 bytes long buffer. On output, if the
function returns error, BMAPI may return an ASCII string to indicate the
reason of error.
Return Value:
Return TRUE if successful; otherwise return FALSE.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
The function will not validate the buffer. If applications do not pass a correct
length of buffer, memory corruption may occur.
Before calling the function, make sure application had called BmapiInitDiag() and
BmapiSuspendDriverEx() to initialize diagnostic setup and suspend the NIC.
After the function returned, call BmapiResumeDriverEx() and
BmapiUnInitDiag() to resume the NIC traffic and terminate diagnostic setup.
5.23 BmapiTestLoopBack
The BmapiTestLoopBack will perform loopback test and return test result for
Broadcom made network adapters.
BOOL BmapiTestLoopBack(
page 22
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
IN U32 handle,
IN ULONG Lbtype,
IN OUT CHAR *pRstr );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
Lbtype
Loopback type to perform. Can be BMAPI_LOOPBACK_TYPE_MAC,
BMAPI_LOOPBACK_TYPE_PHY or
BMAPI_LOOPBACK_TYPE_EXTERNAL.
pRstr
On input, applications need to pass a 200 bytes long buffer. On output, if the
function returns error, BMAPI may return an ASCII string to indicate the
reason of error.
Return Value:
Return TRUE if successful; otherwise return FALSE.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
The function will not validate the buffer. If applications do not pass a correct
length of buffer, memory corruption may occur.
Before calling the function, make sure application had called BmapiInitDiag() to
initialize diagnostic setup. After the function returned, call BmapiUnInitDiag() to
terminate diagnostic setup.
Before calling this function, applications MUST make sure miniport driver is
NOT in suspend mode. If it does, applications need to call BmapiResumeDriver()
to get miniport driver running.
5.24 BmapiTestCPU
The BmapiTestCPU will enable test mode and test the on chip processor for
Broadcom made network adapters.
BOOL BmapiTestCPU(
IN U32 handle,
IN OUT CHAR *pRstr );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pRstr
page 23
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
On input, applications need to pass a 200 bytes long buffer. On output, if the
function returns error, BMAPI may return an ASCII string to indicate the
reason of error.
Return Value:
Return TRUE if successful; otherwise return FALSE.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
The function will not validate the buffer. If applications do not pass a correct
length of buffer, memory corruption may occur.
Before calling the function, make sure application had called BmapiInitDiag() and
BmapiSuspendDriverEx() to initialize diagnostic setup and suspend the NIC.
After the function returned, call BmapiResumeDriverEx() and
BmapiUnInitDiag() to resume the NIC traffic and terminate diagnostic setup.
5.25 BmapiTestLEDs
The BmapiTestLEDs will flip the LEDs to indicate which logical NIC card is bound
to physical NIC card for Broadcom made network adapters.
BOOL BmapiTestCPU(
IN U32 handle,
IN ULONG BlinkDurationSec );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
BlinkDurationSec
Specify how long to flip the LEDs (in seconds, up to 120 seconds).
Return Value:
Return TRUE if successful; otherwise return FALSE.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
page 24
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Before calling the function, make sure application had called BmapiInitDiag() to
initialize diagnostic setup. After the function returned, call BmapiUnInitDiag() to
terminate diagnostic setup.
5.26 BmapiGetServiceName
The BmapiGetServiceName will return the service name corresponding to the
adapter’s handle.
U32 BmapiGetServiceName(
IN U32 handle,
OUT U8 *pServiceName,
IN U32 uBufLen );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pServiceName
Pointer to the buffer that will be filled with the adapter’s service name on
function’s return.
uBufLen
Length of buffer pointed by ‘pServiceName’.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
5.27 BmapiGetBRCMNicStatistics
The BmapiGetBRCMNicStatistics will return Broadcom network adapters
proprietary statistics data.
U32 BmapiGetBRCMNicStatistics(
IN U32 handle,
IN/OUT BM_BRCM_STATISTICS *pBrcmStatistics );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pBrcmStatistics
page 25
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications should allocate buffers for the statistics structures and pass pointers
to those structures to the function. In case of NIC is disabled, the return code will
be BMAPI_DRIVER_NOT_LOADED.
5.28 BmapiForceBRCMNicLinkSpeed
The BmapiForceBRCMNicLinkSpeed will force the Broadcom miniport driver to
set the link speed to the specified link speed.
U32 BmapiForceBRCMNicLinkSpeed(
IN U32 handle,
IN U32 uAutoNegotiation,
IN U32 uLinkSpeed );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
uAutoNegotiation
Using auto-negotiation advertisement or force the setting.
uLinkSpeed
The forced speed to set to. Possible values include
BMAPI_LM_REQUESTED_MEDIA_TYPE_AUTO (Not available if 'uAutoNegotiation' is
false)
BMAPI_LM_REQUESTED_MEDIA_TYPE_UTP_10MBPS
BMAPI_LM_REQUESTED_MEDIA_TYPE_UTP_10MBPS_FULL_DUPLEX
BMAPI_LM_REQUESTED_MEDIA_TYPE_UTP_100MBPS
BMAPI_LM_REQUESTED_MEDIA_TYPE_UTP_100MBPS_FULL_DUPLEX
BMAPI_LM_REQUESTED_MEDIA_TYPE_UTP_1000MBPS
BMAPI_LM_REQUESTED_MEDIA_TYPE_UTP_1000MBPS_FULL_DUPLEX (Not
available if 'uAutoNegotiation' is false)
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
page 26
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
4401 is supported on Windows 2000 or later.
5.29 BmapiLBFOSoftwareStatus
BmapiLBFOSoftwareStatus will test Load Balance/Fault Tolerance driver status.
U32 BmapiForceBRCMNicLinkSpeed(
OUT U32 *pStatus );
Parameters:
pStatus
Pointer to status of Load Balance/Fault Tolerance. The value could be
BMAPI_LBFO_STATUS_NOT_INSTALLED,
BMAPI_LBFO_STATUS_NOT_LOADED or
BMAPI_LBFO_STATUS_LOADED.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications can call this function to understand the status of Load Balance/Fault
Tolerance software.
5.30 BmapiGetPnpDevId
BmapiGetPnpDevId will retrieve PnP device ID for a physical network adapter in
Windows 98, Windows Me and Windows 2000 or later.
U32 BmapiGetPnpDevId(
IN U32 handle,
OUT U8 *pDevID,
IN OUT U32 *pBufLen,
OUT U32 *pRegIndex,
OUT U32 *pSlotNumber );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pDevID
page 27
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Pointer to output buffer that will be filled with PnP device ID if function
returns BMAPI_OK.
pBufLen
On input, pointer to the length of buffer passed in. On output, the function
will fill it with the length of buffer used.
pRegIndex
Index retrieved from registry key. For Example,
"{4D36E972-E325-11CE-BFC1-08002BE10318}\[num]"
The 'num' starts from 0000. pRegIndex will get the value 'num' and convert it
into U32 type.
This is ignored For Windows 98 and Windows Me.
pSlotNumber
Specifies a number associated with the device that can be displayed in the
user interface. This number is typically a user-perceived slot number, such as
a number printed next to the slot on the board, or some other number that
makes locating the physical device easier for the user. For buses with no such
convention, or when the ‘UINumber’ is unknown, the bus driver leaves this
at its default value of 0xFFFFFFFF.
This is ignored For Windows 98 and Windows Me.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
If buffer is too short, the function will return BMAPI_BUFSHORT and
pBufLen will be filled with the length required.
The API supports Windows 98, Me, 2000 and later. NT 4 is not supported.
On Windows 98 and Me, only “DevID” is available.
The form of PnP device ID is <enumerator>\<Device ID>\<Instance ID>.
If *pBufLen == 0, function will return with required buffer length.
'pRegIndex' and 'pSlotNumber' are optional. If 'pRegIndex' is not NULL and no
driver is installed for the device, error code
BMAPI_DRIVER_NOT_INSTALLED will be returned.
5.31 BmapiSuspendDriver
BmapiSuspendDriver will suspend Broadcom miniport driver and bring down the
link (as cable disconnected).
page 28
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
BOOL BmapiSuspendDriver(
IN U32 handle,
IN OUT CHAR *pRstr );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pRstr
On input, applications need to pass a 200 bytes long buffer. On output, if the
function returns error, BMAPI may return an ASCII string to indicate the
reason of error.
Return Value:
Return TRUE if successful; otherwise return FALSE.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
The function will not validate the buffer. If applications do not pass a correct
length of buffer, memory corruption may occur.
5.32 BmapiResumeDriver
BmapiResumeDriver will resume Broadcom miniport driver from suspend mode.
BOOL BmapiResumeDriver(
IN U32 handle,
IN OUT CHAR *pRstr );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pRstr
On input, applications need to pass a 200 bytes long buffer. On output, if the
function returns error, BMAPI may return an ASCII string to indicate the
reason of error.
Return Value:
Return TRUE if successful; otherwise return FALSE.
page 29
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
The function will not validate the buffer. If applications do not pass a correct
length of buffer, memory corruption may occur.
5.33 BmapiEnableDevice
BmapiEnableDevice will enable or disable a network adapter in Windows 2000 or
later.
U32 BmapiEnableDevice(
IN U32 handle,
IN U32 uEnable );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
uEnable
Non-zero value to enable the device, zero value to disable the device.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
5.34 BmapiRegisterEvent
The function will register the event to BMAPI and BMAPI will call back to
applications when the event occurred.
U32 BmapiRegisterEvent(
IN U32 event,
IN BMAPIEVENTCALLBACK func,
IN void *cookie,
OUT U32 *pEeventHandle );
Parameters:
event
page 30
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiInitialize()/BmapiInitializeEx() before calling this
function.
If the team ID indicated by an event can not be found in registry, the team
name, adapter service name and adapter handle may not be passed to
callback function.
In the case of event BMAPI_EVT_ADD and BMAPI_EVT_REMOVE,
application should refresh BMAPI internal data by calling BmapiRefreshData().
(Applications should NEVER call BMAPI APIs from the call back
thread.) In the case of Hot Plug machine, if applications failed to do so, BMAPI
will not be able to provide detail information for the event. However, if
applications are calling BmapiApplyLBFOCfg(), application do
not need to call BmapiRefreshData() because the
BmapiApplyLBFOCfg() will call BmapiRefreshData() before return.
In the callback function, generally, applications will get information about which
team and which adapter change its status and other related information. However,
if applications did not refresh BMAPI as described in previous paragraph,
BMAPI may not be able to provide detail information to applications. In fact,
application will only get correct team ID, number of active load balance member
and number of stand by member and applications will not know which adapter
causing the event.
Applications should not spend too much time in the call back
function because it will block the calling thread in BMAPI and
prevent it to deliver events to next callback functions if there are
multiple call back functions registered for the same event from
the same process.
page 31
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.35 BmapiUnRegisterEvent
The function will unregister the event for callback.
U32 BmapiUnRegisterEvent(
IN U32 uEeventHandle );
Parameters:
uEventHandle
The event to unregister.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
none
5.36 BmapiInitializeEx
Initialization function of BMAPI and applications can have a choice to decide
whether to keep COM initialized or not. If not, COM will be uninitialized
immediately before the function return.
U32 BmapiInitializeEx(
IN U32 bKeepCom );
Parameters:
bKeepCom
Keep COM initialized or not.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications MUST call this function before calling any other functions except
BmapiGetVersion(). Applications only need to call once. However, application
page 32
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
can call more than once without getting error. After calling BmapiInitializeEx(),
applications do not need to call BmapiInitialize().
Applications MUST call BmapiUninitialize() before exiting, otherwise,
application may have memory leak.
Applications that call BmapiInitializeEx(TRUE) MUST use the same thread
to call BmapiUninitialize().
Multithread applications that call BmapiInitializeEx() and
BmapiUninitialize() from different threads must use
BmapiInitializeEx(FALSE).
5.37 BmapiIsInitialized
Applications use the function to determine BMAPI is initialized or not.
U32 BmapiIsInitialized()
Parameters:
none
Return Value:
Return BMAPI_OK if BMAPI is initialized; otherwise return a nonzero error
code.
Remarks:
Applications can call this function without call BmapiInitialize() or
BmapiInitializeEx(). This function will work well with single thread applications
or applications that can control the calls to BmapiInitialize()/BmapiInitializeEx().
However, if the application is multiple threaded and the API calls to
BmapiInitialize()/BmapiInitializeEx() are scattered and not controllable, the
function will not guarantee correct result.
5.38 BmapiGetBRCMNicParam
The API is obsolete.
5.39 BmapiSetBRCMNicParam
The API is obsolete.
5.40 BmapiGetMultiBRCMNicParams
The API is obsolete.
page 33
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.41 BmapiSetMultiBRCMNicParams
The API is obsolete.
5.42 BmapiRefreshData
BmapiRefreshData() will force BMAPI to refresh its internal data.
U32 BmapiRefreshData();
Parameters:
none
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
For multithreaded applications, once a thread calls the function, all other threads
will see the change of data.
5.43 BmapiGetHandleByServiceName
The BmapiGetHandleByServiceName will return the adapter's handle corresponding
to the adapter's service name.
U32 BmapiGetHandleByServiceName(
IN U8 *pServiceName,
OUT U32 *handle );
Parameters:
pServiceName
Pointer to the ASCII NULL terminated service name.
handle
Pointer to a handle for an adapter.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
page 34
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
Make sure BMAPI is initialized before calling the function. If the NIC is not
found, return code is BMAPI_NIC_NOT_FOUND.
5.44 BmapiIMOnlineDevice
The BmapiIMOnlineDevice will ask intermediate driver to pass or stop passing
traffic to the miniport.
U32 BmapiIMOnlineDevice(
IN U32 team_id,
IN U32 handle,
IN U32 bOnline );
Parameters:
team_id
Team ID of the miniport joined.
handle
Handle to an adapter BM_ADAPTER_INFO structure.
bOnline
Flag to indicate to pass traffic to the miniport or not.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the 'handle' in BM_ADAPTER_INFO and use it to call the
function.
5.45 BmapiGetNicStatistics64
U32 BmapiGetNicStatistics64(
IN U32 handle,
OUT BM_GENERAL_STATISTICS64 *pGenStatistics,
OUT BM_ETHERNET_STATISTICS64 *pEthStatistics );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
page 35
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
pGenStatistics
Pointer to a BM_GENERAL_STATISTICS64 structure for general statistics
information of a network adapter. The data will be filled out on return.
pEthStatistics
Pointer to an BM_ETHERNET_STATISTICS64 structure for ethernet
statistics information of a network adapter. The data will be filled out on
return.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications should allocate buffers for the statistics structures and pass pointers
to those structures to the function. Application should be aware that some
information might not be available. In case of NIC is disabled, the return code
will be BMAPI_DRIVER_NOT_LOADED.
5.46 BmapiGetNicPciInfo
U32 BmapiGetNicPciInfo(
IN U32 handle,
OUT BM_NIC_PCI_INFO *pNicPciInfo );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pNicPciInfo
Pointer to the buffer that will be filled with the adapter's PCI information.
'version' field MUST be filled on input.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
page 36
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.47 BmapiInitDiag
The BmapiInitDiag will lock the access to a NIC during diagnostic so that no
multiple diagnostics can perform on the same NIC concurrently.
U32 BmapiInitDiag(
IN U32 handle );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the 'handle' in BM_ADAPTER_INFO and use it to call the
function.
Applications MUST call this API prior to do any NIC diagnostic test including
cable analysis. Otherwise, the test will fail. Applications also MUST call
BmapiUnInitDiag() when all diagnostic tasks are done.
5.48 BmapiUnInitDiag
U32 BmapiUnInitDiag(
IN U32 handle );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
page 37
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the 'handle' in BM_ADAPTER_INFO and use it to call the
function.
5.49 BmapiGetNumPhyNicEx
The function will return the number of physical network adapters in the system. In
Windows 2000 or above, the number includes network adapters sitting in PCI slots
but not installed with drivers.
U32 BmapiGetNumPhyNicEx(
IN U32 *pNumOfPhy );
Parameters:
pNumOfPhy
Pointer to the number of physical network adapters.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications call BmapiGetNumPhyNicEx() to understand how many physical
network adapters are in the system, allocate enough buffers to fill all adapters'
handles, call BmapiGetAllPhyNicHandles() to retrieve all handles and call
BmapiGetPhyNic() to retrieve a specific network adapter’s info.
5.50 BmapiGetAllPhyNicHandles
The function will return handles for all physical network adapters.
page 38
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U32 BmapiGetAllPhyNicHandles(
OUT U32 *pHandleList,
IN U32 uNumOfPhy );
Parameters:
pHandleList
Pointer to the array of physical network adapter handles.
uNumOfPhy
Number of handles allocated in pHandleList array.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications call BmapiGetNumPhyNicEx() to understand how many physical
network adapters are in the system, allocate enough buffers to fill all adapters'
handles, call BmapiGetAllPhyNicHandles() to retrieve all handles and call
BmapiGetPhyNic() to retrieve a specific network adapter’s info.
5.51 BmapiGetPhyNic
The function will return the physical network adapter information according the
handle.
U32 BmapiGetPhyNic(
IN U32 handle,
OUT BM_ADAPTER_INFO_EX *pNicInfoEx );
Parameters:
handle
Handle to the NIC information that should be retrieved.
pNicInfoEx
Pointer to the buffer for physical network adapter information.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
page 39
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
Applications call BmapiGetNumPhyNicEx() to understand how many physical
network adapters are in the system, allocate enough buffers to fill all adapters'
handles, call BmapiGetAllPhyNicHandles() to retrieve all handles and call
BmapiGetPhyNic() to retrieve a specific network adapter’s info.
Make sure set the ‘version’ in BM_ADAPTER_INFO_EX to
BMAPI_ADAPTER_INFO_EX_VER before calling the function.
5.52 BmapiGetASFTable
BmapiGetASFTable will read ASF table from a Broadcom made ASF capable
network adapter.
U32 BmapiGetASFTable(
IN U32 handle,
OUT BM_ASF_TABLE *pNicASF );
Parameters:
handle
Handle to an adapter.
pNicASF
Application allocated buffer for ASF table.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), BmapiGetAllPhyNicHandles etc.
to get adapter handle.
Make sure set the ‘version’ in BM_ASF_TABLE to BMAPI_ASF_T_VERSION
before calling the function.
If the application had called BmapiInitDiag() prior to call this API,
BmapiInitDiag() must be called from the same thread that calls this API.
The function can be used to read configuration for both ASF and IPMI. If the
management firmware is IPMI, the ‘flags’ defined in BM_ASF_TABLE will have
BM_IPMI_SUPPORT set. The same ‘AsfGui.cfg.Config.EnableASF’ flag can be
used to determine whether the firmware is enabled or not.
The function supports UMP firmware. If the firmware is UMP, the ‘flags’ defined
in BM_ASF_TABLE will have BM_UMP_SUPPORT set. All ASF and IPMI
configuration information will no be populated for UMP. Please refer to
BM_ASF_TABLE in BMAPI.h for detail information.
page 40
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.53 BmapiSetASFTable
BmapiSetASFTable will write ASF table to a Broadcom made ASF capable network
adapter.
U32 BmapiGetASFTable(
IN U32 handle,
OUT BM_ASF_TABLE *pNicASF );
Parameters:
handle
Handle to an adapter.
pNicASF
ASF table to write to the network adapter.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), BmapiGetAllPhyNicHandles etc.
to get adapter handle.
This API will suspend and resume driver at the end of NVRAM access.
Make sure set the ‘version’ in BM_ASF_TABLE to BMAPI_ASF_T_VERSION
before calling the function.
If the application had called BmapiInitDiag() prior to call this API,
BmapiInitDiag() must be called from the same thread that calls this API.
5.54 BmapiGetBIOS
BmapiGetBIOS will read BIOS information from the 'stat_addr' for 'Length' bytes
long.
U32 BmapiGetBIOS(
IN U64 start_addr,
OUT void *buffer,
IN U32 length );
Parameters:
start_addr
Starting address of physical memory to read.
page 41
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
buffer
Application allocated buffer to store data read from the physical memory.
length
bytes to read and length of buffer
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Make sure BMAPI is initialized before calling this function..
5.55 BmapiTestControlRegistersEx
The BmapiTestControlRegistersEx will return test result of control registers for
Broadcom made network adapters.
U32 BmapiTestControlRegistersEx(
IN U32 handle );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
Before calling the function, make sure application had called BmapiInitDiag() and
BmapiSuspendDriverEx() to initialize diagnostic setup and suspend the NIC.
After the function returned, call BmapiResumeDriverEx() and
BmapiUnInitDiag() to resume the NIC traffic and terminate diagnostic setup.
5.56 BmapiTestMIIRegistersEx
The BmapiTestMIIRegistersEx will return test result of MII control registers for
Broadcom made network adapters.
page 42
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U32 BmapiTestMIIRegistersEx(
IN U32 handle );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
Before calling the function, make sure application had called BmapiInitDiag() and
BmapiSuspendDriverEx() to initialize diagnostic setup and suspend the NIC.
After the function returned, call BmapiResumeDriverEx() and
BmapiUnInitDiag() to resume the NIC traffic and terminate diagnostic setup.
5.57 BmapiTestEEPROMEx
The BmapiTestEEPROMEx will return test result of EEPROM for Broadcom made
network adapters.
U32 BmapiTestEEPROMEx(
IN U32 handle );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
page 43
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Before calling the function, make sure application had called BmapiInitDiag() to
initialize diagnostic setup. After the function returned, call BmapiUnInitDiag() to
terminate diagnostic setup.
5.58 BmapiTestInternalMemoryEx
The BmapiTestInternalMemoryEx will test internal memory and return result for
Broadcom made network adapters.
U32 BmapiTestInternalMemoryEx(
IN U32 handle );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
Before calling the function, make sure application had called BmapiInitDiag() and
BmapiSuspendDriverEx() to initialize diagnostic setup and suspend the NIC.
After the function returned, call BmapiResumeDriverEx() and
BmapiUnInitDiag() to resume the NIC traffic and terminate diagnostic setup.
5.59 BmapiTestInterruptEx
The BmapiTestInterruptEx will test internal memory and return result for Broadcom
made network adapters.
U32 BmapiTestInterruptEx(
IN U32 handle );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
page 44
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
Before calling the function, make sure application had called BmapiInitDiag() and
BmapiSuspendDriverEx() to initialize diagnostic setup and suspend the NIC.
After the function returned, call BmapiResumeDriverEx() and
BmapiUnInitDiag() to resume the NIC traffic and terminate diagnostic setup.
5.60 BmapiTestLoopBackEx
The BmapiTestLoopBackEx will perform loopback test and return test result for
Broadcom made network adapters.
U32 BmapiTestLoopBackEx(
IN U32 handle,
IN ULONG Lbtype );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
Lbtype
Loopback type to perform. Can be BMAPI_LOOPBACK_TYPE_MAC,
BMAPI_LOOPBACK_TYPE_PHY or
BMAPI_LOOPBACK_TYPE_EXTERNAL.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
Before calling the function, make sure application had called BmapiInitDiag() to
initialize diagnostic setup. After the function returned, call BmapiUnInitDiag() to
terminate diagnostic setup.
For 4401 and 57xx NICs, before calling this function, applications MUST make
sure miniport driver is NOT in suspend mode. If it does, applications need to call
BmapiResumeDriver() to get miniport driver running.
For 5706 family, before calling the function, make sure application had called
BmapiSuspendDriverEx() to initialize diagnostic setup and suspend the NIC.
page 45
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.61 BmapiTestCPUEx
The BmapiTestCPUEx will enable test mode and test the on chip processor for
Broadcom made network adapters.
U32 BmapiTestCPUEx(
IN U32 handle );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
Before calling the function, make sure application had called BmapiInitDiag() and
BmapiSuspendDriverEx() to initialize diagnostic setup and suspend the NIC.
After the function returned, call BmapiResumeDriverEx() and
BmapiUnInitDiag() to resume the NIC traffic and terminate diagnostic setup.
4401 doe not have CPU. CPU test simply return BMAPI_OK.
5.62 BmapiTestLEDsEx
The BmapiTestLEDsEx will flip the LEDs to indicate which logical NIC card is
bound to physical NIC card for Broadcom made network adapters.
U32 BmapiTestLEDsEx(
IN U32 handle,
IN ULONG BlinkDurationSec );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
BlinkDurationSec
Specify how long to flip the LEDs (in seconds, up to 120 seconds).
Return Value:
page 46
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
Before calling the function, make sure application had called BmapiInitDiag() to
initialize diagnostic setup. After the function returned, call BmapiUnInitDiag() to
terminate diagnostic setup.
For 4401, applications must call BmapiSuspendDriverEx() prior to call the LED
test.
5.63 BmapiSuspendDriverEx
BmapiSuspendDriverEx will suspend Broadcom miniport driver and bring down the
link (as cable disconnected).
U32 BmapiSuspendDriverEx(
IN U32 handle );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
Before calling the function, make sure application had called BmapiInitDiag() to
initialize diagnostic setup. After the function returned, call BmapiUnInitDiag() to
terminate diagnostic setup.
5.64 BmapiResumeDriverEx
BmapiResumeDriverEx will resume Broadcom miniport driver from suspend mode.
page 47
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U32 BmapiResumeDriverEx(
IN U32 handle );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
Before calling the function, make sure application had called BmapiInitDiag() to
initialize diagnostic setup. After the function returned, call BmapiUnInitDiag() to
terminate diagnostic setup.
5.65 BmapiGetFirmwareInfo
BmapiGetFirmwareInfo will get firmware information.
U32 BmapiGetFirmwareInfo(
IN U32 handle,
OUT BM_FW_INFO *pFWInfo );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pFWnfo
Pointer to the firmware information buffer.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
page 48
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.66 BmapiTestASF
The BmapiTestASF will test various ASF related hardware components.
U32 BmapiTestASF(
IN U32 handle );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
BmapiTestASF() required driver to be suspended prior to the call.
5.67 BmapiWriteFirmware
BmapiWriteFirmware will write firmware information starting at specified offset
with provided data buffer and lenngth to write to.
U32 BmapiWriteFirmware(
IN U32 handle,
IN U32 uOffset,
IN U32 *pDataBuf,
IN U32 uBufLen,
IN U8 *pChk );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
uOffset
Starting offset to write data to.
pDataBuf
Data to write to firmware. Data are in 32-bit array.
uBufLen
page 49
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Number of elements in data buffer array. For example, 2 means 2 32-bit data
in the data buffer.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
1. Applications need to call BmapiInitDiag() prior to call this and call
BmapiUnInitDiag() after everything is done.
2. The newly programmed firmware will not be effective till:
- The machine reboot.
- The driver is disabled and re-enabled. Can be done manually or through
BmapiEnableDevice().
- Call BmapiSuspendDriverEx() followed by BmapiResumeDriverEx().
This is the most preferrable method.
5.68 BmapiReadFirmware
BmapiReadFirmware will read firmware information starting at specified offset with
provided data buffer and length to read.
U32 BmapiReadFirmware(
IN U32 handle,
IN U32 uOffset,
IN U32 *pDataBuf,
IN U32 uBufLen,
IN U8 *pChk );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
uOffset
Starting offset to read data from.
pDataBuf
Data buffer from firmware datra. Data are in 32-bit array.
uBufLen
Number of elements in data buffer array. For example, 2 means 2 32-bit data
in the data buffer.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
page 50
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
Applications need to call BmapiInitDiag() prior to call this and call
BmapiUnInitDiag() after everything is done.
5.69 BmapiGetSystemASFTables
BmapiGetSystemASFTables will read ASF tables from system BIOS.
U32 BmapiGetSystemASFTables(
IN BM_ASF_TABLE *pAsfTbls );
Parameters:
pAsfTbls
Pointer to ASF table structure that will be filled.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Make sure set the ‘version’ in BM_ASF_TABLE to BMAPI_ASF_T_VERSION
before calling the function.
5.70 BmapiGetBrcmVirNic
BmapiGetBrcmVirNic will return the information for BASP virtual adapters.
U32 BmapiGetBrcmVirNic(
BM_VIR_NIC_INFO_EX *pNicInfoEx );
Parameters:
handle
Handle to the NIC information that should be retrieved.
pNicInfoEx
Pointer to the buffer for virtual NIC information.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
page 51
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
Applications call BmapiGetAllTeam() to get all virtual adapters' basic
information. If applications need more detail information, application will use the
individual handle to call this function to retrieve information.
5.71 BmapiReadNicMem
BmapiReadNicMem will read network adapter's registers and memory.
U32 BmapiReadNicMem(
IN U32 handle,
IN U32 uType,
IN U32 uOffset,
IN U32 *pData,
IN U8 *pChk );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
uType
Type of register or memory access.
uOffset
Offset to read from.
pData
Pointer to the return data.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
1. The function always reads 4 bytes data at a time.
2. 'uType' could be BMAPI_INDIRECT_REG_READ,
BMAPI_INDIRECT_MEM_READ or BMAPI_PHY_REG_READ.
3. Value pointed by 'pData' is valid only when the function returns BMAPI_OK.
5.72 BmapiWriteNicMem
BmapiWriteNicMem will write network adapter's registers and memory.
U32 BmapiWriteNicMem(
IN U32 handle,
IN U32 uType,
page 52
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
IN U32 uOffset,
IN U32 uData,
IN U8 *pChk );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
uType
Type of register or memory access.
uOffset
Offset to write to.
uData
Data to write to NIC.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
1. The function always reads 4 bytes data at a time.
2. 'uType' could be BMAPI_INDIRECT_REG_READ,
BMAPI_INDIRECT_MEM_READ or BMAPI_PHY_REG_READ.
5.73 BmapiGetIpAddrInfo
BmapiGetIpAddrInfo will read adapter's IP/NetMask/Gateway information.
U32 BmapiGetIpAddrInfo(
IN U32 handle,
IN U32 uType,
OUT U8 *pBuf,
IN OUT U32 *pLen );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
uType
Type of information to retrieve. It could be BMAPI_IPINFO_IP_LIST,
BMAPI_IPINFO_SUBNETMASK_LIST or
BMAPI_IPINFO_GATEWAY_LIST.
pBuf
Buffer to for retrieved information.
pLen
Pointer to a U32 number. On input, it is the length of buffer. On return, it is
the required buffer length.
page 53
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
1. On input, uLen will be the length of buffer.
2. If 'pBuf' is NULL, 'uLen' will be the required length of buffer.
3. If the function failed due to buffer too short, 'uLen' will be the required length
of buffer.
4. Returned data in 'pBuf' is in REG_MULTI_SZ format. (An array of null-
terminated strings, terminated by two null characters.)
5.74 BmapiTestNetwork
BmapiTestNetwork will ping the destination IP.
U32 BmapiTestNetwork(
IN U32 handle,
IN U8 *pDestIP,
IN U32 uRetry );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pDestIP
Destination IP string.
uRetry
How many times to retry.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
The test will send ICMP packet to ping the destination. It will ping at least once
and keep pinging till first response is received.
Application should NOT mix the test with other NIC diagnostic functions such as
BmapiTestMIIRegistersEx().
page 54
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.75 BmapiGetPowerMode
BmapiGetPowerMode will get network adapter's current power saving mode from
driver or EEPROM.
U32 BmapiGetPowerMode(
IN U32 handle,
IN U32 uWhere,
IN U32 uPort,
OUT U32 *pMode );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
uWhere
BMAPI_GET_POWER_MODE_DRIVER or
BMAPI_GET_POWER_MODE_EEPROM.
uPort
Reserved. MUST be 0.
pMode
Pointer to a U32 number. On return, it is the power mode setting of
EEPROM or driver.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
4401 adapter does not support setting in EEPROM (NVRAM).
If the application had called BmapiInitDiag() prior to call this API,
BmapiInitDiag() must be called from the same thread that calls this API.
5.76 BmapiSetPowerMode
BmapiSetPowerMode will set network adapter's power saving mode from driver
and/or EEPROM.
U32 BmapiSetPowerMode(
IN U32 handle,
IN U32 uWhere,
IN U32 uPort,
IN U32 uMode );
page 55
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
uWhere
BMAPI_SET_POWER_MODE_DRIVER,
BMAPI_SET_POWER_MODE_EEPROM or
BMAPI_SET_POWER_MODE_BOTH.
uPort
Reserved. MUST be 0.
uMode
The power mode setting to set to. It could be
BMAPI_POWER_MODE_FULL or BMAPI_POWER_MODE_LOW.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
4401 adapter does not support setting in EEPROM (NVRAM).
If the application had called BmapiInitDiag() prior to call this API,
BmapiInitDiag() must be called from the same thread that calls this API.
When applications set the power mode to low, BMAPI will turn on power saving
feature in firmware if it is disabled.
5.77 BmapiGetBRCMNicInfoEx
BmapiGetBRCMNicInfoEx will retrieve proprietary Broadcom network adapter
information.
U32 BmapiGetBRCMNicInfoEx(
IN U32 handle,
OUT BM_BRCM_ADAPTER_INFO_EX *pBRCMNicInfoEx );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pBRCMNicInfoEx
On input, applications pass a pointer to a
BM_BRCM_ADAPTER_INFO_EX structure. On output, data will be filled
out in the BM_BRCM_ADAPTER_INFO_EX structure.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
page 56
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
Not all fields are applicable to 4401.
5.78 BmapiGetLastDiagPort
The API is obsolete.
5.79 BmapiWriteFirmwareInfo
BmapiWriteFirmwareInfo will update firmware information.
U32 BmapiWriteFirmwareInfo(
IN U32 handle,
IN BM_FW_INFO *pFWInfo,
IN U32 uOption );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pFWInfo
Pointer to BM_FW_INFO buffer will be copied to EEPROM.
uOption
Which block to update.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Currently, the function only supports BMAPI_WR_FW_MANUFAC option to
update manufactory data block.
This API will go in diagnostics mode during execution if the application had not
called BmapiInitDiag() prior to call this API.
page 57
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.80 BmapiGetTTBRCMNicInfo
The API is obsolete.
5.81 BmapiGetPHYStatus
BmapiGetPHYStatus will get current PHY status.
U32 BmapiGetPHYStatus(
IN U32 handle,
OUT U32 *pPhyStatus );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pPhyStatus
Pointer to a U32 number. It will be filled current PHY status on function's
return. The return value can be BMAPI_PHY_STATUS_OFF or
BMAPI_PHY_STATUS_ON.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
If the application did not call BmapiInitDiag() before calling this API, BMAPI
will enter diagnostics mode, query the information and leave diagnostics mode.
5.82 BmapiSetPHYStatus
BmapiSetPHYStatus will turn on or off PHY.
U32 BmapiSetPHYStatus(
IN U32 handle,
IN U32 uPhyStatus );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
uPhyStatus
The PHY mode setting to set to. Can be BMAPI_PHY_STATUS_OFF or
BMAPI_PHY_STATUS_ON.
Return Value:
page 58
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
If the application did not call BmapiInitDiag() before calling this API, BMAPI
will enter diagnostics mode, query the information and leave diagnostics mode.
5.83 BmapiRetrieveLinkStatusEx
The BmapiRetrieveLinkStatusEx() will retrieve link status and link negotiation
result for Broadcom made network adapters.
U32 BmapiRetrieveLinkStatusEx(
IN U32 handle,
OUT BM_LINK_STATUS_EX *pLinkStatusEx );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pLinkStatusEx
On input, applications pass a pointer to a BM_LINK_STATUS_EX
structure. On output, data will be filled out in the BM_LINK_STATUS_EX
structure.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
For all non-Broadcom made network adapters and BASP created virtual adapters,
only “link_status”, “line_speed_Kbps” and “driver_loaded” are available.
For 4401 network adapters, only “link_status”, “duplex_mode”, “link_speed” and
fields for third party NICs are available.
page 59
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.84 BmapiTestLEDsEx2
The BmapiTestLEDsEx2() will flip the LEDs to indicate which logical NIC card is
bound to physical NIC card for Broadcom made network adapters by blinking LEDs
on the NIC.
U32 BmapiTestLEDsEx2(
IN U32 handle,
IN U32 BlinkDurationSec,
IN U32 uFreq );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
BlinkDurationSec
Specify how long to flip the LEDs (in seconds, up to 120 seconds).
uFreq
Specify the frequency to blink the LEDs (from 1 to 10) in a second.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
Before calling the function, make sure application had called BmapiInitDiag() to
initialize diagnostic setup. After the function returned, call BmapiUnInitDiag() to
terminate diagnostic setup.
For 4401, applications must call BmapiSuspendDriverEx() prior to call the LED
test.
5.85 BmapiGetNicStatistics64Ex
The function will return selected fields of statistics information from driver.
U32 BmapiGetNicStatistics64Ex(
IN U32 handle,
OUT BM_GENERAL_STATISTICS64 *pGenStatistics,
OUT BM_ETHERNET_STATISTICS64 *pEthStatistics );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
page 60
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
pGenStatistics
Pointer to a BM_GENERAL_STATISTICS64 structure for general statistics
information of a network adapter. The data will be filled out on return.
pEthStatistics
Pointer to an BM_ETHERNET_STATISTICS64 structure for ethernet
statistics information of a network adapter. The data will be filled out on
return.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications should allocate buffers for the statistics structures and pass pointers
to those structures to the function. Application should be aware that some
information might not be available. In case of NIC is disabled, the return code
will be BMAPI_DRIVER_NOT_LOADED.
All fields in both BM_GENERAL_STATISTICS64 and
BM_ETHERNET_STATISTICS64 structures MUST be initialized. Applications
MUST choose which field will be read from driver by initializing the field with '0'
or '-1' (all 'F'). '0' means the statistics data will be pulled from the driver. '-1'
means the application does not need the field and the data will not be pulled from
the driver. If a statistics data is not supported by the driver or not available for any
reason, the corresponding field will be set to '-1'.
5.86 BmapiGetTeamSnapShot2
U32 BmapiGetTeamSnapShot2(
IN U32 teamId,
OUT BM_TEAM_INFO2 *pTeam );
Parameters:
teamId
Handle to an adapter BM_ADAPTER_INFO structure.
pTeam
Pointer to BM_TEAM_INFO2 structure.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
page 61
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
Applications must call BmapiGetTeamListSnapShot() to learn available team
information in driver. Applications, then, call BmapiGetTeamSnapShot2() to
retrieve team information.
5.87 BmapiTeamFallbackPrimary
The function will force a SLB-Auto Fallback Disabled team to fallback to primary
NICs.
U32 BmapiTeamFallbackPrimary(
IN U32 teamId );
Parameters:
teamId
Handle to an adapter BM_ADAPTER_INFO structure.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetTeamListSnapShot() to learn available team
information in driver.
5.88 BmapiGetTeamDrvVersion
U32 BmapiGetTeamDrvVersion(
OUT U32 pMajor,
OUT U32 pMinor,
OUT U32 pBuild );
Parameters:
pMajor
Pointer to major version number.
pMinor
page 62
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
none
5.89 BmapiGetBRCMNicStatisticsEx
The BmapiGetBRCMNicStatisticsEx() will return Broadcom network adapters
proprietary statistics data.
U32 BmapiGetBRCMNicStatisticsEx(
IN U32 handle,
IN/OUT BM_BRCM_STATISTICS_EX *pBrcmStatisticsEx );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pBrcmStatistics
Pointer to a BM_BRCM_STATISTICS_EX structure for Broadcom network
adapter proprietary statistics information. The data will be filled out on
return.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications should allocate buffers for the statistics structures and pass pointers
to those structures to the function.
The ‘version’ field of BM_BRCM_STATISTICS_EX must be filled prior to call
BmapiGetBRCMNicStatisticsEx(). The latest version is defined as
BM_BRCM_STATISTICS_EX_VER in BMAPI.h.
page 63
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.90 BmapiGetBrcmNicParamList
The function will retrieve Broadcom network adapter's parameter list that are shown
in the advance tab in NIC's propery page.
U32 BmapiGetBrcmNicParamList(
IN U32 handle,
IN U8 *pParamList,
IN/OUT U32 *pLen );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pParamList
On input, applications pass a pointer to a buffer. On return the buffer will be
filled with list of parameters' names in REG_MULTI_SZ format (an array of
null-terminated strings, terminated by two null characters).
pLen
It is a pointer to a U32 number. On input, it is the length of buffer. On return,
it is the required buffer length.
Return Value:
Return BMAPI_OK if successful, otherwise a nonzero error code.
Remarks:
1. Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call
the function.
2. If 'pBuf' is NULL, 'pLen' will return the required length of buffer.
3. If the function failed due to buffer too short, 'pLen' will be the required length
of buffer.
4. Returned data in 'pParamList' is in REG_MULTI_SZ format. (an array of
null-terminated strings, terminated by two null characters.)
5.91 BmapiGetBrcmNicParamInfo
The function will retrieve information of Broadcom network adapter's parameter.
U32 BmapiGetBrcmNicParamInfo(
IN U32 handle,
IN U8 *pParam,
IN U8 *pCurVal,
IN/OUT U32 *pCurValLen,
IN U8 *pParamInfo,
IN/OUT U32 *pParamInfoLen,
page 64
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
IN U8 *pParamEnum,
IN/OUT U32 *pParamEnumLen );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pParam
pointer to the name of the parameter
pCurVal
On input, applications pass a pointer to a buffer that will be filled with
current value of the parameter.
pCurValLen
It is a pointer to a U32 number. On input, it is the length of buffer for
'pCurVal'. On return, it is the required buffer length for 'pCurVal'.
pParamInfo
On input, applications pass a pointer to a buffer. On return the buffer will be
filled with list of the parameter's information in REG_MULTI_SZ format (an
array of null-terminated strings, terminated by two null characters).
pParamInfoLen
It is a pointer to a U32 number. On input, it is the length of buffer for
'pParamInfo'. On return, it is the required buffer length for 'pParamInfo'.
pParamEnum
On input, applications pass a pointer to a buffer. On return the buffer will be
filled with list of the parameter's enum information in REG_MULTI_SZ
format (an array of null-terminated strings, terminated by two null
characters).
pParamEnumLen
It is a pointer to a U32 number. On input, it is the length of buffer for
'pParamEnum'. On return, it is the required buffer length for 'pParamEnum'.
Return Value:
Return BMAPI_OK if successful, otherwise a nonzero error code.
Remarks:
1. Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call
the function.
2. If 'pCurVal' is NULL, 'pCurValLen' will return the required length of
'pCurVal'.
3. If 'pParamInfo' is NULL, 'pParamInfoLen' will return the required length of
'pParamInfo'.
4. If 'pParamEnum' is NULL, 'pParamEnumLen' will return the required length
of 'pParamEnum'.
page 65
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.92 BmapiSetBrcmNicParam2
The function will retrieve information of Broadcom network adapter's parameter.
U32 BmapiSetBrcmNicParam2(
IN U32 handle,
IN U8 *pParam,
IN pNewVal );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pParam
pointer to the name of the parameter
pNewVal
the new value to set for 'pParam'
Return Value:
Return BMAPI_OK if successful, otherwise a nonzero error code.
page 66
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
1. Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call
the function.
2. If pNewVal is NULL, the 'pParam' will be deleted from registry.
5.93 BmapiGetVbdEnumInfo
The function will retrieve VBD enumeration information.
U32 BmapiGetVbdEnumInfo(
IN U32 handle,
OUT BM_VBD_ENUM_INFO *pVbdInfo );
Parameters:
handle
Handle to a VBD adapter BM_ADAPTER_INFO structure.
pVbdInfo
On input, applications pass a pointer to BM_VBD_ENUM_INFO structure.
On output, data will be filled out in the BM_VBD_ENUM_INFO structure.
Return Value:
Return BMAPI_OK if successful, otherwise a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
5.94 BmapiSetVbdEnumInfo
The function will set VBD enumeration information.
U32 BmapiSetVbdEnumInfo(
IN U32 handle,
IN BM_VBD_ENUM_INFO *pVbdInfo );
Parameters:
handle
Handle to a VBD adapter BM_ADAPTER_INFO structure.
pVbdInfo
page 67
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Return Value:
Return BMAPI_OK if successful, otherwise a nonzero error code.
Remarks:
1. Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call
the function.
2. If any change in device enumeration, application should reinitialize BMAPI
after BmapiSetVbdEnumInfo() return BMAPI_OK in order to collect latest
device information.
3. If the API returns BMAPI_REBOOT_REQUIRED, the system needs a reboot
for the change to take effect.
5.95 BmapiGetLicenseKey
The function will return specific license information for the NIC.
U32 BmapiGetLicenseKey(
IN U32 handle,
IN U32 key_index,
OUT BMAPI_LICENSE_INFO *pLicense );
Parameters:
handle
Handle to a VBD adapter BM_ADAPTER_INFO structure.
key_index
Index of the key. Current defined keys include
BMAPI_LICENSE_KEY_IDX_MANUFAC and
BMAPI_LICENSE_KEY_IDX_UPGRADE.
pLicense
Pointer to a buffer (BMAPI_LICENSE_INFO) that will filled with license
key information.
Return Value:
Return BMAPI_OK if successful, otherwise a nonzero error code.
Remarks:
page 68
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.96 BmapiSetLicenseKey
The function will set specific license information for the NIC.
U32 BmapiSetLicenseKey(
IN U32 handle,
IN U32 key_index,
IN U8 *key_buf,
IN U32 key_len );
Parameters:
handle
Handle to a VBD adapter BM_ADAPTER_INFO structure.
key_index
Index of the key. Currently support only
BMAPI_LICENSE_KEY_IDX_UPGRADE.
key_buf
Pointer to a buffer that contains license key information.
key_len
length of license key buffer (key_buf).
Return Value:
Return BMAPI_OK if successful, otherwise a nonzero error code.
Remarks:
1. Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call
the function.
2. If the API returns BMAPI_REBOOT_REQUIRED, the system needs a reboot
for the change to take effect.
5.97 BmapiGetResourceConfig
The function will get resource configuration for the NIC.
U32 BmapiGetResourceConfig(
IN U32 handle,
OUT BM_RES_CFG *pResCfg );
page 69
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Parameters:
handle
Handle to a VBD adapter BM_ADAPTER_INFO structure.
pResCfg
pointer to BM_RES_CFG buffer that will be filled on return.
Return Value:
Return BMAPI_OK if successful, otherwise a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
5.98 BmapiSetResourceConfig
The function will set resource configuration for the NIC.
U32 BmapiSetResourceConfig(
IN U32 handle,
IN BM_RES_CFG *pResCfg );
Parameters:
handle
Handle to a VBD adapter BM_ADAPTER_INFO structure.
pResCfg
pointer to BM_RES_CFG buffer that with data to set
Return Value:
Return BMAPI_OK if successful, otherwise a nonzero error code.
Remarks:
1. Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call
the function.
2. Only 'toe_reserved_con', 'rdma_reserved_con', 'iscsi_reserved_con' and
'iser_reserved_con' will be used to set the new configuration.
3. The reserved connections will be set ONLY when the stack of the technology
is to be enumerated by VBD. In other words, if a technology is either not
licensed or not enumerated by VBD, the reserved connedtions will not be set.
page 70
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
For example, if NDIS stack is not enabled, reserved TOE connections will be
set to 0.
4. If the API returns BMAPI_REBOOT_REQUIRED, the system needs a reboot
for the change to take effect.
5. Meaning of some other possible return codes:
• BMAPI_CON_EXCEED_HW_MAX: one or more reserved connections
exceed hardware limitation
• BMAPI_CON_EXCEED_LIC_MAX: one or more reserved connections
exceed lincensed connections
• BMAPI_RES_EXCEED_HW_MAX: total reserved resources exceed
limitation
5.99 BmapiGetTeamIDList
The function will return to caller for IDs of teams configured.
U32 BmapiGetTeamIDList(
IN U32 uNumOfTeam,
IN OUT U32 *pIDList );
Parameters:
uNumOfTeam
Pointer to number of U32 allocated in pIDList array.
pIDList
Pointer to buffers for IDs of team configured. IDs will be filled on return.
Return Value:
Return BMAPI_OK if successful, otherwise a nonzero error code.
Remarks:
Applications must call BmapiGetNumTeam() to understand how many teams are
in driver. Applications, then, allocate enough buffers to fill all ID and call
BmapiGetTeamIDList() to Team IDs. If uNumOfTeam is not big enough, the
function will return error code. After IDs were retrieved, applications can call
BmapiGetTeamInfo() to get information of a team.
5.100 BmapiGetTeamInfo
The function will return a team information specified by parameter 'team_id'.
U32 BmapiGetTeamInfo(
page 71
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
IN U32 team_id,
IN OUT BM_TEAM_INFO2 *pTeamInfo2 );
Parameters:
team_id
ID of the team to get information for
pTeamInfo2
Pointer to the buffer for the team information which will be filled on return
Return Value:
Return BMAPI_OK if successful, otherwise a nonzero error code.
Remarks:
Applications must call BmapiGetNumTeam() to understand how many teams are
in driver. Applications, then, allocate enough buffers to fill all ID and call
BmapiGetTeamIDList() to Team IDs. If uNumOfTeam is not big enough, the
function will return error code. After IDs were retrieved, applications can call
BmapiGetTeamInfo() to get information of a team.
5.101 BmapiApplyLBFOCfgEx
The function will apply configuration changes.
U32 BmapiApplyLBFOCfgEx(
IN BM_TEAM_INFO2 **ppTeamList,
IN U32 uNumOfTeam,
IN OUT U32 *pReboot );
Parameters:
ppTeamList
Pointer to the pointer array of BM_TEAM_INFO2 for all teams
uNumOfTeam
Number of pointers in 'ppTeamList' array
pReboot
Pointer to a boolean flag to indicate system need to reboot or not
Return Value:
Return BMAPI_OK if successful, otherwise a nonzero error code.
Remarks:
page 72
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.102 BmapiGetTeamStatisticsSnapShotEx
The function will return statistics information for a team from driver.
U32 BmapiGetTeamStatisticsSnapShotEx(
IN U32 teamId,
IN OUT BM_TEAM_STATISTICS_EX *pTeamStat );
Parameters:
teamId
Team Id of the target team
pTeamStat
Pointer to BM_TEAM_STATISTICS_EX structure
Return Value:
Return BMAPI_OK if successful, otherwise a nonzero error code.
Remarks:
Applications must call BmapiGetTeamListSnapShot() to learn available team
information in driver. Applications, then, call BmapiGetTeamStatisticsSnapShot()
to retrieve statistics information of a team.
5.103 BmapiGet5706FwInfo
The function will get firmware information for 5706 family NICs.
U32 BmapiGet5706FwInfo(
IN U32 handle,
IN OUT BM_FW_INFO_5706 *pFwInfo );
Parameters:
handle
Handle to the adapter
pFwInfo
Pointer to BM_FW_INFO_5706 buffer that will be filled on return
Return Value:
Return BMAPI_OK if successful, otherwise a nonzero error code.
page 73
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the 'handle' in BM_ADAPTER_INFO and use it to call the
function.
5.104 BmapiTestLEDsAsyncStart
The function will blink LEDs of the NIC at the provided frequency in asynchronous
style.
U32 BmapiTestLEDsAsyncStart(
IN U32 handle,
IN U32 uFreq );
Parameters:
handle
Handle to the adapter
uFreq
The frequency of the LEDs to blink. (1 to 10).
Return Value:
Return BMAPI_OK if the LED blinking thread is successfully started, otherwise
a nonzero error code.
Remarks:
1. Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call
the function.
2. The LEDs will be kept blinking till
• BmapiTestLEDsAsyncStop() is called
• BmapiUnInitDiag() is called
• BMAPI is uninitialized and instance count down to zero
• the process exits out properly
5.105 BmapiTestLEDsAsyncStop
The function will stop async. LEDs blinking operation.
page 74
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U32 BmapiTestLEDsAsyncStop(
IN U32 handle,
IN OUT U32 *pResult );
Parameters:
handle
Handle to the adapter
pResult
The return code of the LED blinking operation
Return Value:
Return BMAPI_OK if the LED blinking stop properly and result code is
retrieved, otherwise a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic(), etc. to get adapter information.
Applications will find the ‘handle’ in BM_ADAPTER_INFO and use it to call the
function.
5.106 BmapiGetASFMailboxCount
BmapiGetASFMailboxCount will return the number of supported mailboxes.
U32 BmapiGetASFMailboxCount(
IN U32 handle,
OUT U32 *pCount,
OUT U32 *pTotalMbxLen );
Parameters:
handle
handle to the adapter
pCount
number of supported mailboxes
pTotalMbxLen
total number of bytes for all mailboxes in NVRAM
Return Value:
Return BMAPI_OK if successful, otherwise a nonzero error code.
Remarks:
1. Application must call BmapiInitDiag() before calling this API.
page 75
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.107 BmapiGetASFMailboxStatus
BmapiGetASFMailboxStatus will return the status of the mailbox.
U32 BmapiGetASFMailboxStatus(
IN U32 handle,
IN U32 uMboxNum,
OUT BM_ASF_MBOX_STATUS *pMboxStatus );
Parameters:
handle
handle to the adapter
uMboxNum
number the mailbox to read
pMboxStatus
buffer to the mailbox status
Return Value:
Return BMAPI_OK if successful, otherwise a nonzero error code.
Remarks:
1. Application must call BmapiInitDiag() before calling this API.
2. Mailbox number is '0' based.
5.108 BmapiSetASFMailboxStatus
BmapiSetASFMailboxStatus will set the status of the mailbox.
U32 BmapiSetASFMailboxStatus(
IN U32 handle,
IN U32 uMboxNum,
IN BM_ASF_MBOX_STATUS *pMboxStatus );
Parameters:
handle
handle to the adapter
uMboxNum
number the mailbox to set data to
pMboxStatus
buffer to the mailbox status
page 76
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Return Value:
Return BMAPI_OK if successful, otherwise a nonzero error code.
Remarks:
1. Application must call BmapiInitDiag() before calling this API.
2. Mailbox number is '0' based.
3. 'length' field will be ignored in BmapiSetASFMailboxStatus().
5.109 BmapiGetASFMailboxContents
BmapiGetASFMailboxContents will get contents of the mailbox.
U32 BmapiGetASFMailboxContents(
IN U32 handle,
IN U32 uMboxNum,
IN U32 uOffset,
IN OUT U32 *pLength,
OUT U8 *pBuf );
Parameters:
handle
handle to the adapter
uMboxNum
number the mailbox to read data from
uOffset
offset in the content to read the data
pLength
pointer to the length of data to read (bytes)
pBuf
pointer to the buffer for the data being read
Return Value:
Return BMAPI_OK if successful, otherwise a nonzero error code.
Remarks:
1. Application must call BmapiInitDiag() before calling this API.
2. Mailbox number is '0' based.
3. If 'uOffset' + '*pLength' is longer than 'fill_level' of the mailbox, '*pLength'
will set to 'fill_level' - 'uOffset'.
page 77
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.110 BmapiSetASFMailboxContents
BmapiSetASFMailboxContents will set contents of the mailbox.
U32 BmapiSetASFMailboxContents(
IN U32 handle,
IN U32 uMboxNum,
IN U32 uOffset,
IN U32 uLength,
IN U8 *pBuf );
Parameters:
handle
handle to the adapter
uMboxNum
number the mailbox to set data to
uOffset
offset in the content to write the data
uLength
length of data to write (bytes)
pBuf
pointer to the buffer for the data to be written to the mailbox
Return Value:
Return BMAPI_OK if successful, otherwise a nonzero error code.
Remarks:
1. Application must call BmapiInitDiag() before calling this API.
2. Mailbox number is '0' based.
3. The 'fill_level' in status block of the mailbox will NOT be updated.
4. 'uOffset' + 'uLength' can not be greater than existing 'length' in the status of
the mailbox.
5.111 BmapiTestASFMailboxes
BmapiTestASFMailboxes will test the integrity of ASF mailbox.
U32 BmapiTestASFMailboxes(
IN U32 handle );
Parameters:
handle
handle to the adapter
page 78
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Return Value:
Return BMAPI_OK if the ASF mailbox appears to be ok, otherwise a nonzero
error code.
Remarks:
1. Application must call BmapiInitDiag() before calling this API.
2. Mailbox number is '0' based.
5.112 BmapiTestCable
BmapiTestCable will perform cable diagnostics for the nic.
U32 BmapiTestCable(
IN U32 handle,
OUT BMAPI_CAB_DIAG *pCabDiag );
Parameters:
handle
handle to the adapter
pCabDiag
pointer to cable diagnostics result
Return Value:
Return BMAPI_OK if the ASF mailbox appears to be ok, otherwise a nonzero
error code.
Remarks:
1. Before calling the function, make sure application had called BmapiInitDiag()
to initialize diagnostic setup and called BmapiSuspendDriverEx() to stop
traffic on the NIC. After the function returned, call BmapiResumeDriverEx()
to resume traffic and call BmapiUnInitDiag() to terminate diagnostic setup.
2. If BMAPI_OK is returned from the API, the application should check 'status'
for each channel to determine the result for each channel.
3. The definition of 'status' is defined in BMAPI.h and they look like
'BMAPI_CABDIAG_STATUS_XXXXX'.
4. The 'distanceCm' will contain the length of the channel only when the 'status'
of the channel indicates that length is available.
page 79
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.113 BmapiGetOffloadStackInfo
BmapiGetOffloadStackInfo() will return oflload stack information from driver.
U32 BmapiGetOffloadStackInfo(
IN U32 handle,
IN U32 uStackIdx,
OUT BMAPI_OFLD_STACK_INFO *pStackInfo );
Parameters:
handle
handle to the adapter
uStackIdx
which stack to query
pStackInfo
pointer to a BMAPI_OFLD_STACK_INFO structure for the returned stack
information.
Return Value:
Return BMAPI_OK if the ASF mailbox appears to be ok, otherwise a nonzero
error code.
Remarks:
Applications should allocate buffers for the statistics structures and pass pointers
to those structures to the function.
5.114 BmapiGetISCSIConfig
BmapiGetISCSIConfig() will retrieve iSCSI configuration..
U32 BmapiGetISCSIConfig(
IN U32 handle,
OUT BMAPI_ISCSI_CONFIG *pConfig );
Parameters:
handle
handle to the VBD adapter
pConfig
On input, applications pass a pointer to BMAPI_ISCSI_CONFIG structure.
On return, data will be filled out in the BMAPI_ISCSI_CONFIG structure.
Return Value:
Return BMAPI_OK if iSCSI configuration is retrieved successfully, otherwise a
nonzero error code will be returned.
page 80
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
Applications must call BmapiGetAllPhyNic() or BmapiGetPhyNic() to get
adapter information. Applications will find the 'handle' in BM_ADAPTER_INFO
and use it to call the function.
5.115 BmapiSetISCSIConfig
BmapiSetISCSIConfig() will set iSCSI configuration.
U32 BmapiSetISCSIConfig(
IN U32 handle,
IN BMAPI_ISCSI_CONFIG *pConfig );
Parameters:
handle
handle to the VBD adapter
pConfig
Applications pass a pointer to BMAPI_ISCSI_CONFIG structure with the
data that are supposed to set.
Return Value:
Return BMAPI_OK if iSCSI configuration is updated successfully, otherwise a
nonzero error code will be returned.
Remarks:
• Applications must call BmapiGetAllPhyNic() or BmapiGetPhyNic() to get
adapter information. Applications will find the 'handle' in
BM_ADAPTER_INFO and use it to call the function.
• If any change in iSCSI configuration, application should re-start iSCSI stack
to make new configuration taking effect.
5.116 BmapiGet57710FwInfo
BmapiGet57710FwInfo() will get firmware information for 57710 family NICs.
U32 BmapiGet57710FwInfo(
IN U32 handle,
OUT BM_FW_INFO_57710 *pFwInfo );
page 81
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Parameters:
handle
handle to the VBD adapter
pFwInfo
Applications pass a pointer to BM_FW_INFO_57710 buffer that will be
filled on return.
Return Value:
Return BMAPI_OK if firmware information is retrieved successfully, otherwise a
nonzero error code will be returned.
Remarks:
Applications must call BmapiGetAllPhyNic() or BmapiGetPhyNic() to get
adapter information. Applications will find the 'handle' in BM_ADAPTER_INFO
and use it to call the function.
5.117 BmapiGetMgmtProcessors
BmapiGetMgmtProcessors() will return the type of management processors on the
controllers.
U32 BmapiGetMgmtProcessors(
IN U32 handle,
OUT U32 *pProc );
Parameters:
handle
handle to a NIC port
pProc
pointer to a U32 number. The number is a bit definition to various types of
management processors in our controllers.
Return Value:
Return BMAPI_OK if information was retrieved successfully, otherwise a
nonzero error code will be returned.
Remarks:
Applications must call BmapiGetAllPhyNic() or BmapiGetPhyNic() to get
adapter information. Applications will find the 'handle' in BM_ADAPTER_INFO
and use it to call the function.
page 82
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.118 BmapiGetMgmtEnableState
BmapiGetMgmtEnableState() will return whether management FW is enabled or
not.
U32 BmapiGetMgmtEnableState(
IN U32 handle,
OUT U32 *pEnable );
Parameters:
handle
handle to a NIC port
pEnable
pointer to a U32 number. Set to '0' if management FW is disabled in
NVRAM. Non-zero value if it is enabled in NVRAM.
Return Value:
Return BMAPI_OK if information was retrieved successfully, otherwise a
nonzero error code will be returned.
Remarks:
Applications must call BmapiGetAllPhyNic() or BmapiGetPhyNic() to get
adapter information. Applications will find the 'handle' in BM_ADAPTER_INFO
and use it to call the function.
5.119 BmapiSetMgmtEnableState
BmapiSetMgmtEnableState() will set management FW to enable or disable.
U32 BmapiSetMgmtEnableState(
IN U32 handle,
IN U32 bEnable );
Parameters:
handle
handle to a NIC port
bEnable
'0' to disable management FW and non-zero to enabled.
Return Value:
page 83
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
Applications must call BmapiGetAllPhyNic() or BmapiGetPhyNic() to get
adapter information. Applications will find the 'handle' in BM_ADAPTER_INFO
and use it to call the function.
5.120 BmapiAssertMgmtEvent
BmapiAssertMgmtEvent() will assert an APE event.
U32 BmapiAssertMgmtEvent(
IN U32 handle,
IN U8 uEventID,
IN U8 uEventData,
IN U8 Reserved,
IN void *pMsg,
IN U32 uMsgLen );
Parameters:
handle
handle to a NIC port
uEventID
Event ID
uEventData
Event data
Reserved
reserved
*pMsg
Pointer to the message for the event
uMsgLen
length of the message in ‘pMsg’
Return Value:
Return BMAPI_OK if event was asserted successfully, otherwise a nonzero error
code will be returned.
Remarks:
page 84
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.121 BmapiGetMgmtOTPKeys
BmapiGetMgmtOTPKeys() will read OTP keys.
U32 BmapiGetMgmtOTPKeys(
IN U32 handle,
OUT U32 *pKey1,
OUT U32 *pKey2 );
Parameters:
handle
Handle to a NIC port
pKey1
Pointer to the first part of the key on return
pKey2
Pointer to the second part of the key on return
Return Value:
Return BMAPI_OK if keys were read retrieved successfully, otherwise a nonzero
error code will be returned.
Remarks:
Applications must call BmapiGetAllPhyNic() or BmapiGetPhyNic() to get
adapter information. Applications will find the 'handle' in BM_ADAPTER_INFO
and use it to call the function.
5.122 BmapiGetMgmtDataLength
BmapiGetMgmtDataLength() will get the length of APE data.
U32 BmapiGetMgmtDataLength(
IN U32 handle,
OUT U32 *pLength );
Parameters:
handle
Handle to a NIC port
pLength
Pointer to the APE data length (filled on return)
page 85
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Return Value:
Return BMAPI_OK if length was read successfully, otherwise a nonzero error
code will be returned.
Remarks:
Applications must call BmapiGetAllPhyNic() or BmapiGetPhyNic() to get
adapter information. Applications will find the 'handle' in BM_ADAPTER_INFO
and use it to call the function.
5.123 BmapiGetMgmtData
BmapiGetMgmtData() will get APE data.
U32 BmapiGetMgmtData(
IN U32 handle,
IN U32 uStart,
OUT void *pBuf,
IN U32 uBufLen );
Parameters:
handle
Handle to a NIC port
uStart
Starting offset to read APE data (from beginning of APE data)
pBuf
Pointer to the APE data (filled on return)
uBufLen
Length of buffer (‘pBuf’)
Return Value:
Return BMAPI_OK if APE data is read successfully, otherwise a nonzero error
code will be returned.
Remarks:
Applications must call BmapiGetAllPhyNic() or BmapiGetPhyNic() to get
adapter information. Applications will find the 'handle' in BM_ADAPTER_INFO
and use it to call the function.
page 86
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.124 BmapiSetMgmtData
BmapiSetMgmtData() will set APE data.
U32 BmapiSetMgmtData(
IN U32 handle,
IN U32 uStart,
IN void *pBuf,
IN U32 uBufLen );
Parameters:
handle
Handle to a NIC port
uStart
Starting offset to write APE data (from beginning of APE data)
pBuf
Pointer to the APE data that will write to the NIC
uBufLen
Length of buffer (‘pBuf’) to write to NIC
Return Value:
Return BMAPI_OK if APE data is written successfully, otherwise a nonzero error
code will be returned.
Remarks:
Applications must call BmapiGetAllPhyNic() or BmapiGetPhyNic() to get
adapter information. Applications will find the 'handle' in BM_ADAPTER_INFO
and use it to call the function.
5.125 BmapiGetMgmtConfigLength
BmapiGetMgmtConfigLength() will get the length of management configuration
data.
U32 BmapiGetMgmtConfigLength(
IN U32 handle,
OUT U32 *pLength );
Parameters:
handle
Handle to a NIC port
pLength
Pointer to the management configuration data length (filled on return)
Return Value:
page 87
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
Applications must call BmapiGetAllPhyNic() or BmapiGetPhyNic() to get
adapter information. Applications will find the 'handle' in BM_ADAPTER_INFO
and use it to call the function.
5.126 BmapiGetMgmtConfig
BmapiGetMgmtConfig() will read management configuration data.
U32 BmapiGetMgmtConfig(
IN U32 handle,
OUT void *pBuf,
IN U32 uBufLen );
Parameters:
handle
Handle to a NIC port
pBuf
Pointer to the management configuration data (filled on return)
uBufLen
Length of the buffer for management configuration data (‘pBuf’)
Return Value:
Return BMAPI_OK if the management configuration data is read successfully,
otherwise a nonzero error code will be returned.
Remarks:
Applications must call BmapiGetAllPhyNic() or BmapiGetPhyNic() to get
adapter information. Applications will find the 'handle' in BM_ADAPTER_INFO
and use it to call the function.
5.127 BmapiSetMgmtConfig
BmapiSetMgmtConfig() will write management configuration data.
U32 BmapiSetMgmtConfig(
page 88
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
IN U32 handle,
IN void *pBuf,
IN U32 uBufLen );
Parameters:
handle
Handle to a NIC port
pBuf
Pointer to the management configuration data that will write to the NIC
uBufLen
Length of buffer for management configuration data to write
Return Value:
Return BMAPI_OK if the management configuration data is written to the NIC
successfully, otherwise a nonzero error code will be returned.
Remarks:
Applications must call BmapiGetAllPhyNic() or BmapiGetPhyNic() to get
adapter information. Applications will find the 'handle' in BM_ADAPTER_INFO
and use it to call the function.
5.128 BmapiGetMgmtSharedMem
BmapiGetMgmtSharedMem() will read APE shared memory.
U32 BmapiGetMgmtSharedMem(
IN U32 handle,
IN U32 uStart,
IN void *pBuf,
IN U32 uBufLen );
Parameters:
handle
Handle to a NIC port
uStart
Starting offset to read APE shared memory
pBuf
Pointer to the APE shared memory data (filled on return)
uBufLen
Length of buffer (‘pBuf’) in bytes, must be multiple of DWORD
Return Value:
Return BMAPI_OK if APE shared memory is read successfully, otherwise a
nonzero error code will be returned.
page 89
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
Applications must call BmapiGetAllPhyNic() or BmapiGetPhyNic() to get
adapter information. Applications will find the 'handle' in BM_ADAPTER_INFO
and use it to call the function.
5.129 BmapiGetISCSIConfig2
BmapiGetISCSIConfig2() will retrieve iSCSI configuration.
U32 BmapiGetISCSIConfig2(
IN U32 handle,
OUT BMAPI_ISCSI_CONFIG *pConfig,
OUT BM_ISCIS_IPV6_ADDR *pStaticIPv6,
IN/OUT U32 *pStaticIPv6Len,
OUT BM_ISCIS_IPV6_ADDR *pGatewayIPv6,
IN/OUT U32 *pGatewayIPv6Len );
Parameters:
handle
Handle to a VBD
pConfig
On input, applications pass a pointer to BMAPI_ISCSI_CONFIG structure.
On return, data will be filled out in the BMAPI_ISCSI_CONFIG structure.
pStaticIPv6
On input, applications pass a pointer to BM_ISCIS_IPV6_ADDR
structure(s). On return, data will be filled out. If *pStaticIPv6Len is 0,
'pStaticIPv6' will be ignored.
pStaticIPv6Len
On input, applications pass a pointer to the buffer length of 'pStaticIPv6'. On
return, the actual length of 'pStaticIPv6' will be retyrned. If the value of the
length is 0 at input, the required length will be returned and 'pStaticIPv6' will
be ignored.
pGatewayIPv6
On input, applications pass a pointer to BM_ISCIS_IPV6_ADDR
structure(s). On return, data will be filled out. If *pGatewayIPv6Len is 0,
'pGatewayIPv6' will be ignored.
pGatewayIPv6Len
On input, applications pass a pointer to the buffer length of 'pGatewayIPv6'.
On return, the actual length of 'pStaticIPv6' will be retyrned. If the value of
the length is 0 at input, the required length will be returned and
'pGatewayIPv6' will be ignored.
Return Value:
page 90
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
Applications must call BmapiGetAllPhyNic() or BmapiGetPhyNic() to get
adapter information. Applications will find the 'handle' in BM_ADAPTER_INFO
and use it to call the function.
5.130 BmapiSetISCSIConfig2
BmapiSetISCSIConfig2() will set iSCSI configuration.
U32 BmapiSetISCSIConfig2(
IN U32 handle,
OUT BMAPI_ISCSI_CONFIG *pConfig,
OUT BM_ISCIS_IPV6_ADDR *pStaticIPv6,
IN U32 uStaticIPv6Len,
OUT BM_ISCIS_IPV6_ADDR *pGatewayIPv6,
IN U32 uGatewayIPv6Len );
Parameters:
handle
Handle to a VBD
pConfig
a pointer to BMAPI_ISCSI_CONFIG structure with the data that will be set.
pStaticIPv6
a pointer to BM_ISCIS_IPV6_ADDR structure(s) with the data that will be
set.
uStaticIPv6Len
buffer length of 'pStaticIPv6'.
pGatewayIPv6
a pointer to BM_ISCIS_IPV6_ADDR structure(s) with the data that will be
set.
uGatewayIPv6Len
buffer length of 'pGatewayIPv6'.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
page 91
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.131 BmapiWritePhyFirmware
BmapiWritePhyFirmware() writes PHY firmware to PHY devices.
U32 BmapiWritePhyFirmware(
IN U32 handle,
IN U32 *pDataBuf,
IN U32 uBufLen,
IN U8 *pChk );
Parameters:
handle
Handle to a VBD
pDataBuf
pointer to PHY firmware.
uBufLen
length of PHY firmware in 'pDataBuf' (in byte).
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
Applications must call BmapiGetAllPhyNic() or BmapiGetPhyNic() to get
adapter information. Applications will find the 'handle' in BM_ADAPTER_INFO
and use it to call the function.
5.132 BmapiCreateMgmtData
BmapiCreateMgmtData() will create APE_DATA section in NVRAM. If the
APE_DATA exists, it will be resized to 'uLength'. The content of APE_DATA
should be zeroed-out.
U32 BmapiCreateMgmtData(
IN U32 handle,
IN U32 uLength );
page 92
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Parameters:
handle
Handle to a NIC port
uLength
length of APE_DATA
Return Value:
Return BMAPI_OK if APE_DATA created, otherwise a nonzero error code will
be returned.
Remarks:
Applications must call BmapiGetAllPhyNic() or BmapiGetPhyNic() to get
adapter information. Applications will find the 'handle' in BM_ADAPTER_INFO
and use it to call the function.
5.133 BmapiGetMgmtWebDataLength
BmapiGetMgmtWebDataLength()will get the length of APE WEB data (if it exists).
U32 BmapiGetMgmtWebDataLength(
IN U32 handle,
OUT U32 *pLength );
Parameters:
handle
Handle to a NIC port
pLength
pointer to the APE WEB data length (filled on return)
Return Value:
Return BMAPI_OK if length was read successfully, otherwise a nonzero error
code will be returned.
Remarks:
Applications must call BmapiGetAllPhyNic() or BmapiGetPhyNic() to get
adapter information. Applications will find the 'handle' in BM_ADAPTER_INFO
and use it to call the function.
page 93
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.134 BmapiGetMgmtWebData
BmapiGetMgmtWebData() will get APE WEB data.
U32 BmapiGetMgmtWebData(
IN U32 handle,
IN U32 uStart,
OUT void *pBuf,
IN U32 uBufLen );
Parameters:
handle
Handle to a NIC port
uStart
Starting offset to read APE WEB data (from beginning of APE WEB data)
pBuf
Pointer to the APE WEB data (filled on return)
uBufLen
Length of buffer (‘pBuf’)
Return Value:
Return BMAPI_OK if APE WEB data is read successfully, otherwise a nonzero
error code will be returned.
Remarks:
Applications must call BmapiGetAllPhyNic() or BmapiGetPhyNic() to get
adapter information. Applications will find the 'handle' in BM_ADAPTER_INFO
and use it to call the function.
5.135 BmapiSetMgmtWebData
BmapiSetMgmtWebData() will set APE WEB data.
U32 BmapiSetMgmtWebData(
IN U32 handle,
IN U32 uStart,
IN void *pBuf,
IN U32 uBufLen );
Parameters:
handle
Handle to a NIC port
uStart
Starting offset to write APE WEB data (from beginning of APE WEB data)
pBuf
Pointer to the APE WEB data that will write to the NIC
page 94
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
uBufLen
Length of buffer (‘pBuf’) to write to NIC
Return Value:
Return BMAPI_OK if APE WEB data is written successfully, otherwise a
nonzero error code will be returned.
Remarks:
1. Applications must call BmapiGetAllPhyNic() or BmapiGetPhyNic() to
get adapter information. Applications will find the 'handle' in
BM_ADAPTER_INFO and use it to call the function.
2. ‘uBufLen’ must be in multiple of 4 bytes.
5.136 BmapiCreateMgmtWebData
BmapiCreateMgmtWebData() will create APE_WEB_DATA section in NVRAM. If
the APE_WEB_DATA exists, it will be resized to 'uLength'. The content of
APE_WEB_DATA should be zeroed-out.
U32 BmapiCreateMgmtWebData(
IN U32 handle,
IN U32 uLength );
Parameters:
handle
Handle to a NIC port
uLength
length of APE_WEB_DATA
Return Value:
Return BMAPI_OK if APE_WEB_DATA created, otherwise a nonzero error
code will be returned.
Remarks:
Applications must call BmapiGetAllPhyNic() or BmapiGetPhyNic() to get
adapter information. Applications will find the 'handle' in BM_ADAPTER_INFO
and use it to call the function.
page 95
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.137 BmapiRetrieveMultiLinkStatus
BmapiRetrieveMultiLinkStatus() will return multiple link information.
U32 BmapiRetrieveMultiLinkStatus(
IN/OUT BM_LINK_STATUS_EX **ppLinkStatusEx,
IN U32 uNumOfStruct );
Parameters:
ppLinkStatusEx
Pointer to the pointer array of BM_LINK_STATUS_EX for all link status
structures that need to be filled.
uNumOfStruct
Number of BM_LINK_STATUS_EX structures in 'ppLinkStatusEx' array.
Return Value:
Return BMAPI_OK if all information were collected, otherwise a nonzero error
code will be returned.
Remarks:
1. Applications must call BmapiGetAllPhyNic() or
BmapiGetAllUnassignedNic() to get adapter information. Applications will
find the 'handle' in BM_ADAPTER_INFO and use it to call the function.
2. On input, 'version' and 'handle' fields must be provided.
5.138 BmapiGetISCSIRuntimeIPCount
BmapiGetISCSIRuntimeIPCount() will retrieve number of IPV4/IPV6 addresses
configured for one or more iSCSI ports.
U32 BmapiGetISCSIRuntimeIPCount(
IN/OUT BM_ISCSI_IP_COUNT *pIpCount,
IN U32 uCount );
Parameters:
pIpCount
On input, applications pass a pointer to empty BM_ISCSI_IP_COUNT array.
On return, data will be filled out.
uCount
number of BM_ISCSI_IP_COUNT in 'pIpCount'.
Return Value:
Return BMAPI_OK if information were collected, otherwise a nonzero error code
will be returned.
page 96
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
The caller of the function must call CoInitializeEx() to initialize COM and call
CoInitializeSecurity() to initialize security values for the process prior to calling
the function.
5.139 BmapiGetISCSIRuntimeIP
BmapiGetISCSIRuntimeIP() will retrieve iSCSI runtime IP information.
U32 BmapiGetISCSIRuntimeIP(
IN/OUT BM_ISCSI_IPV4_RT **ppIPv4,
IN U32 uIPv4Len,
IN/OUT BM_ISCSI_IPV6_RT **ppIPv6,
IN U32 uIPv6Len );
Parameters:
ppIPv4
On input, applications pass a pointer to array of BM_ISCSI_IPV4_RT
pointers. On return, data will be filled out.
uIPv4Len
Number of pointers to BM_ISCSI_IPV4_RT passed down in 'ppIPv4'.
ppIPv6
On input, applications pass a pointer to array of BM_ISCSI_IPV6_RT
pointers. On return, data will be filled out.
uIPv6Len
Number of pointers to BM_ISCSI_IPV4_RT passed down 'ppIPv6'.
Return Value:
Return BMAPI_OK if information were collected, otherwise a nonzero error code
will be returned.
Remarks:
The caller of the function must call CoInitializeEx() to initialize COM and call
CoInitializeSecurity() to initialize security values for the process prior to calling
the function.
page 97
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
5.140 BmapiGetISCSIRuntimeStatistics
BmapiGetISCSIRuntimeStatistics() will retrieve iSCSI runtime statistics
information.
U32 BmapiGetISCSIRuntimeStatistics(
IN/OUT BM_ISCSI_STATS **ppStats,
IN U32 U32 uStatsLen );
Parameters:
ppStats
On input, applications pass a pointer to array of BM_ISCSI_STATS pointers.
On return, data will be filled out.
uStatsLen
Number of pointers to BM_ISCSI_STATS passed down in 'ppStats'
Return Value:
Return BMAPI_OK if information were collected, otherwise a nonzero error code
will be returned.
Remarks:
The caller of the function must call CoInitializeEx() to initialize COM and call
CoInitializeSecurity() to initialize security values for the process prior to calling
the function.
5.141 BmapiGetISCSISessionStatistics
BmapiGetISCSISessionStatistics() will retrieve iSCSI session statistics information.
U32 BmapiGetISCSISessionStatistics(
IN/OUT BM_ISCSI_SESSION_STATS **ppSessionStats,
IN U32 U32 uStatsLen );
Parameters:
ppSessionStats
On input, applications pass a pointer to array of
BM_ISCSI_SESSION_STATS pointers. On return, data will be filled out.
uStatsLen
Number of pointers to BM_ISCSI_SESSION_STATS passed down in
'ppSessionStats'.
Return Value:
Return BMAPI_OK if information were collected, otherwise a nonzero error code
will be returned.
page 98
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
The caller of the function must call CoInitializeEx() to initialize COM and call
CoInitializeSecurity() to initialize security values for the process prior to calling
the function.
5.142 BmapiResetNdisStatistics
BmapiResetNdisStatistics() will reset NDIS statistics from driver.
U32 BmapiResetNdisStatistics(
IN U32 handle );
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
Return Value:
Return BMAPI_OK if reset is done, otherwise a nonzero error code will be
returned.
Remarks:
1. The handle must belong to an NDIS device. For NX2, it must belong to the
NDIS child node.
2. The API does not support WinPE environment.
5.143 BmapiWriteFirmware2
BmapiWriteFirmware2() will write firmware information starting at specified offset
with provided data and len to write to.
U32 BmapiWriteFirmware2(
IN U32 handle,
IN U32 uOffset,
IN U32 *pDataBuf,
IN U32 uBufLen,
IN U8 *pChk,
IN U32 uTarget );
Parameters:
page 99
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
handle
Handle to an adapter BM_ADAPTER_INFO structure.
uOffset
Starting offset to write data to.
pDataBuf
Data to write to firmware. Data are in 32-bit array.
uBufLen
Number of elements in data buffer array. For example, 2 means 2 32-bit data
in the data buffer.
uTarget
BMAPI_NVRAM_TARGET_ACTIVE,
BMAPI_NVRAM_TARGET_NVRAM or
BMAPI_NVRAM_TARGET_OTP.
Return Value:
Return BMAPI_OK if reset is done, otherwise a nonzero error code will be
returned.
Remarks:
1. Applications need to call BmapiInitDiag() prior to call this and call
BmapiUnInitDiag() after everything is done.
2. The newly programmed firmware will not be effective till:
- The machine reboot.
- The driver is disabled and re-enabled. Can be done manually or through
BmapiEnableDevice().
- Call BmapiSuspendDriverEx() followed by BmapiResumeDriverEx().
This is the most preferrable method.
3. ‘uTarget’ is applicable only to NetLink and NetXtreme.
4. BMAPI_NVRAM_TARGET_OTP is applicable only to some NetXtreme
devices only.
5.144 BmapiReadFirmware2
BmapiReadFirmware2() will read firmware information starting at specified offset
with provided data buffer and length to read.
U32 BmapiReadFirmware2(
IN U32 handle,
IN U32 uOffset,
IN U32 *pDataBuf,
IN U32 uBufLen,
IN U8 *pChk,
IN U32 uTarget )
page 100
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
uOffset
Starting offset to read data from.
pDataBuf
Data buffer from firmware datra. Data are in 32-bit array.
uBufLen
Number of elements in data buffer array. For example, 2 means 2 32-bit data
in the data buffer.
uTarget
BMAPI_NVRAM_TARGET_ACTIVE,
BMAPI_NVRAM_TARGET_NVRAM or
BMAPI_NVRAM_TARGET_OTP.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
1. Applications need to call BmapiInitDiag() prior to call this and call
BmapiUnInitDiag() after everything is done.
2. ‘uTarget’ is applicable only to NetLink and NetXtreme.
3. BMAPI_NVRAM_TARGET_OTP is applicable only to some NetXtreme
devices only.
5.145 BmapiGetReverseNWayStatus
BmapiGetReverseNWayStatus() will get Reverse nWay feature status from
NVRAM.
U32 BmapiGetReverseNWayStatus(
IN U32 handle,
OUT U32 *pEnable )
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pEnable
Pointer to a U32 number. If 0, Reverse nWay is disabled. Otherwise, Reverse
nWay is enabled.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
page 101
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Remarks:
none
5.146 BmapiSetReverseNWay
BmapiSetReverseNWay() will set Reverse nWay feature to NVRAM.
U32 BmapiSetReverseNWay(
IN U32 handle,
IN U32 uEnable )
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
uEnable
If 0, Reverse nWay is disabled. Otherwise, Reverse nWay is enabled.
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
none
5.147 BmapiGetNicStatisticsV3
BmapiGetNicStatisticsV3() will return statistics information for a NDIS driver.
U32 BmapiSetReverseNWay(
IN U32 handle,
IN/OUT BM_GENERAL_STATISTICS_EX *pGenStatistics,
IN/OUT BM_ETHERNET_STATISTICS_EX *pEthStatistics )
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pGenStatistics
page 102
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
1. Applications should allocate buffers for the statistics structures and pass
pointers to those structures to the function. Application should be aware
that some information might not be available.
2. “version” in the structure should be initialized on input.
5.148 BmapiOfldStatistics
BmapiOfldStatistics() will query offload statistics from NDIS driver.
U32 BmapiSetReverseNWay(
IN U32 handle,
IN/OUT BM_IP_OFLD_STATS *pIp4OfldStat,
IN/OUT BM_IP_OFLD_STATS *pIp6OfldStat,
IN/OUT BM_TCP_OFLD_STATS *pTcp4OfldStat,
IN/OUT BM_TCP_OFLD_STATS *pTcp6OfldStat )
Parameters:
handle
Handle to an adapter BM_ADAPTER_INFO structure.
pIp4OfldStat
Pointer to a BM_IP_OFLD_STATS structure for the returned IPv4 offload
statistics information.
pIp6OfldStat
Pointer to a BM_IP_OFLD_STATS structure for the returned Ipv6 offload
statistics information.
pTcp4OfldStat
Pointer to a BM_TCP_OFLD_STATS structure for the returned TCPv4
offload statistics information.
pTcp6OfldStat
Pointer to a BM_TCP_OFLD_STATS structure for the returned TCPv6
offload statistics information.
page 103
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
Return Value:
Return BMAPI_OK if successful; otherwise return a nonzero error code.
Remarks:
1. Applications should allocate buffers for the statistics structures and pass
pointers to those structures to the function. Application should be aware
that some information might not be available.
2. “version” in the structure should be initialized on input.
3. The statistics is available only for NDIS 5.2 or later.
4. The miniport needs to support chimney offload.
page 104
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
page 105
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
page 106
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
7. Appendix
page 107
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
// feature failed
#define BMAPI_DUPLICATE_TEAM_NAME 41 // applications submit
// duplicate team name when
// calling BmapiApplyLBFOCfg
#define BMAPI_DUPLICATE_PHY_NIC 42 // applications submit
// duplicate physical NIC in
// team configuration when
// calling BmapiApplyLBFOCfg
#define BMAPI_NO_VLAN_NAME 43 // applications submit more
// than one virtual adapter
// for a team and one or more
// virtual adapter doesn't have
// a VLAN name when calling
// BmapiApplyLBFOCfg
#define BMAPI_DUPLICATE_VLAN_NAME 44 // applications submit
// duplicate VLAN name in a
// team when calling
// BmapiApplyLBFOCfg
#define BMAPI_DUPLICATE_VLAN_ID 45 // applications submit
// duplicate VLAN ID in a
// team when calling
// BmapiApplyLBFOCfg
#define BMAPI_INVALID_VLAN_ID 46 // application submit invalid
// VLAN ID when calling
// BmapiApplyLBFOCfg. Valid
// VLAN ID could be from 0 to
// 4094.
#define BMAPI_TOO_MANY_TAGGED_VLANS 47 // we only support up to
// BMAPI_MAXIMUM_MEMBERS_VIR_TEAM - 1
// tagged VLANs plus one
// optional untagged VLAN
#define BMAPI_TOO_MANY_PHY_NICS 48 // too many physical NICs in
// a team
#define BMAPI_TOO_MANY_VIR_NICS 49 // too many virtual NICs in
// a team
#define BMAPI_DUPLICATE_TEAM_ID 50 // applications submit
// duplicate team ID when
// calling BmapiApplyLBFOCfg
#define BMAPI_NIC_NOT_FOUND 51 // NIC not found
#define BMAPI_NIC_NOT_IN_TEAM 52 // NIC is not in the team
#define BMAPI_SCM_LOCKED 53 // service control manager is
// locked
#define BMAPI_UNSUPPORTED_VERSION 54 // unsupported version for
// the data structure
#define BMAPI_UNSUPPORTED_IOCTL 55 // unsupported IOCTL
#define BMAPI_ASF_NOT_CAPABLE 56 // the NIC is not capable of
// ASF feature
#define BMAPI_ASF_NOT_CONFIGURED 57 // the NIC is not configured
// for ASF
#define BMAPI_EEPROM_CORRUPTED 58 // EEPROM of the NIC is
// corrupted
#define BMAPI_READ_EEPROM_FAILED 59 // read EEPROM failed
#define BMAPI_ASF_TABLE_CORRUPTED 60 // ASF table in NIC is
// corrupted
#define BMAPI_SUSPEND_DRIVER_FAILED 61 // failed to suspend driver
// or NIC
#define BMAPI_WRITE_ASF_TABLE_FAILED 62 // obsolete
#define BMAPI_LOCK_NIC_FAILED 63 // failed to gain exclusive
// access to a NIC. Try later.
#define BMAPI_DRIVER_NOT_SUSPENDED 64
#define BMAPI_REGISTER_TEST_FAILED 65
#define BMAPI_MII_REGISTER_TEST_FAILED 66
#define BMAPI_MEMORY_TEST_FAILED 67
#define BMAPI_TEST_INTERRUPT_FAILED 68
#define BMAPI_CPU_TEST_FAILED 69
#define BMAPI_UNABLE_TO_RESET_RX_CPU 70
#define BMAPI_UNABLE_TO_RESET_TX_CPU 71
#define BMAPI_RX_CPU_TEST_FAILED 72
#define BMAPI_TX_CPU_TEST_FAILED 73
#define BMAPI_RESUME_DRIVER_FAILED 74
#define BMAPI_UNABLE_TO_GET_SERVICE_NAME 75
#define BMAPI_UNABLE_TO_LOAD_INTERMEDIATE_DRIVER 76
#define BMAPI_UNABLE_TO_SET_PACKET_FILTER 77
#define BMAPI_LOOPBACK_TEST_FAILED 78
#define BMAPI_NO_DIAG_ACCESS_RIGHT 79 // application did not call
// BmapiInitDiag() with
// successful return
#define BMAPI_WRITE_EEPROM_FAILED 80 // write EEPROM failed
#define BMAPI_ASF_TEST_RESET_FAILED 81 // ASF reset failed
#define BMAPI_ASF_TEST_RX_EVENT_FAILED 82 // ASF RXCPU event failed
#define BMAPI_ASF_TEST_TX_EVENT_FAILED 83 // ASF TXCPU event failed
page 108
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
page 109
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
// in the NIC
#define BMAPI_CON_EXCEED_HW_MAX 211 // number of reserved
// connections exceeds
// hardware limitation
#define BMAPI_CON_EXCEED_LIC_MAX 212 // number of reserved
// connections exceeds
// licensed connections
#define BMAPI_RES_EXCEED_HW_MAX 213 // total reserved resources
// exceeds hardware limitation
#define BMAPI_RES_NOT_LICENSED 214 // reserved connections are
// not licensed
#define BMAPI_UNSUPPORTED_ADDR_TYPE 215 // unsupported address type
#define BMAPI_DUPLICATE_ADDR 216 // duplicate address
#define BMAPI_PROBE_UNSUPPORTED 217 // probe packe is not supported
#define BMAPI_NO_TARGET_IP 218 // no target IP configured for
// Probe Packet feature
#define BMAPI_NO_PHY_PROBE_IP 219 // no IP configured for
// physical NIC for Probe
// Packet feature
#define BMAPI_CABDIAG_FAIL 220 // cable diag failed
#define BMAPI_CREATE_THREAD_FAILED 221 // failed to create thread
#define BMAPI_DOING_DIAGNOSTICS 222 // a diagnostics is running
// already
#define BMAPI_NO_DIAGNOSTICS 223 // no pending diagnostics
#define BMAPI_CAN_NOT_STOP_DIAG 224 // failed to stop diagnostics
#define BMAPI_MANUF_KEY_CRC_ERR 225 // manufacturing key CRC error
#define BMAPI_UPG_KEY_CRC_ERR 226 // upgrade key CRC error
#define BMAPI_ASFMBOX_NOT_FOUND 227 // ASF mailbox is not found
#define BMAPI_INVALID_MBOX_NUM 228 // invalid ASF mailbox number
#define BMAPI_ISCSI_BOOT_DEV 229 // The NIC is on iSCSI boot.
#define BMAPI_INVALID_PEND_TASK 230 // invalid iSCSI pending task
#define BMAPI_INVALID_TEAM_TYPE_W_ISCSI 231 // invalid team type with iSCSI
#define BMAPI_APEEVT_TIMEOUT 232 // send APE event time out
#define BMAPI_APEEVT_MSG_TOO_LONG 233 // send APE event message too long
#define BMAPI_NOT_ENOUGH_DATA 234 // request more that data length
#define BMAPI_DATA_NOT_FOUND 235 // requested data not found
#define BMAPI_MGMT_FW_UNAVAILABLE 236 // maganement FW not running
#define BMAPI_APE_NOT_STOP 237 // APE is not stopped
#define BMAPI_DIR_FOUND 238
#define BMAPI_DIR_FULL 239
#define BMAPI_INVALID_NVRAM_SIZE 240
#define BMAPI_NVRAM_FULL 241
#define BMAPI_CONNECT_WMI_FAILED 242 // failed to connect to WMI
#define BMAPI_GET_WMI_OBJECT_FAILED 243 // failed to get WMI object
#define BMAPI_GET_PROPERTY_FAILED 244 // failed to get WMI object property
#define BMAPI_UNSUPPORTED_LICENSE_VER 245 // unsupported license key version
#define BMAPI_TOO_MANY_TEAMS 246 // configure too many teams
#define BMAPI_NO_NVMDIR_FOUND 247 // can not find a NVRAM directory entry
/****************************************************************************
* Other definitions
****************************************************************************/
#define BMAPI_MAJOR_VERSION 7
#define BMAPI_MINOR_VERSION 17
#define BMAPI_BUILD_VERSION 0
#define BMAPI_MAX_PRODUCT_LEN 80
#define BMAPI_MAX_DESC_LEN 80
#define BMAPI_MAX_VLAN_NAME_LEN 40
#define BMAPI_MAX_TEAM_NAME_LEN 40
#define BMAPI_MAX_IP_ADDR_LEN 20
#define BMAPI_MAX_MEMORY_ADDR_LEN 80
#define BMAPI_MAX_MAC_ADDR_LEN 20
#define BMAPI_MAX_TITLE_LEN 80
#define BMAPI_MAX_MFG_LEN 80
#define BMAPI_MAX_DRV_NAME 32
#define BMAPI_MAX_DRV_INT_TYPE 16
#define BMAPI_MAX_DRVVER_LEN 40
#define BMAPI_MAX_TEAM 8
page 110
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
#define BMAPI_INDIRECT_REG_WRITE 0
#define BMAPI_INDIRECT_MEM_WRITE 1
#define BMAPI_PHY_REG_WRITE 2
#define BMAPI_REG_WRITE 3
#define BMAPI_MEM_WRITE 4
// 'uType' definition for BmapiGetIpAddrInfo().
#define BMAPI_IPINFO_IP_LIST 0
#define BMAPI_IPINFO_SUBNETMASK_LIST 1
#define BMAPI_IPINFO_GATEWAY_LIST 2
/****************************************************************************
* OBSOLETE starts here
****************************************************************************/
// Used by BmapiGetMultiBRCMNicParams()
#define BMAPI_BRCMNIC_PARAM_TYPE_UNKNOWN 0
#define BMAPI_BRCMNIC_PARAM_TYPE_DWORD 1
#define BMAPI_BRCMNIC_PARAM_TYPE_BINARY 2 // binary data
#define BMAPI_BRCMNIC_PARAM_RESULT_OK 0
page 111
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
#define BMAPI_BRCMNIC_WAKEUPMODECAP_NONE 0
#define BMAPI_BRCMNIC_WAKEUPMODECAP_MAGICPACKET 1
#define BMAPI_BRCMNIC_WAKEUPMODECAP_WAKEUPFRAME 2
#define BMAPI_BRCMNIC_WAKEUPMODECAP_BOTH 3 // default
page 112
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
#ifndef BOOL
typedef int BOOL;
#endif
#pragma pack(push, 1)
/****************************************************************************
* Event related definitions.
****************************************************************************/
//
// extra_info for EVT_ACTIVE and EVT_INACTIVE
//
#define BMAPI_EVINFO_ACTIVITY_LINK 0 // active/inactive due to link status
#define BMAPI_EVINFO_ACTIVITY_MANUAL 1 // active/inactive due to enable/disable
#define BMAPI_EVINFO_ACTIVITY_ADDREMOVE 2 // active/inactive due to add/remove
#define BMAPI_EVINFO_ACTIVITY_STANDBY 3 // active/inactive due to standby
#define BMAPI_EVINFO_ACTIVITY_NONE 0xFFFFFFFF
typedef enum
{
BMAPI_EVT_ACTIVE = 0, // adapter is active
BMAPI_EVT_INACTIVE = 1, // adapter is inactive
BMAPI_EVT_LINKUP = 2, // adapter's link status goes up
BMAPI_EVT_LINKDOWN = 3, // adapter's link status goes down
BMAPI_EVT_ENABLE = 4, // adapter is enabled via management interface
BMAPI_EVT_DISABLE = 5, // adapter is disabled via management interface
BMAPI_EVT_ADD = 6, // adapter is added to a team
BMAPI_EVT_REMOVE = 7, // adapter is removed from a team
BMAPI_EVT_ASFCFG_CHG = 100, // adapter's ASF configuration is modified
BMAPI_EVT_DEV_ARRIVED = 101, // a device is arrived or enabled
BMAPI_EVT_DEV_REMOVED = 102, // a device is to be removed
#if defined(__NETWARE__)
BMAPI_EVT_DUMMY = 0xFFFFFFF // make it a 32-bit variable
#else
BMAPI_EVT_DUMMY = 0xFFFFFFFF // make it a 32-bit variable
#endif
} BMAPI_EV_TYPE;
#define BMAPI_EVT_DATA_VER 1
typedef struct
{
// Version is defined as BMAPI_EVT_DATA_VER.
// 'version' is always specify on callback
U32 version;
} BMAPI_EVT_DATA;
typedef void (*BMAPIEVENTCALLBACK)( U32 event, const S8 *team_name, U32 team_id, const S8
*adapter_service_name, U32 adapter_handle, U32 lb_number, U32 sb_number, U32 extra_info,
void *cookie );
/****************************************************************************
* Data Structures
****************************************************************************/
// These are for 'nic_type' phisical devices.
#define BMAPI_NON_BROADCOM_NIC 0
#define BMAPI_ALTEON 1
#define BMAPI_BRCM5700 2
page 113
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
// 'state' in BM_ADAPTER_INFO
#define BMAPI_MEMBER_STATE_UP 0
#define BMAPI_MEMBER_STATE_DOWN 1
#define BMAPI_MEMBER_STATE_DISABLED 2
page 114
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
// Possible value:
// BMAPI_MEMBER_STATE_UP, BMAPI_MEMBER_STATE_DOWN,
// BMAPI_MEMBER_STATE_DISABLED
U32 state;
// Link speed of the physical NIC in Mbps, i.e. 10 = 10Mbps. This
// is valid only when physical NIC card data is retrieved from
// BmapiGetTeamSnapShot()
U32 link_speed;
} BM_ADAPTER_INFO;
U32 V4Transmit_flags;
};
union {
struct
{
U32 IpOptionsSupported:1;
U32 TcpOptionsSupported:1;
U32 TcpChecksum:1;
U32 UdpChecksum:1;
U32 IpChecksum:1;
} V4Receive;
U32 V4Receive_flags;
};
union {
struct
{
U32 IpOptionsSupported:1;
U32 TcpOptionsSupported:1;
U32 TcpChecksum:1;
U32 UdpChecksum:1;
} V6Transmit;
U32 V6Transmit_flags;
};
union {
struct
{
U32 IpOptionsSupported:1;
U32 TcpOptionsSupported:1;
U32 TcpChecksum:1;
U32 UdpChecksum:1;
} V6Receive;
U32 V6Receive_flags;
};
} BM_OFFLOAD_TCP_IP_CHECKSUM;
page 115
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U32 MaxOffLoadSize;
U32 MinSegmentCount;
U32 TcpOptions; // boolean value
U32 IpOptions; // boolean value
} BM_OFFLOAD_TCP_LARGE_SEND;
U32 TcpConnectionOffloadCapacity;
} BM_OFFLOAD_TCP_CONNECTION;
typedef enum
{
BmapiIpPrefixOriginOther = 0, // The IPv6 prefix was provided by
// a source other than those
// defined in this enumeration.
BmapiIpPrefixOriginManual, // The IPv6 prefix was manually
// specified.
BmapiIpPrefixOriginWellKnown, // The IPv6 prefix is from a well
// known source.
BmapiIpPrefixOriginDhcp, // The IPv6 prefix was provided by
// DHCP settings.
BmapiIpPrefixOriginRouterAdvertisement, // The IPv6 prefix was obtained
// through a router advertisement
// (RA).
} BM_IP_PREFIX_ORIGIN;
typedef enum
{
BmapiIpSuffixOriginOther = 0, // The IPv6 suffix was provided by
// a source other than those
// defined in this enumeration.
BmapiIpSuffixOriginManual, // The IPv6 suffix was manually
// specified.
BmapiIpSuffixOriginWellKnown, // The IPv6 suffix is from a well
// known source.
BmapiIpSuffixOriginDhcp, // The IPv6 suffix was provided by
// DHCP settings.
BmapiIpSuffixOriginLinkLayerAddress, // The IPv6 suffix was obtained
// from the link-layer address.
BmapiIpSuffixOriginRandom, // The IPv6 suffix was obtained
// from a random source.
} BM_IP_SUFFIX_ORIGIN;
typedef enum
{
BmapiIpDadStateInvalid = 0, // The DAD state is invalid.
BmapiIpDadStateTentative, // The DAD state is tentative.
BmapiIpDadStateDuplicate, // A duplicate IPv6 address has
// been detected.
BmapiIpDadStateDeprecated, // The IPv6 address has been
// deprecated.
BmapiIpDadStatePreferred, // The IPv6 address is the
// preferred address.
} BM_IP_DAD_STATE;
page 116
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U8 reserved1[35];
BM_IP_PREFIX_ORIGIN PrefixOrigin;
BM_IP_SUFFIX_ORIGIN SuffixOrigin;
BM_IP_DAD_STATE DadState; // Duplicate Address Detection
// (DAD) state.
U32 ValidLifetime; // Valid lifetime for the address,
// in seconds.
U32 PreferredLifetime; // Preferred lifetime for the
// address, in seconds.
U32 LeaseLifetime; // Lease lifetime for the address,
// in seconds.
U8 reserved2[32];
} BM_IP_UNICAST_ADDRESS;
#define BM_OFFLOAD_NOT_SUPPORTED 0
#define BM_OFFLOAD_SUPPORTED 1
#define BM_OFFLOAD_SET_NO_CHANGE 0
#define BM_OFFLOAD_SET_ON 1
#define BM_OFFLOAD_SET_OFF 2
//
// Encapsulation types that are used during offload in query
//
#define BM_ENCAPSULATION_NOT_SUPPORTED 0x00000000
#define BM_ENCAPSULATION_NULL 0x00000001
#define BM_ENCAPSULATION_IEEE_802_3 0x00000002
#define BM_ENCAPSULATION_IEEE_802_3_P_AND_Q 0x00000004
#define BM_ENCAPSULATION_IEEE_802_3_P_AND_Q_IN_OOB 0x00000008
#define BM_ENCAPSULATION_IEEE_LLC_SNAP_ROUTED 0x00000010
typedef struct _BM_TCP_LARGE_SEND_OFFLOAD_V1
{
struct
{
page 117
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U32 Encapsulation;
U32 MaxOffLoadSize;
U32 MinSegmentCount;
U32 TcpOptions;
U32 IpOptions;
} IPv4;
} BM_TCP_LARGE_SEND_OFFLOAD_V1;
struct
{
U32 Encapsulation;
U32 IpOptionsSupported;
U32 TcpOptionsSupported;
U32 TcpChecksum;
U32 UdpChecksum;
U32 IpChecksum;
} IPv4Transmit;
struct
{
U32 Encapsulation;
U32 IpOptionsSupported;
U32 TcpOptionsSupported;
U32 TcpChecksum;
U32 UdpChecksum;
U32 IpChecksum;
} IPv4Receive;
struct
{
U32 Encapsulation;
U32 IpExtensionHeadersSupported;
U32 TcpOptionsSupported;
U32 TcpChecksum;
U32 UdpChecksum;
} IPv6Transmit;
struct
{
U32 Encapsulation;
U32 IpExtensionHeadersSupported;
U32 TcpOptionsSupported;
U32 TcpChecksum;
U32 UdpChecksum;
} IPv6Receive;
} BM_TCP_IP_CHECKSUM_OFFLOAD;
typedef struct _BM_IPSEC_OFFLOAD_V1
{
struct
{
U32 Encapsulation;
U32 AhEspCombined;
U32 TransportTunnelCombined;
U32 IPv4Options;
U32 Flags;
} Supported;
struct
{
U32 Md5;
U32 Sha_1;
U32 Transport;
U32 Tunnel;
U32 Send;
U32 Receive;
} IPv4AH;
struct
{
U32 Des;
U32 Reserved;
U32 TripleDes;
page 118
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U32 NullEsp;
U32 Transport;
U32 Tunnel;
U32 Send;
U32 Receive;
} IPv4ESP;
} BM_IPSEC_OFFLOAD_V1;
struct
{
U32 Encapsulation;
U32 MaxOffLoadSize;
U32 MinSegmentCount;
U32 IpExtensionHeadersSupported;
U32 TcpOptionsSupported;
}IPv6;
} BM_TCP_LARGE_SEND_OFFLOAD_V2;
//
// Checksum Offload information
//
BM_TCP_IP_CHECKSUM_OFFLOAD Checksum;
//
// Large Send Offload information
//
BM_TCP_LARGE_SEND_OFFLOAD_V1 LsoV1;
//
// IPsec Offload Information
//
BM_IPSEC_OFFLOAD_V1 IPsecV1;
//
// Large Send Offload version 2Information
//
BM_TCP_LARGE_SEND_OFFLOAD_V2 LsoV2;
// reserved
U32 Flags;
} BM_TASK_OFFLOAD;
U32 Encapsulation;
U32 SupportIPv4;
U32 SupportIPv6;
U32 SupportIPv6ExtensionHeaders;
U32 SupportSack;
U32 TcpConnectionOffloadCapacity;
U32 Flags;
} BM_TCP_CONNECTION_OFFLOAD;
// 'flags' in BM_ADAPTER_INFO_EX
#define BMAPI_NIC_NO_MINOPORT_DRV 0x00000001
#define BMAPI_NIC_ASF_POSSIBLE 0x00000002
page 119
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
// 'arch_type' in BM_ADAPTER_INFO_EX
#define BMAPI_ARCH_VBD 1
#define BMAPI_ARCH_L2_ONLY 2
#define BMAPI_ARCH_5706_VBD BMAPI_ARCH_VBD
#define BMAPI_ARCH_5706_L2_ONLY BMAPI_ARCH_L2_ONLY
#define BMAPI_ADAPTER_INFO_EX_VER 15
typedef struct _BM_ADAPTER_INFO_EX
{
// Version is defined as BMAPI_ADAPTER_INFO_EX_VER.
// 'version' is required upon input
U32 version;
U32 flags;
BM_ADAPTER_INFO adap_info;
page 120
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U32 ui_number;
// PCI information
// Valid only when vendor_id equal to 0x14E4 and
// nic_type is BMAPI_BRCM5700.
U32 mem_base_low;
U32 mem_base_high;
// PCI information
U32 irq;
// NIC information
// Available only when vendor_id equal to 0x14E4 and
// nic_type is BMAPI_BRCM5700.
U32 phy_id;
U32 phy_addr;
// Possible value:
// BMAPI_LM_LINE_SPEED_UNKNOWN, BMAPI_LM_LINE_SPEED_10MBPS,
// BMAPI_LM_LINE_SPEED_100MBPS, BMAPI_LM_LINE_SPEED_1000MBPS
U32 line_speed;
// Possible value:
// BMAPI_LM_STATUS_LINK_ACTIVE, BMAPI_LM_STATUS_LINK_DOWN
U32 link_status;
// NIC information
// Available only when vendor_id equal to 0x14E4.
U32 upper_misc_host_ctrl_reg;
// Driver information
U8 driver_name[BMAPI_MAX_DRV_NAME];
U32 driver_size;
U8 driver_interface_type[BMAPI_MAX_DRV_INT_TYPE];
U32 driver_interface_version_major;
U32 driver_interface_version_minor;
// NIC information
// Available only when vendor_id equal to 0x14E4 and
// nic_type is BMAPI_BRCM5700.
U32 internal_ram_size;
// Could be BMAPI_BUS_TYPE_UNKNOWN, BMAPI_BUS_TYPE_UNSUPPORTED,
// BMAPI_BUS_TYPE_PCI or BMAPI_BUS_TYPE_PCMCIA
U32 bus_type;
// Team name.
S8 team_name[BMAPI_MAX_TEAM_NAME_LEN];
// Team ID
U32 team_id;
// The unit value is Kbps. The actual speed value will be truncated
// to the lower bound of Kbps. For example, if the speed is 14.4 Kbps,
// the value will be 14. If the speed is less than 1 Kbps, the value
// will be 0.
U32 line_speed_Kbps;
// For 5706 VBD only. 5706 VBD will have major, minor and build version
page 121
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U32 reserved;
// These two fields valid only for NDIS 6.0 and later (Vista and
// Longhorn).
BM_TASK_OFFLOAD ol_task;
BM_TCP_CONNECTION_OFFLOAD ol_conn;
// These handles are valid when 'arch_type' is BMAPI_ARCH_VBD.
U32 ndis_handle;
U32 wsd_handle;
U32 iscsi_handle;
U32 diag_handle;
// First IPv6 Gateway address found for the NIC.
// Only available for Vista or later.
// Applications can cast like "( LPSOCKADDR )&gateway_v6.Address" to API
// such as WSAAddressToString().
BM_IP_ADAPTER_GATEWAY_ADDRESS gateway_v6;
// 'ipv6_flags' in BM_ADAPTER_INFO_EX
#define BMAPI_IP_ADAPTER_DHCP_ENABLED 0x00000004
U32 ipv6_flags;
// Available for NDIS 6.0 and later.
// The link speed is in bits per second. A value of -1 in this member
// indicates that the link speed is unknown.
U64 max_xmit_link_speed;
U64 max_rcv_link_speed;
U64 xmit_link_speed;
U64 rcv_link_speed;
} BM_ADAPTER_INFO_EX;
page 122
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
BM_ADAPTER_INFO adap_info;
// Possible value:
// BMAPI_LM_STATUS_LINK_ACTIVE, BMAPI_LM_STATUS_LINK_DOWN
U32 link_status;
// Driver information
U8 driver_name[BMAPI_MAX_DRV_NAME];
U32 driver_size;
U8 driver_interface_type[BMAPI_MAX_DRV_INT_TYPE];
U32 driver_interface_version_major;
U32 driver_interface_version_minor;
// Team name.
S8 team_name[BMAPI_MAX_TEAM_NAME_LEN];
// Team ID
U32 team_id;
// The unit value is Kbps. The actual speed value will be truncated
// to the lower bound of Kbps. For example, if the speed is 14.4 Kbps,
// the value will be 14. If the speed is less than 1 Kbps, the value
// will be 0.
U32 line_speed_Kbps;
// Team Type. BMAPI_TEAM_BRCM_LBFO == Broadcom LBFO,
// BMAPI_TEAM_802_3_AD == 802.3ad, BMAPI_TEAM_FEC_GEC == FEC/GEC
// BMAPI_TEAM_SLB_AFD == SLB (Auto Fallback Disabled)
U32 team_type;
// These two fields valid only for NDIS 6.0 and later (Vista and
// Longhorn).
BM_TASK_OFFLOAD ol_task;
BM_TCP_CONNECTION_OFFLOAD ol_conn;
// Available for NDIS 6.0 and later.
// The link speed is in bits per second. A value of -1 in this member
// indicates that the link speed is unknown.
U64 max_xmit_link_speed;
U64 max_rcv_link_speed;
U64 xmit_link_speed;
page 123
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U64 rcv_link_speed;
} BM_VIR_NIC_INFO_EX;
// 'mode' in BM_BRCM_ADAPTER_INFO
#define BMAPI_LM_BUS_MODE_UNKNOWN 0
#define BMAPI_LM_BUS_MODE_PCI 1
#define BMAPI_LM_BUS_MODE_PCI_X 2
#define BMAPI_LM_BUS_MODE_PCI_E 3
// 'clock' in BM_BRCM_ADAPTER_INFO
#define BMAPI_LM_BUS_CLOCK_UNKNOWN 0
#define BMAPI_LM_BUS_CLOCK_33MHZ 1
#define BMAPI_LM_BUS_CLOCK_66MHZ 2
#define BMAPI_LM_BUS_CLOCK_133MHZ 3
#define BMAPI_LM_BUS_CLOCK_100MHZ 4
#define BMAPI_LM_BUS_CLOCK_50MHZ 5
// 'bus_size' in BM_BRCM_ADAPTER_INFO
#define BMAPI_LM_BUS_SIZE_UNKNOWN 0
#define BMAPI_LM_BUS_SIZE_32BIT 1
#define BMAPI_LM_BUS_SIZE_64BIT 2
#define BMAPI_LM_BUS_SIZE_PCI_E_1X 3
#define BMAPI_LM_BUS_SIZE_PCI_E_2X 4
#define BMAPI_LM_BUS_SIZE_PCI_E_4X 5
#define BMAPI_LM_BUS_SIZE_PCI_E_8X 6
#define BMAPI_LM_BUS_SIZE_PCI_E_12X 7
#define BMAPI_LM_BUS_SIZE_PCI_E_16X 8
#define BMAPI_LM_BUS_SIZE_PCI_E_32X 9
// PCI information.
U32 bus_no;
U32 device_no;
U32 function_no;
U32 vendor_id;
U32 device_id;
U32 subsystem_vendor_id;
U32 subsystem_id;
U32 mem_base_low;
U32 mem_base_high;
// Possible value:
// BMAPI_LM_BUS_MODE_UNKNOWN, BMAPI_LM_BUS_MODE_PCI,
// BMAPI_LM_BUS_MODE_PCI_X, BMAPI_LM_BUS_MODE_PCI_E
U32 mode;
// Possible value:
// BMAPI_LM_BUS_CLOCK_UNKNOWN, BMAPI_LM_BUS_CLOCK_33MHZ,
// BMAPI_LM_BUS_CLOCK_66MHZ, BMAPI_LM_BUS_CLOCK_133MHZ,
// BMAPI_LM_BUS_CLOCK_100MHZ, BMAPI_LM_BUS_CLOCK_50MHZ
U32 clock;
// Possible value:
page 124
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
// BMAPI_LM_BUS_SIZE_UNKNOWN, BMAPI_LM_BUS_SIZE_32BIT,
// BMAPI_LM_BUS_SIZE_64BIT, BMAPI_LM_BUS_SIZE_PCI_E_1X
// BMAPI_LM_BUS_SIZE_PCI_E_2X, BMAPI_LM_BUS_SIZE_PCI_E_4X
// BMAPI_LM_BUS_SIZE_PCI_E_8X, BMAPI_LM_BUS_SIZE_PCI_E_12X
// BMAPI_LM_BUS_SIZE_PCI_E_16X, BMAPI_LM_BUS_SIZE_PCI_E_32X
U32 bus_size;
// Chip information.
U32 phy_addr;
U32 irq;
// Driver information.
// not available for 5706 devices.
U32 mapped_mem_base;
// Possible value:
// BMAPI_LM_MEDIA_TYPE_UNKNOWN, BMAPI_LM_MEDIA_TYPE_AUTO,
// BMAPI_LM_MEDIA_TYPE_UTP, BMAPI_LM_MEDIA_TYPE_BNC,
// BMAPI_LM_MEDIA_TYPE_AUI, BMAPI_LM_MEDIA_TYPE_FIBER
U32 media_type;
// Possible value:
// BMAPI_LM_LINE_SPEED_UNKNOWN, BMAPI_LM_LINE_SPEED_10MBPS,
// BMAPI_LM_LINE_SPEED_100MBPS, BMAPI_LM_LINE_SPEED_1000MBPS
U32 line_speed;
// Possible value:
// BMAPI_LM_DUPLEX_MODE_UNKNOWN, BMAPI_LM_DUPLEX_MODE_HALF
// BMAPI_LM_DUPLEX_MODE_FULL
U32 duplex_mode;
// Possible value:
// BMAPI_LM_STATUS_LINK_ACTIVE, BMAPI_LM_STATUS_LINK_DOWN
U32 link_status;
U8 node_address[8]; // Current network address.
U32 drv_major_ver;
U32 drv_minor_ver;
// Possible value:
// BMAPI_DRV_STATE_NORMAL_MODE, BMAPI_DRV_STATE_DIAG_MODE,
// BMAPI_DRV_STATE_NIC_REMOVED, BMAPI_DRV_STATE_LOW_POWER_MODE
U32 drv_state;
} BM_BRCM_ADAPTER_INFO;
// 'RequestedMediaType' in BM_BRCM_ADAPTER_INFO_EX
// 'requested_media_type' in BM_LINK_STATUS
#define BMAPI_LM_REQUESTED_MEDIA_TYPE_AUTO 0
#define BMAPI_LM_REQUESTED_MEDIA_TYPE_UTP_10MBPS 3
#define BMAPI_LM_REQUESTED_MEDIA_TYPE_UTP_10MBPS_FULL_DUPLEX 4
#define BMAPI_LM_REQUESTED_MEDIA_TYPE_UTP_100MBPS 5
#define BMAPI_LM_REQUESTED_MEDIA_TYPE_UTP_100MBPS_FULL_DUPLEX 6
page 125
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
#define BMAPI_LM_REQUESTED_MEDIA_TYPE_FIBER_1000MBPS 11
#define BMAPI_LM_REQUESTED_MEDIA_TYPE_FIBER_1000MBPS_FULL_DUPLEX 12
#define BMAPI_LM_REQUESTED_MEDIA_TYPE_FIBER_2500MBPS 13
#define BMAPI_LM_REQUESTED_MEDIA_TYPE_FIBER_2500MBPS_FULL_DUPLEX 14
#define BMAPI_LM_REQUESTED_MEDIA_TYPE_FIBER_AUTONEG_1G_FALLBACK 15
#define BMAPI_LM_REQUESTED_MEDIA_TYPE_FIBER_AUTONEG_1G_FALLBACK_FULL_DUPLEX 16
#define BMAPI_LM_REQUESTED_MEDIA_TYPE_FIBER_AUTONEG_2_5G_FALLBACK 17
#define BMAPI_LM_REQUESTED_MEDIA_TYPE_FIBER_AUTONEG_2_5G_FALLBACK_FULL_DUPLEX 18
#define BMAPI_LM_REQUESTED_MEDIA_TYPE_FIBER_HARDWARE_DEFAULT 19
#define BMAPI_LM_REQUESTED_MEDIA_TYPE_FIBER_10GBPS 20
#define BMAPI_LM_REQUESTED_MEDIA_TYPE_FIBER_10GBPS_FULL_DUPLEX 21
// 'flow_ctrl' in BM_BRCM_ADAPTER_INFO_EX
// For both NetXtreme and NetXtreme II products,
// following definitions are valid.
#define BMAPI_FLOW_CONTROL_NONE 0x00
#define BMAPI_FLOW_CONTROL_RX_PAUSE 0x01
#define BMAPI_FLOW_CONTROL_TX_PAUSE 0x02
// 'pcie_speed' in BM_BRCM_ADAPTER_INFO_EX
#define BMAPI_PCIE_SPEED_UNKNOWN 0
#define BMAPI_PCIE_SPEED_2_5_G 25
// 'mode' in BM_BRCM_ADAPTER_INFO
typedef struct _BM_INTERRUPT_INFO
{
U32 IntType;
#define BMAPI_NIC_INTR_TYPE_LINE_BASED 0
#define BMAPI_NIC_INTR_TYPE_MSI 1
union
{
struct
{
U8 IntPin;
U8 IntLine;
} LineBased;
struct
{
U8 MsiVersion;
#define BMAPI_NIC_INTR_MSI_1_0 1
#define BMAPI_NIC_INTR_MSI_X 2
U8 Reserved;
////////////////////////////////////
// Availavble only for NX1 devices.
U16 MsgData;
U32 MsgAddressLow;
U32 MsgAddressHigh;
////////////////////////////////////
U32 NumOfEnabledMsgs;
U32 NumOfCapableMsgs;
} Msi;
} Charactristic;
} BM_INTERRUPT_INFO;
#define BMAPI_BRCM_ADAPTER_INFO_EX_VER 12
page 126
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
BM_BRCM_ADAPTER_INFO brcm_info;
// Defined flags:
#define BMAPI_DRV_RSS_ENABLED 0x00000004 // 1 if driver is doing RSS, 0 if not
#define BMAPI_DRV_ISCSI_BOOT_INTF 0x00000008 // 1 if the interface is an ISCSI boot
interface
#define BMAPI_REMOTE_PHY_CAPABLE 0x00000010 // 1 if the interface capable of remote
PHY
#define BMAPI_REMOTE_PHY_ACTIVE 0x00000020 // 1 if the interface is using remote PHY
// Determine which MFW is currently ruinning in NX2
#define BMAPI_MFW_RUN_UNKNOWN 0x00000000
#define BMAPI_MFW_RUN_IPMI 0x00000040
#define BMAPI_MFW_RUN_UMP 0x00000080
#define BMAPI_MFW_RUN_NCSI 0x000000c0
#define BMAPI_MFW_RUN_NONE 0x000001c0
#define BMAPI_MFW_RUN_MASK 0x000001c0
#define BMAPI_REMOTE_PHY_MODULE_PRESENT 0x00000200 // 1 if the remote PHY module is
present
#define BMAPI_DRV_ISCSI_BOOT_HBA 0x00000400 // 1 if the interface ISCSI boot from HBA,
applicable only for BRCM iSCSI boot
#define BMAPI_DRV_ISCSI_BOOT_NDIS 0x00000800 // 1 if the interface ISCSI boot from
NDIS, applicable only for BRCM iSCSI boot
#define BMAPI_EXT_PHY 0x00001000 // 1 if the port is using external PHY,
applicable only for 57710 family
#define BMAPI_WOL_NO_VAUX 0x00002000 // 1 if the port does not have Vaux power
to support WOL, applicable only for 5706 family
#define BMAPI_VBD_NO_L4 0x40000000 // 1 if it is VBD but no L4 support.
#define BMAPI_EXT_INFO_VALID 0x80000000 // 1 if 'intr_info' is valid
U32 SupportedFlags;
// The unit value is Kbps. The actual speed value will be truncated
// to the lower bound of Kbps. For example, if the speed is 14.4 Kbps,
// the value will be 14. If the speed is less than 1 Kbps, the value
// will be 0.
U32 line_speed_Kbps;
// This field will only be non-zero if the PHY negociated flow control
// with the far end.
U32 flow_ctrl;
// Not applicable for 4401 NICs.
U32 bond_id;
// PCI-E <-> PCI-X bridge information
// Currently, only 5708 based devices support this field.
// Could be: BMAPI_LM_BUS_SIZE_PCI_E_1X, BMAPI_LM_BUS_SIZE_PCI_E_2X,
// BMAPI_LM_BUS_SIZE_PCI_E_4X, BMAPI_LM_BUS_SIZE_PCI_E_8X,
// BMAPI_LM_BUS_SIZE_PCI_E_12X, BMAPI_LM_BUS_SIZE_PCI_E_16X,
// BMAPI_LM_BUS_SIZE_PCI_E_32X
U32 pcie_width;
// Could be: BMAPI_PCIE_SPEED_2_5_G
U32 pcie_speed;
page 127
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
#define BMAPI_MAXIMUM_MEMBERS_PHY_TEAM 8
#define BMAPI_MAXIMUM_MEMBERS_VIR_TEAM 64
// 'mode' in BM_TEAM_INFO2
#define BMAPI_TEAM_MODE_PRIMARY 0
#define BMAPI_TEAM_MODE_STAND_BY 1
U32 reserved[7];
} BM_TEAM_PHY_INFO;
page 128
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
} BM_TEAM_VIR_INFO;
#define BMAPI_AF_INET 2
#define BMAPI_AF_INET6 23
union
{
// Unused bytes MUST be set to zero.
U32 addr_ipv4; // can be cast to in_addr
U8 addr_ipv6[16];
#define BMAPI_TEAM_INFO2_VER 4
page 129
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U32 reserved;
page 130
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
} BM_PHY_NIC_STATISTICS;
} BM_VIR_NIC_STATISTICS;
// number of send packets that are discarded because all the team
// members are malfunctioned, derived from virtual adapter statistics.
U32 send_all_down;
// number of send packets queued by BLF driver waiting for resource
// derived from virtual adapter statistics.
U32 send_queued;
// number of send packets originated from BLF driver
U32 send_adjusted;
// number of receive packets that are indicated to upper layer,
// derived from physical adapter statistics
U32 recv_packet;
// number of receive packets discarded,
// derived from physical adapter statistics
U32 recv_discarded;
page 131
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
} BM_TEAM_STATISTICS;
typedef struct
{
// Application use this handle number to know which adapter
// this statistic structure is referring to.
U32 handle;
// number of send request completed by miniport
U32 send_packet;
// The number of time this NIC was activated (does not include LiveLink count)
U32 nicUpCount;
// The number of time this NIC was de-activated (does not include LiveLink count)
U32 nicDownCount;
// reserved for future use
U32 reserved[60];
} BM_PHY_NIC_STATISTICS_EX;
typedef struct
{
// Application use this handle number to know which adapter
// this statistic structure is referring to.
U32 handle;
#define BMAPI_TEAM_STATISTICS_EX_VER 2
page 132
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
typedef struct
{
// Version is defined as BMAPI_TEAM_STATISTICS_EX_VER.
// 'version' is required upon input
U32 version;
// Team name.
S8 team_name[BMAPI_MAX_TEAM_NAME_LEN];
// number of send packets that are forwarded to the team members,
// derived from physical adapter statistics
U32 send_packet;
// number of send packets that are discarded because all the team
// members are malfunctioned, derived from virtual adapter statistics.
U32 send_all_down;
// Number of probe packets sent across all adapters for the team -
// Expressed as a quantity.
U32 probe_sent;
// The number of retry packets sent across all adapters for the team -
// Expressed as a quantity.
U32 probe_retried;
} BM_TEAM_STATISTICS_EX;
page 133
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
#define BM_GENERAL_STATISTICS_EX_VER 1
page 134
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
#define BM_ETHERNET_STATISTICS_EX_VER 1
page 135
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U64 SupportedStatistics;
// The value of 'SupportedStatistics' is the bitwise OR of the following
// flags.
// The data in the 'rcv_error_alignment' member is valid.
#define BMAPI_STAT_802_3_RCV_ERROR_ALIGNMENT 0x00000001
// The data in the 'xmit_one_collision' member is valid.
#define BMAPI_STAT_802_3_XMIT_ONE_COLLISION 0x00000002
// The data in the 'xmit_more_collisions' member is valid.
#define BMAPI_STAT_802_3_XMIT_MORE_COLLISIONS 0x00000004
// The data in the 'xmit_deferred' member is valid.
#define BMAPI_STAT_802_3_XMIT_DEFERRED 0x00000008
// The data in the 'xmit_max_collisions' member is valid.
#define BMAPI_STAT_802_3_XMIT_MAX_COLLISIONS 0x00000010
// The data in the 'rcv_overrun' member is valid.
#define BMAPI_STAT_802_3_RCV_OVERRUN 0x00000020
// The data in the 'xmit_underrun' member is valid.
#define BMAPI_STAT_802_3_XMIT_UNDERRUN 0x00000040
// The data in the 'xmit_heartbeat_failure' member is valid.
#define BMAPI_STAT_802_3_XMIT_HEARTBEAT_FAILUR 0x00000080
// The data in the 'xmit_times_crs_lost' member is valid.
#define BMAPI_STAT_802_3_XMIT_TIMES_CRS_LOST 0x00000100
// The data in the 'xmit_late_collisions' member is valid.
#define BMAPI_STAT_802_3_XMIT_LATE_COLLISIONS 0x00000200
} BM_ETHERNET_STATISTICS_EX;
//////////////////////////
// Not available for 57710
U64 dot3StatsFramesTooLong;
//////////////////////////
U64 etherStatsJabbers;
U64 etherStatsUndersizePkts;
//////////////////////////
// Not available for 5706
// Not available for 57710
U64 inRangeLengthError;
U64 outRangeLengthError;
//////////////////////////
//////////////////////////
// Not available for 57710
U64 etherStatsPkts64Octets;
U64 etherStatsPkts65Octetsto127Octets;
U64 etherStatsPkts128Octetsto255Octets;
page 136
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U64 etherStatsPkts256Octetsto511Octets;
U64 etherStatsPkts512Octetsto1023Octets;
U64 etherStatsPkts1024Octetsto1522Octets;
//////////////////////////
//////////////////////////
// Not available for 57710
// Not available for 5706
U64 etherStatsPkts1523Octetsto2047Octets;
U64 etherStatsPkts2048Octetsto4095Octets;
U64 etherStatsPkts4096Octetsto8191Octets;
U64 etherStatsPkts8192Octetsto9022Octets;
//////////////////////////
U64 dot3StatsSingleCollisionFrames;
U64 dot3StatsMultipleCollisionFrames;
U64 dot3StatsDeferredTransmissions;
U64 dot3StatsExcessiveCollisions;
U64 dot3StatsLateCollisions;
//////////////////////////
// Not available for 5706
// Not available for 57710
U64 dot3Collided2Times;
U64 dot3Collided3Times;
U64 dot3Collided4Times;
U64 dot3Collided5Times;
U64 dot3Collided6Times;
U64 dot3Collided7Times;
U64 dot3Collided8Times;
U64 dot3Collided9Times;
U64 dot3Collided10Times;
U64 dot3Collided11Times;
U64 dot3Collided12Times;
U64 dot3Collided13Times;
U64 dot3Collided14Times;
U64 dot3Collided15Times;
//////////////////////////
U64 ifHCOutUcastPkts;
U64 ifHCOutMulticastPkts;
U64 ifHCOutBroadcastPkts;
U64 dot3StatsCarrierSenseErrors;
/////////////////////////
// Not available for 5706
U64 ifOutDiscards;
/////////////////////////
///////////////////////////////////////////
// Not available for 5706 monolithic driver
U64 ifOutErrors;
///////////////////////////////////////////
// Statistics maintained by Receive List Placement.
//////////////////////////
// Not available for 5706
// Not available for 57710
U64 COSIfHCInPkts[16];
U64 COSFramesDroppedDueToFilters;
U64 nicDmaWriteQueueFull;
U64 nicDmaWriteHighPriQueueFull;
//////////////////////////
//////////////////////////
// Not available for 57710
U64 nicNoMoreRxBDs;
//////////////////////////
//////////////////////////
// Not available for 5706 VBD
// Not available for 57710
U64 ifInDiscards;
page 137
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
//////////////////////////
U64 ifInErrors;
//////////////////////////
// Not available for 5706
// Not available for 57710
U64 nicRecvThresholdHit;
//////////////////////////
// Statistics maintained by Send Data Initiator.
//////////////////////////
// Not available for 5706
// Not available for 57710
U64 COSIfHCOutPkts[16];
U64 nicDmaReadQueueFull;
U64 nicDmaReadHighPriQueueFull;
U64 nicSendDataCompQueueFull;
//////////////////////////
// Statistics maintained by Host Coalescing.
//////////////////////////
// Not available for 5706
// Not available for 57710
U64 nicRingSetSendProdIndex;
U64 nicRingStatusUpdate;
U64 nicInterrupts;
U64 nicAvoidedInterrupts;
U64 nicSendThresholdHit;
//////////////////////////
} BM_BRCM_STATISTICS;
#define BM_BRCM_STATISTICS_EX_VER 1
typedef struct _BM_BRCM_STATISTICS_EX
{
// version must filled on input
U64 version;
BM_BRCM_STATISTICS brcm_statistics;
// -1 if driver does not support this counter
U64 TxLargeSendFrames;
} BM_BRCM_STATISTICS_EX;
} BM_LINK_STATUS;
#define BMAPI_LINK_STATUS_EX_VER 10
typedef struct
page 138
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
{
U32 version;
BM_LINK_STATUS link_status;
// The unit value is Kbps. The actual speed value will be truncated
// to the lower bound of Kbps. For example, if the speed is 14.4 Kbps,
// the value will be 14. If the speed is less than 1 Kbps, the value
// will be 0.
U32 line_speed_Kbps;
// Boolean flag to indicate whether driver is running.
U32 driver_loaded;
S8 current_mac_addr[BMAPI_MAX_MAC_ADDR_LEN];
S8 permanent_mac_addr[BMAPI_MAX_MAC_ADDR_LEN];
// First IPv6 address found for the NIC.
// Applications can cast like "( LPSOCKADDR )&ipv6.Address" to API
// such as WSAAddressToString().
BM_IP_UNICAST_ADDRESS ipv6;
// 802.3 offload capabilities
// These three fields valid ONLY for OS prior to (include) Windows 2003.
// For NDIS 6.0 and later (Vista and Longhorn), use 'ol_task' and
// 'ol_conn'.
BM_OFFLOAD_TCP_IP_CHECKSUM ol_802_3_tcpip_chksum;
BM_OFFLOAD_TCP_LARGE_SEND ol_802_3_lso;
BM_OFFLOAD_TCP_CONNECTION ol_802_3_tcp_conn;
// These two fields valid only for NDIS 6.0 and later (Vista and
// Longhorn).
BM_TASK_OFFLOAD ol_task;
BM_TCP_CONNECTION_OFFLOAD ol_conn;
// This is the handle to the NIC.
// The field is added to support BmapiRetrieveMultiLinkStatus().
U32 handle;
// First IPv6 Gateway address found for the NIC.
// Only available for Vista or later.
// Applications can cast like "( LPSOCKADDR )&gateway_v6.Address" to API
// such as WSAAddressToString().
BM_IP_ADAPTER_GATEWAY_ADDRESS gateway_v6;
// 'ipv6_flags' in BM_ADAPTER_INFO_EX
U32 ipv6_flags;
/****************************************************************************
page 139
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
#define BMAPI_NIC_PCI_INFO_VER 2
// hardware revision
U32 revision;
// PCI bus information. If these information are not available,
// data will be set to -1.
U32 bus_no;
U32 device_no;
U32 function_no;
// PCI information
// No valid if the NIC is on MSI.
U32 irq;
} BM_NIC_PCI_INFO;
#define BMAPI_VBD_ENUM_INFO_VER 3
page 140
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
//
// ATTENTION: When using BmapiSetVbdEnumInfo(), BMAPI_VBD_DEV_CONFIG bit
// will be used to configure the VBD to enumerate virtual
// devices. Other bits will be ignored.
//
// NOTE: WSD will be enumerated only when NDIS is enumerated. If only
// WSD is configured, BMAPI will fail BmapiSetVbdEnumInfo().
U32 ndis_flag;
U32 wsd_flag;
U32 iscsi_flag;
} BM_VBD_ENUM_INFO;
// ASF definition
#define BMAPI_MAX_ALERTDATA 8
#define BMAPI_ASF_SPEC_1_0_ALERTDATA_ELEMENT_LENGTH 12
#define BMAPI_MAX_CONTROLDATA 8
#define BMAPI_MAX_SPEC_1_0_CONTROLDATA_ELEMENT_LENGTH 4
U8 EventSeverity;
U8 SensorNumber;
U8 Entity;
U8 EntityInstance;
} BM_ASF_ALERTDATA;
page 141
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U8 RMCPIANA[4];
U8 RMCPSpecialCommand;
U8 RMCPSpecialCommandParameter[2];
U8 RMCPBootOptions[2];
U8 RMCPOEMParameters[2];
/* to align to dword */
U8 filler;
} BM_ASF_RMCP;
U32 reserved2 : 7;
// Send OEM specific "ASD Ready" message after initialization
U32 EnableSendAsdReady : 1;
U8 UuidGuid[16];
page 142
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U8 DelayedPollTimeValue; /* in second */
U8 Speed; /* see speed defines above */
U8 ReTransmitTimeValue; /* in second */
U8 LegacyPollTimeValue; /* in second */
U8 SysIP[4];
U8 ManagementConsolIP[4];
U8 GateWayIP[4];
U8 subnetMask[4];
U8 communityName[BMAPI_MAX_COMMUNITY_NAME_LEN];
U8 reserved2[12];
} BM_ASF_MISC;
#define BMAPI_MAX_INIT_DATA 50
/****************************************************************************
* Following fields valid only for ASF and IMPI
* For IPMI, only 'EnableASF' in BM_ASF_CFG can be set/clear.
****************************************************************************/
U8 smbusAddr; // forced NIC smbus address, 0 means
// use ARP, other value to force
// smbus address
U16 size;
BM_ASF_INFO AsfInfo;
BM_ASF_ALRT AsfAlert;
BM_ASF_RCTL AsfRCtl;
BM_ASF_RMCP AsfRmcp;
BM_ASF_ADDR AsfAddr;
BM_ASF_MISC AsfGui;
BM_SMB_INIT_DATA smbInitData[BMAPI_MAX_INIT_DATA];
BM_ASF20_T Asf20; // Added in version 6 for ASF 2.0,
// ASF 1.0 firware will ignore this field.
U8 reserve[1024];
page 143
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U32 chksum;
/****************************************************************************
* ASF and IMPI only fields end here.
****************************************************************************/
// Management firmware version description string.
U8 firmware_ver_desc[BMAPI_FW_MAX_DESCRIPTION_LEN];
} BM_ASF_TABLE;
#define BM_ASF_MBOX_STATUS_VER 1
} BM_ASF_MBOX_STATUS; /* 32 bytes */
/****************************************************************************/
/* Firmware information and definition */
/* */
/* ATTENTION: Firmware is using Big-ENDIAN and Intel PC is using */
/* Little-ENDIAN. */
/****************************************************************************/
#define BMAPI_NTOH32(p) ( ( U32 )( (*((U8 *) (p)) << 24) | (*((U8 *) (p)+1) <<
16) | (*((U8 *) (p)+2) << 8) | *((U8 *) (p)+3) ) )
#define BMAPI_FW_MAGIC_VALUE 0x669955aa
#define BMAPI_FW_MEDIA_MAX_LOAD_STAGES 8
page 144
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
// 32-bit CRC
U32 cksum;
} BM_FW_MEDIA_BOOTSTRAP_REGION;
typedef enum {
BMAPI_FW_CODE_IMAGE_TYPE_PXE, /* 0 0x00 */
BMAPI_FW_CODE_IMAGE_TYPE_ASF_INIT, /* 1 0x01 */
BMAPI_FW_CODE_IMAGE_TYPE_ASF_CPUA, /* 2 0x02 */
BMAPI_FW_CODE_IMAGE_TYPE_ASF_CPUB, /* 3 0x03 */
BMAPI_FW_CODE_IMAGE_TYPE_ASF_CFG, /* 4 0x04 */
BMAPI_FW_CODE_IMAGE_TYPE_ISCSI_CFG, /* 5 0x05 */
BMAPI_FW_CODE_IMAGE_TYPE_ISCSI_CFG_PRG, /* 6 0x06 */
BMAPI_FW_CODE_IMAGE_TYPE_USER_BLOCK, /* 7 0x07 */
BMAPI_FW_CODE_IMAGE_TYPE_BRSF_BLOCK, /* 8 0x08 */
BMAPI_FW_CODE_IMAGE_TYPE_ISCSI_BOOT, /* 9 0x09 */
BMAPI_FW_CODE_IMAGE_TYPE_ASF_MBOX, /* 10 0x0a */
BMAPI_FW_CODE_IMAGE_TYPE_ISCSI_CFG_1, /* 11 0x0b */
BMAPI_FW_CODE_IMAGE_TYPE_APE_CFG, /* 12 0x0c */
BMAPI_FW_CODE_IMAGE_TYPE_APE_CODE, /* 13 0x0d (APE firmware) */
BMAPI_FW_CODE_IMAGE_TYPE_APE_UPDATE, /* 14 0x0e (APE firmware update) */
BMAPI_FW_CODE_IMAGE_TYPE_EXT_CFG, /* 15 0x0f */
BMAPI_FW_CODE_IMAGE_TYPE_EXT_DIR, /* 16 0x10 */
BMAPI_FW_CODE_IMAGE_TYPE_APE_DATA, /* 17 0x11 (a.k.a. Opaque Management Data,
Offline Mailbox Data) */
BMAPI_FW_CODE_IMAGE_TYPE_APE_WEB_DATA, /* 18 0x12 (Web/HTML interface content) */
BMAPI_FW_MAX_CODE_IMAGE_TYPE,
} BM_FW_CODE_IMAGE;
#define BMAPI_FW_FEATURE_CONFIG_BOOT_TYPE_PXE 0
#define BMAPI_FW_FEATURE_CONFIG_BOOT_TYPE_RPL 1
page 145
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
#define BMAPI_FW_FEATURE_CONFIG_BOOT_TYPE_BOOTP 2
#define BMAPI_FW_FEATURE_CONFIG_BOOT_TYPE_ISCSI 3
#define BMAPI_FW_FEATURE_CONFIG_BOOT_STRAP_AUTO 0
#define BMAPI_FW_FEATURE_CONFIG_BOOT_STRAP_BBS 1
#define BMAPI_FW_FEATURE_CONFIG_BOOT_STRAP_INT18 2
#define BMAPI_FW_FEATURE_CONFIG_BOOT_STRAP_INT19 3
#define BMAPI_FW_FEATURE_CONFIG_PXE_BAR_SIZE_64K 0
#define BMAPI_FW_FEATURE_CONFIG_PXE_BAR_SIZE_128K 1
#define BMAPI_FW_FEATURE_CONFIG_PXE_BAR_SIZE_256K 2
#define BMAPI_FW_FEATURE_CONFIG_PXE_BAR_SIZE_512K 3
#define BMAPI_FW_FEATURE_CONFIG_PXE_BAR_SIZE_1M 4
#define BMAPI_FW_FEATURE_CONFIG_PXE_BAR_SIZE_2M 5
#define BMAPI_FW_FEATURE_CONFIG_PXE_BAR_SIZE_4M 6
#define BMAPI_FW_FEATURE_CONFIG_PXE_BAR_SIZE_8M 7
#define BMAPI_FW_FEATURE_CONFIG_PXE_BAR_SIZE_16M 8
page 146
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U32 word;
} BM_FW_FEATURE_CONFIG;
#define BMAPI_FW_NIC_HW_CONFIG_PHY_TYPE_UNKNOWN 0
#define BMAPI_FW_NIC_HW_CONFIG_PHY_TYPE_COPPER 1
#define BMAPI_FW_NIC_HW_CONFIG_PHY_TYPE_FIBER 2
/* the defines for mode setting in menu */
#define BMAPI_FW_NIC_HW_CONFIG_LED_MAC_MODE 0
#define BMAPI_FW_NIC_HW_CONFIG_LED_MODE_PHY_MODE_1 1
#define BMAPI_FW_NIC_HW_CONFIG_LED_MODE_PHY_MODE_2 2
#define BMAPI_FW_NIC_HW_CONFIG_LED_MODE_SHARED_TRAFFIC 3
#define BMAPI_FW_NIC_HW_CONFIG_LED_MODE_SHASTA_MAC_MODE 4
#define BMAPI_FW_NIC_HW_CONFIG_LED_MODE_WIRELESS_COMBO_MODE 5
#define BMAPI_FW_NIC_HW_CONFIG_LED_MODE_UNKNOWN 0
#define BMAPI_FW_NIC_HW_CONFIG_LED_MODE_TRIPLE_LINK 1
#define BMAPI_FW_NIC_HW_CONFIG_LED_MODE_LINK_SPEED 2
#define BMAPI_FW_SHASTA_EXT_LED_LEGACY_MODE 0
page 147
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
#define BMAPI_FW_SHASTA_EXT_LED_SHARED_TRAFFIC_LINK_LED_MODE 1
#define BMAPI_FW_SHASTA_EXT_LED_SHASTA_MAC_MODE 2
#define BMAPI_FW_SHASTA_EXT_LED_WIRELESS_COMBO_MODE 3
U32 word;
} BM_FW_NIC_HW_CONFIG;
page 148
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
// pci device id
U16 pci_dev_id;
// pci vendor id
U16 pci_vend_id;
// alternate pci subsystem id
U16 pci_sub_id;
page 149
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
BM_FW_FEATURE_CONFIG feature_config;
BM_FW_NIC_HW_CONFIG hw_config;
BM_NIC_SHARED_CONFIG shared_config;
U32 Power_Budget0;
U32 Power_Budget1;
U32 serworks_use;
/* Primary MAC Serdes 0:15 override value */
U16 mac0_txSerdes_value;
} BM_FW_MEDIA_MANUFACT_REGION;
page 150
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
} BM_FW_EEPROM_INFO;
#define BMAPI_FW_INFO_VER 7
} BM_FW_INFO;
#define BMAPI_FW_INFO_5706_VER 5
page 151
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
// IPMI versions.
U8 ipmi_cfg[BMAPI_FW_MAX_DESCRIPTION_LEN];
U8 ipmi_init[BMAPI_FW_MAX_DESCRIPTION_LEN];
U8 ipmi_serv[BMAPI_FW_MAX_DESCRIPTION_LEN];
// iSCSI versions.
U8 iscsi[BMAPI_FW_MAX_DESCRIPTION_LEN];
U8 iscsi_cprg[BMAPI_FW_MAX_DESCRIPTION_LEN];
// VPD data
BM_FW_MEDIA_VPD vpd;
// iSCSI cfg versions.
U8 iscsib_cfg[BMAPI_FW_MAX_DESCRIPTION_LEN];
U8 iscsib_cfg2[BMAPI_FW_MAX_DESCRIPTION_LEN];
// NCSI versions.
U8 ncsi_common[BMAPI_FW_MAX_DESCRIPTION_LEN];
U8 ncsi_lib5706[BMAPI_FW_MAX_DESCRIPTION_LEN];
} BM_FW_INFO_5706;
#define BMAPI_FW_INFO_57710_VER 3
// TSTORM versions.
U8 l2t_ver[BMAPI_FW_MAX_DESCRIPTION_LEN];
// CSTORM versions.
U8 l2c_ver[BMAPI_FW_MAX_DESCRIPTION_LEN];
// XSTORM versions.
U8 l2x_ver[BMAPI_FW_MAX_DESCRIPTION_LEN];
// USTORM versions.
U8 l2u_ver[BMAPI_FW_MAX_DESCRIPTION_LEN];
// VPD data
BM_FW_MEDIA_VPD vpd;
// NCSI versions.
U8 ncsi_common[BMAPI_FW_MAX_DESCRIPTION_LEN];
} BM_FW_INFO_57710;
page 152
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
/****************************************************************************
*
* ATTENTION
*
* Multi-byte fields in BMAPI_LICENSE_INFO such as 'capability',
* 'max_toe_conn', 'sn', etc. are in BIG_ENDIAN order. For LITTLE-ENDIAN
* macine such as 'x86' processor, the bytes for the multi-byte data fields
* MUST be swapped.
****************************************************************************/
// 'key_index' for BmapiGetLicenseKey() and BmapiSetLicenseKey().
#define BMAPI_LICENSE_KEY_IDX_ACTIVE 0 // The key that is currently used by
firmware
#define BMAPI_LICENSE_KEY_IDX_MANUFAC 1
#define BMAPI_LICENSE_KEY_IDX_UPGRADE 2
typedef struct
{
#define BMAPI_LICENSE_KEY_TYPE_ENUM_BCM5706 0x0
#define BMAPI_LICENSE_KEY_TYPE_ENUM_BCM57710 0x2
U8 key_type;
#define BMAPI_LICENSE_INFO_VER 1
U8 version;
U32 reserved_a[3];
U32 sn;
U16 reserved_b;
#define BMAPI_RES_CFG_VER 5
typedef struct
{
// Version is defined as BMAPI_RES_CFG_VER.
// 'version' is required upon input
// All application MUST use verison 2 or later structure.
U32 version;
page 153
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U32 reserved3;
U32 reserved4;
// For BMAPI_BRCM5706
U32 rdma_reserved_con; // number of reserved RDMA connections
U32 reserved5;
U32 reserved6;
// For BMAPI_BRCM5706 and BMAPI_BRCM57710
U32 iscsi_licensed_con; // number of licensed iSCSI connections
// For BMAPI_BRCM5706
U32 iscsi_reserved_con; // number of reserved iSCSI connections
U32 reserved7;
U32 reserved8;
//////////////////////////
// For BMAPI_BRCM57710 ONLY
U32 ring_size;
U32 max_toe_cons;
U32 max_rdma_cons; // Not supported currently
U32 max_iscsi_cons;
U32 toe_cons_limit;
U32 toe_rss_possible;
//////////////////////////
} BM_RES_CFG;
/****************************************************************************/
// Definition for BMAPI_CAB_DIAG
#define BMAPI_NUMCHAN 4
#define BMAPI_CAB_DIAG_VER 1
typedef struct
{
page 154
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
// 'status' definitions
#define BMAPI_CABDIAG_STATUS_NO_FAULT 0x0000 // Good cable/PCB signal paths,
but no Gigabit link, vlaid length returned
#define BMAPI_CABDIAG_STATUS_PIN_SHORT_OR_XT 0x0001 // Pin-short or cross-talk along 2
or more cable/PCB signal paths, vlaid length returned
#define BMAPI_CABDIAG_STATUS_OPEN 0x0002 // One or both pins are open for a
twisted pair, vlaid length returned
#define BMAPI_CABDIAG_STATUS_SHORT 0x0004 // Two pins from the same twisted
pair are shorted together, vlaid length returned
#define BMAPI_CABDIAG_STATUS_FORCED 0x0008 // Persistent noise present (most
likely caused by Forced 10/100), distanceCm is NOT valid
#define BMAPI_CABDIAG_STATUS_GLINK 0x0010 // Gigabit link is up and running,
vlaid length returned
#define BMAPI_CABDIAG_STATUS_UNKNOWN -99 // unknow result, distanceCm is
NOT valid
// 'status' determine the result condition of the able and whether
// 'distanceCm' is valid or not.
int status[BMAPI_NUMCHAN];
#define BMAPI_OFLD_STACK_INFO_NDIS 0
#define BMAPI_OFLD_STACK_INFO_ISCSI 2
#define BMAPI_OFLD_STACK_INFO_WSD 3
#define BMAPI_OFLD_STACK_INFO_VER 1
typedef struct
{
// Version is defined as BMAPI_OFLD_STACK_INFO_VER.
// 'version' is required upon input
U32 version;
// the numbers of connections offloaded and connections being offloaded
// but not completed yet
U32 tcp_list_cnt;
U32 reserved[18];
} BMAPI_OFLD_STACK_INFO;
#define BMAPI_ISCSI_CONFIG_VER 2
typedef struct
{
// Version is defined as BMAPI_ISCSI_CONFIG_VER.
// 'version' is required on input
U32 version;
// 1 to enable DHCP for IPv4, 0 for static IP settings.
// When DHCP is in use, 'LocalIpv4', 'SubnetMaskIpv4' and
// 'DefaultGatewayIpv4' will be ignored.
U32 EnableDHCPIpv4;
// IPv4 configuration
U32 LocalIpv4;
U32 SubnetMaskIpv4;
U32 DefaultGatewayIpv4;
U32 VlanID;
// DHCPv6 (BOOLEAN)
U32 bEnableDHCPIpv6;
} BMAPI_ISCSI_CONFIG;
page 155
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
typedef struct
{
U8 ipv6[16];
U32 prefixlen;
} BM_ISCIS_IPV6_ADDR;
typedef struct
{
// handle to an iSCSI node.
// Must be privided on input.
U32 handle;
U32 uNumOfIPV4;
U32 uNumOfIPV6;
// Return code for this structure.
// Applications must check BmapiGetISCSIRuntimeIPCount() to be BMAPI_OK
// before using 'return_code' from each individual structure.
U32 return_code;
} BM_ISCSI_IP_COUNT;
#define BM_ISCSI_IPV4_RT_VER 1
typedef struct
{
// Version is defined as BM_ISCSI_IPV4_RT_VER.
// 'version' is required upon input
U32 version;
// handle to an iSCSI node.
U32 handle;
} BM_ISCSI_IPV4_RT;
#define BM_ISCSI_IPV6_RT_VER 1
typedef struct
{
// Version is defined as BM_ISCSI_IPV6_RT_VER.
// 'version' is required upon input
U32 version;
// handle to an iSCSI node.
U32 handle;
page 156
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U32 UseLinkLocalAddress;
// IPV6 scope id
U32 ScopeId;
#define BM_ISCSI_STATS_VER 1
typedef struct
{
// Version is defined as BM_ISCSI_STATS_VER.
// 'version' is required upon input
U32 version;
page 157
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U32 LogoutOtherCodes;
#define BM_ISCSI_SESSION_STATS_VER 1
typedef struct
{
// Version is defined as BM_ISCSI_SESSION_STATS_VER.
// 'version' is required upon input
U32 version;
// Unique Adapter Id
// Must be filled on input. It is available from 'BM_ISCSI_STATS'.
U64 UniqueAdapterId;
// Unique Session Id
// If 'BMAPI_ISCSI_STATS_SESSION_ID' is not set on input, BMAPI expects
// caller will provide the 'SessionId' as input and BMAPI will use
// 'SessionId' to find and collect information.
U64 SessionId;
// Unique Session Name
U8 *pSessionName;
page 158
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
U64 ConnectionTimeoutErrors;
//
// BM_TCP_OFLD_STATS is available only for NDIS 5.2 or later.
// It also depends on the NDIS miniport's chimney offload capabilities.
//
#define BM_TCP_OFLD_STATS_VER 1
typedef struct
{
// Version is defined as BM_TCP_OFLD_STATS_VER.
// 'version' is required upon input
U32 version;
// Return code for this structure.
// Applications must check BmapiOfldStats() to be BMAPI_OK
// before using 'return_code' from each individual structure.
U32 return_code;
U64 InSegments;
U64 OutSegments;
U32 CurrentlyEstablished;
U32 ResetEstablished;
U32 RetransmittedSegments;
U32 InErrors;
U32 OutResets;
} BM_TCP_OFLD_STATS;
//
// BM_IP_OFLD_STATS is available only for NDIS 5.2 or later.
// It also depends on the NDIS miniport's chimney offload capabilities.
//
#define BM_IP_OFLD_STATS_VER 1
typedef struct
{
// Version is defined as BM_IP_OFLD_STATS_VER.
// 'version' is required upon input
U32 version;
// Return code for this structure.
// Applications must check BmapiOfldStats() to be BMAPI_OK
// before using 'return_code' from each individual structure.
U32 return_code;
U64 InReceives;
U64 InOctets;
U64 InDelivers;
U64 OutRequests;
U64 OutOctets;
U32 InHeaderErrors;
U32 InTruncatedPackets;
U32 InDiscards;
U32 OutDiscards;
U32 OutNoRoutes;
} BM_IP_OFLD_STATS;
page 159
Broadcom Confidential and Proprietary
BCM5700 • Broadcom Management API
#pragma pack(pop)
page 160
Broadcom Confidential and Proprietary