logo资料库

EPON BCM芯片资料.pdf

第1页 / 共254页
第2页 / 共254页
第3页 / 共254页
第4页 / 共254页
第5页 / 共254页
第6页 / 共254页
第7页 / 共254页
第8页 / 共254页
资料共254页,剩余部分请下载后查看
BCM Switching Product Family Programmer’s Reference Guide
Table of Contents
List of Tables
Section 1: Introduction
About This Document
Revision Levels
Notational Conventions
API Parameters
Pair Function References
Code Notations
Definitions and Abbreviations
Related Documentation
Additional Publications
Section 2: Broadcom SDK Components
Overview
Broadcom Libraries
BCM API
BCMX
SOC
PHY Drivers
Portability Layers
The System Abstraction Layer (SAL)
Configuration Manager (CM)
Broadcom Applications
BCM Shell
Event Logging
Event Logging Overview
Event Log Structure
Test Suite
Broadcom Protocol Stacks
Using Stacking Software
Broadcom Platform Support
Board Support Packages
Broadcom Device Enumerator (BDE)
Section 3: Source Directory Layout
Top-level Directory
Top-level Subdirectories
build/
rc/
doc/
RELDOCS/
include/
make/
src/
systems/
The src/ Subdirectories
src/appl
src/bcm
src/bcmx
src/customer
src/sal
src/shared
src/soc
Section 4: Makefile Infrastructure
Supported Platforms and Operating Systems
Using Makefiles
Makefile Hierarchy
Local Makefile
Special ${SDK}/systems/drv Makefile
Make.config
Make.tools
Make.local
Makefile.${TARGET}
Make.lib
Important Makefile Variables
Section 5: Building Software
Standard Builds
Building a VxWorks Executable
Building a VxWorks BootROM
Building Linux Kernel Modules and Executables (Kernel Mode)
Building a Solaris or Linux Executable
Section 6: Platform Support
Overview
SDK5 in Kernel Mode
Building the Kernel Modules
Adding Your Configuration
The Kernel Mode Broadcom Device Enumerator Module (linux-kernel-bde.o or linux-kernel-bde.ko)
Module Implementation Overview
PCI Configuration Access
Register Access
Interrupt Handling
DMA Memory Management in Kernel Mode
Address Translation for DMA in Kernel Mode
Using the Kernel BDE Module
The Linux BCM Core Module (linux-bcm-core.o or linux-bcm.core.ko)
The Linux User/Kernel Proxy Module (linux-uk-proxy.o or linux-uk-proxy.ko)
The Linux BCM Diag Module (linux-bcm-diag.o or linux-bcm-diag.ko)
The bcm.user.proxy Application
The Linux BCM Network Module (linux-bcm-net.o or linux-bcm-net.ko)
Kernel Mode SDK5 Summary
SDK5 in User Mode
Building the User Modules
The User Mode Broadcom Device Enumerator Module (linux-user-bde.o or linux- user-bde.ko)
PCI Configuration Access
Register Access
Interrupt Handling
DMA Memory Management in User Mode
Address Translation for DMA in User Mode
Using the User BDE Module
The bcm.user Application
User Mode SDK5 Summary
The Jaguar Platform
BCM94704CPCI Hardware Features
BCM94704CPCI Hardware Configuration
CFE on the JAG Platforms
Configuring Hardware
CFE Bootloader
Legacy Versions of CFE
Preserving Network Configuration
SDK/Linux on JAG Platforms
The CFE kernel_args Variable
Configuring JAG Platform to Boot from the Network
Precompiled Linux Kernel
Building a Custom Linux Kernel
Configuring and Compiling the Kernel
Booting the Linux Kernel
Mounting the NFS Root File System
Configuring StrataXGS SDK
Troubleshooting
SDK/VxWorks ON JAG PLATFORMS
Building a VxWorks Image
Booting a VxWorks Image
The NSX Platform
NSX (BCM91125CPCI) Hardware Features
BCM91125CPCI Hardware Configuration Overview
BCM91125CPCI Hardware Configuration
Configuring Hardware
Configuring CFE
Preserving Network Configuration
SDK/Linux on NSX Platforms
The CFE kernel_args Variable
Configuring NSX Platform to Boot from the Network
Building a Custom Linux Kernel
Configuring and Compiling the Kernel
Mounting the NFS Root File System
SDK/VxWorks on NSX Platforms
Building an NSX VxWorks Image
Booting a VxWorks Image
The BMW Platform
BCM98245 (BMW) Hardware Features
BCM98245 Hardware Configuration
BMW Bootloader
SDK/Linux on BMW Platform
Building a Custom Linux Kernel
Configuring and Compiling the Kernel
SDK/VxWorks on BMW
The Raptor Platform
Raptor Hardware Features
BCM956XXX Hardware Configuration
Jumper Settings for BCM956218K48
Jumper Settings for BCM956218P48REF
Jumper Settings for BCM956014P24
Jumper Settings for BCM956214R26T
Jumper Settings for BCM956018K48
CFE on the Raptor Platforms
Configuring Hardware
Configuring CFE
Preserving Network Configuration
SDK/Linux on Raptor Platforms
The CFE kernel_args Variable
Building a Custom Kernel
Configuring and Compiling the Kernel
Booting the Linux Kernel
StrataXGS SDK
SDK/VxWorks on Raptor Platforms
Building a VxWorks Image
Booting the VxWorks Image Through CFE
Booting VxWorks over Network
Booting VxWorks from Flash Using CFE
Building the VxWorks Bootrom for Raptor Platforms
Section 7: System Abstraction Layer API
Overview
Core SAL API
Application SAL API
Core SAL API Calls
Application SAL API Calls
Section 8: Configuration Manager API
Overview
Configuration Manager Device Vectors
The soc_cm_device_vectors_t Structure
The soc_cm_dev_t Structure
Accessing Device Registers Using CM API
Configuration Manager Initialization Vectors
Using the Configuration Manager API
APIs for Configuration Manager Device Vectors
APIs for Configuration Manager Initialization Vectors
APIs for Using Configuration Manager API
Section 9: APIs for Event Logging
Appendix A: Index of Calls
Programmer’s Reference Guide BCM Switching Product Family Network Switching Software Platform Guide Software Development Kit Release 5.4.2 16215 Alton Parkway • P.O. Box 57013 Irvine, CA 92619-7013 Phone: 949-450-8700 Fax: 949-450-8710 12/13/06 12/13/2006 1539I 56XX-PG801-R
REVISION HISTORY Revision 56XX-PG801-R 56XX-PG800-R Date 12/13/06 03/25/05 Change Description Covers SDK releases through 5.4.2 Initial release. Broadcom Corporation P.O. Box 57013 16215 Alton Parkway Irvine, CA 92619-7013 © 2006 by Broadcom Corporation All rights reserved Printed in the U.S.A. Broadcom®, the pulse logo, Connecting everything®, the Connecting everything logo, StrataSwitch®, StrataXGS®, HiGig™, and HiGig+™ are trademarks of Broadcom Corporation and/or its affiliates in the United States, EU and/or certain other countries. Any other trademarks or trade names mentioned are the property of their respective owners. 12/13/2006 1539I
Programmer’s Reference Guide 12/13/06 BCM Switching Product Family TABLE OF CONTENTS Section 1: Introduction........................................................................................................1 About This Document.................................................................................................................................. 1 Revision Levels ............................................................................................................................................ 1 Notational Conventions ............................................................................................................................... 2 Definitions and Abbreviations ................................................................................................................. 3 Related Documentation .......................................................................................................................... 5 Section 2: Broadcom SDK Components ...........................................................................7 Overview ....................................................................................................................................................... 7 Broadcom Libraries ..................................................................................................................................... 8 BCM API ................................................................................................................................................. 8 BCMX...................................................................................................................................................... 8 SOC ........................................................................................................................................................ 8 Portability Layers ......................................................................................................................................... 9 The System Abstraction Layer (SAL)...................................................................................................... 9 Configuration Manager (CM) ................................................................................................................ 10 Broadcom Applications ............................................................................................................................. 10 BCM Shell ............................................................................................................................................. 10 Event Logging ....................................................................................................................................... 10 Event Logging Overview ....................................................................................................................... 10 Event Log Structure .............................................................................................................................. 13 Test Suite.............................................................................................................................................. 14 Broadcom Protocol Stacks.................................................................................................................... 14 Broadcom Platform Support ..................................................................................................................... 15 Board Support Packages ...................................................................................................................... 15 Broadcom Device Enumerator (BDE) ................................................................................................... 15 Section 3: Source Directory Layout.................................................................................16 Top-level Directory..................................................................................................................................... 16 Top-level Subdirectories ....................................................................................................................... 16 The src/ Subdirectories ......................................................................................................................... 18 Section 4: Makefile Infrastructure ....................................................................................22 Supported Platforms and Operating Systems......................................................................................... 22 Document 56XX-PG801-R Page iii Broadcom Corporation 12/13/2006 1539I
BCM Switching Product Family Programmer’s Reference Guide 12/13/06 Using Makefiles...........................................................................................................................................23 Makefile Hierarchy ......................................................................................................................................24 Local Makefile........................................................................................................................................24 Special ${SDK}/systems/drv Makefile ...................................................................................................24 Make.config ...........................................................................................................................................25 Make.tools .............................................................................................................................................25 Make.local .............................................................................................................................................25 Makefile.${TARGET} .............................................................................................................................26 Make.lib .................................................................................................................................................26 Make.depend.........................................................................................................................................27 Important Makefile Variables .................................................................................................................27 Section 5: Building Software............................................................................................ 29 Standard Builds ..........................................................................................................................................29 Building a VxWorks Executable ................................................................................................................29 Building a VxWorks BootROM ..................................................................................................................30 Building Linux Kernel Modules and Executables (Kernel Mode)...........................................................30 Building a Solaris or Linux Executable ....................................................................................................30 Section 6: Platform Support............................................................................................. 32 Overview......................................................................................................................................................32 SDK5 in Kernel Mode .................................................................................................................................32 Building the Kernel Modules..................................................................................................................33 The Kernel Mode Broadcom Device Enumerator Module (linux-kernel-bde.o or linux-kernel-bde.ko) .34 The Linux BCM Core Module (linux-bcm-core.o or linux-bcm.core.ko).................................................36 The Linux User/Kernel Proxy Module (linux-uk-proxy.o or linux-uk-proxy.ko).......................................37 The Linux BCM Diag Module (linux-bcm-diag.o or linux-bcm-diag.ko) .................................................37 The Linux BCM Diag Full Module (linux-bcm-diag-full.o or linux-bcm-diag-full.ko) ...............................38 The bcm.user.proxy Application ............................................................................................................38 The Linux BCM Network Module (linux-bcm-net.o or linux-bcm-net.ko) ...............................................39 Kernel Mode SDK5 Summary ...............................................................................................................39 SDK5 in User Mode.....................................................................................................................................40 Building the User Modules.....................................................................................................................40 The User Mode Broadcom Device Enumerator Module (linux-user-bde.o or linux-user-bde.ko)..........41 The bcm.user Application ......................................................................................................................42 User Mode SDK5 Summary ..................................................................................................................42 Page iv Document 56XX-PG801-R Broadcom Corporation 12/13/2006 1539I
Programmer’s Reference Guide 12/13/06 BCM Switching Product Family The Jaguar Platform .................................................................................................................................. 43 BCM94704CPCI Hardware Features.................................................................................................... 43 BCM94704CPCI Hardware Configuration............................................................................................. 43 CFE on the JAG Platforms.................................................................................................................... 43 Configuring Hardware ........................................................................................................................... 44 CFE Bootloader .................................................................................................................................... 44 Legacy Versions of CFE ....................................................................................................................... 45 Configuring CFE ................................................................................................................................... 46 Preserving Network Configuration ........................................................................................................ 47 SDK/Linux on JAG Platforms................................................................................................................ 47 The CFE kernel_args Variable.............................................................................................................. 47 Configuring JAG Platform to Boot from the Network............................................................................. 48 Precompiled Linux Kernel ..................................................................................................................... 48 Building a Custom Linux Kernel............................................................................................................ 48 Booting the Linux Kernel....................................................................................................................... 49 Mounting the NFS Root File System..................................................................................................... 49 Configuring StrataXGS SDK ................................................................................................................. 50 Troubleshooting .................................................................................................................................... 50 SDK/VxWorks ON JAG PLATFORMS .................................................................................................. 50 Building a VxWorks Image.................................................................................................................... 51 Booting a VxWorks Image .................................................................................................................... 51 The NSX Platform....................................................................................................................................... 53 NSX (BCM91125CPCI) Hardware Features......................................................................................... 53 BCM91125CPCI Hardware Configuration Overview............................................................................. 53 BCM91125CPCI Hardware Configuration............................................................................................. 53 CFE on the NSX Platforms ................................................................................................................... 54 Configuring Hardware ........................................................................................................................... 54 Configuring CFE ................................................................................................................................... 55 Preserving Network Configuration ........................................................................................................ 55 SDK/Linux on NSX Platforms ............................................................................................................... 55 The CFE kernel_args Variable.............................................................................................................. 56 Configuring NSX Platform to Boot from the Network ............................................................................ 56 Building a Custom Linux Kernel............................................................................................................ 57 Configuring and Compiling the Kernel .................................................................................................. 57 Booting the Linux Kernel....................................................................................................................... 58 Document 56XX-PG801-R Page v Broadcom Corporation 12/13/2006 1539I
BCM Switching Product Family Programmer’s Reference Guide 12/13/06 Mounting the NFS Root File System .....................................................................................................58 StrataXGS SDK .....................................................................................................................................59 SDK/VxWorks on NSX Platforms ..........................................................................................................59 Building an NSX VxWorks Image ..........................................................................................................59 Booting a VxWorks Image .....................................................................................................................60 The BMW Platform......................................................................................................................................61 BCM98245 (BMW) Hardware Features.................................................................................................61 BCM98245 Hardware Configuration......................................................................................................61 BMW Bootloader ...................................................................................................................................62 SDK/Linux on BMW Platform ................................................................................................................63 Building a Custom Linux Kernel ............................................................................................................63 Configuring and Compiling the Kernel...................................................................................................63 SDK/VxWorks on BMW .........................................................................................................................64 The Raptor Platform ...................................................................................................................................66 Raptor Hardware Features ....................................................................................................................66 BCM956XXX Hardware Configuration ..................................................................................................66 Jumper Settings for BCM956218K48 ....................................................................................................66 Jumper Settings for BCM956218P48REF.............................................................................................66 Jumper Settings for BCM956014P24 ....................................................................................................67 Jumper Settings for BCM956214R26T..................................................................................................67 Jumper Settings for BCM956018K48 ....................................................................................................67 CFE on the Raptor Platforms ................................................................................................................67 Configuring Hardware............................................................................................................................68 Configuring CFE ....................................................................................................................................68 Preserving Network Configuration.........................................................................................................69 SDK/Linux on Raptor Platforms.............................................................................................................69 The CFE kernel_args Variable ..............................................................................................................69 Building a Custom Kernel......................................................................................................................70 Configuring and Compiling the Kernel...................................................................................................70 Booting the Linux Kernel .......................................................................................................................71 StrataXGS SDK .....................................................................................................................................71 SDK/VxWorks on Raptor Platforms.......................................................................................................71 Building a VxWorks Image ....................................................................................................................72 Booting the VxWorks Image Through CFE ...........................................................................................72 Booting VxWorks over Network.............................................................................................................72 Page vi Document 56XX-PG801-R Broadcom Corporation 12/13/2006 1539I
Programmer’s Reference Guide 12/13/06 BCM Switching Product Family Booting VxWorks from Flash Using CFE .............................................................................................. 74 Building the VxWorks Bootrom for Raptor Platforms ............................................................................ 75 Section 7: System Abstraction Layer API .......................................................................76 Overview ..................................................................................................................................................... 76 Core SAL API........................................................................................................................................ 76 Application SAL API.............................................................................................................................. 76 Core SAL API Calls .................................................................................................................................... 77 sal_alloc.............................................................................................................................................. 77 sal_free ............................................................................................................................................... 78 sal_core_init ....................................................................................................................................... 79 sal_boot_flags.................................................................................................................................... 80 sal_boot_script .................................................................................................................................. 81 sal_assert_set .................................................................................................................................... 82 sal_dpc_init ........................................................................................................................................ 83 sal_dpc_term...................................................................................................................................... 84 sal_dpc_config................................................................................................................................... 85 sal_dpc................................................................................................................................................ 86 sal_dpc_time ...................................................................................................................................... 87 sal_dpc_cancel .................................................................................................................................. 88 sal_spl_init ......................................................................................................................................... 89 sal_spl................................................................................................................................................. 90 sal_splhi.............................................................................................................................................. 91 sal_int_locked .................................................................................................................................... 92 sal_int_context................................................................................................................................... 93 sal_mutex_create............................................................................................................................... 94 sal_mutex_destroy ............................................................................................................................ 95 sal_mutex_take .................................................................................................................................. 96 sal_mutex_give .................................................................................................................................. 97 sal_sem_create .................................................................................................................................. 98 sal_sem_destroy................................................................................................................................ 99 sal_sem_take.................................................................................................................................... 100 sal_sem_give.................................................................................................................................... 101 sal_thread_create ............................................................................................................................ 102 sal_thread_destroy .......................................................................................................................... 103 sal_thread_self................................................................................................................................. 104 sal_thread_name.............................................................................................................................. 105 sal_thread_exit................................................................................................................................. 106 sal_thread_yield............................................................................................................................... 107 sal_thread_main_set ....................................................................................................................... 108 Document 56XX-PG801-R Page vii Broadcom Corporation 12/13/2006 1539I
BCM Switching Product Family Programmer’s Reference Guide 12/13/06 sal_thread_main_get........................................................................................................................ 109 sal_sleep ........................................................................................................................................... 110 sal_usleep ......................................................................................................................................... 111 sal_time_usecs ................................................................................................................................. 112 sal_time ............................................................................................................................................. 113 sal_time_double ............................................................................................................................... 114 Application SAL API Calls .......................................................................................................................115 sal_config_refresh............................................................................................................................ 115 sal_config_init .................................................................................................................................. 116 sal_config_flush ............................................................................................................................... 117 sal_config_get .................................................................................................................................. 118 sal_config_get_next ......................................................................................................................... 119 sal_config_set................................................................................................................................... 120 sal_config_show............................................................................................................................... 121 sal_config_init_defaults................................................................................................................... 122 sal_console_init................................................................................................................................ 123 sal_printf ........................................................................................................................................... 124 sal_vprintf ......................................................................................................................................... 125 sal_open............................................................................................................................................ 126 sal_close ........................................................................................................................................... 127 sal_fopen........................................................................................................................................... 128 sal_fclose .......................................................................................................................................... 129 sal_homedir_set ............................................................................................................................... 130 sal_homedir_get............................................................................................................................... 131 sal_getcwd ........................................................................................................................................ 132 sal_ls.................................................................................................................................................. 133 sal_cd ................................................................................................................................................ 134 sal_remove........................................................................................................................................ 135 sal_rename........................................................................................................................................ 136 sal_mkdir........................................................................................................................................... 137 sal_rmdir ........................................................................................................................................... 138 sal_opendir ....................................................................................................................................... 139 sal_readdir ........................................................................................................................................ 140 sal_rewinddir .................................................................................................................................... 141 sal_closedir....................................................................................................................................... 142 sal_readline....................................................................................................................................... 143 sal_readline_config .......................................................................................................................... 144 sal_readchar ..................................................................................................................................... 145 sal_flash_init..................................................................................................................................... 146 sal_flash_boot .................................................................................................................................. 147 sal_flash_sync .................................................................................................................................. 148 Page viii Document 56XX-PG801-R Broadcom Corporation 12/13/2006 1539I
分享到:
收藏