Abstract:
A method and system for retaining serial port data is provided. Under certain conditions, such as following a system reset, the storage of current serial port data is inhibited. A determination is made whether non-volatile storage media is available. If non-volatile storage media is available, then data from the buffer containing previously received serial port data is transferred to the non-volatile storage medium. Once the transfer is complete, the storage in a buffer of current serial port data is enabled. If non-volatile storage media is not available, then buffering remains inhibited.

Description:
RELATED APPLICATIONS  
       [0001]     This application claims the benefit of U.S. Provisional Patent Application Ser. No. 60/629,174, filed Nov. 18, 2004, the disclosure of which is incorporated herein by reference in its entirety. 
     
    
     TECHNICAL FIELD  
       [0002]     The subject matter described herein relates to capturing console port data from an unsupervised electronic circuit card. More particularly, the subject matter described herein provides methods and systems for buffering console port data in an application node card in a telecommunications equipment shelf assembly.  
       BACKGROUND ART  
       [0003]     It is well known to arrange telecommunications equipment in shelf assemblies. In some shelf assemblies, circuit cards are removably connected to a backplane or midplane. The circuit cards may be arranged in parallel to one another and may be guided to be perpendicular to the backplane or midplane. Electrical connections are established between connectors on the backplane or midplane and complementary connectors on the back edge of each circuit card. Typically, the connectors include multiple pins and sockets arranged in one or more rows along part or all of the back edge of the circuit card. When a circuit card is inserted into the equipment shelf, the shelf guides provide an approximate alignment for the pins and sockets, and a precise alignment is achieved by the mating portions of the connectors.  
         [0004]     Shelf assemblies permit the deployment of several application cards in a comparatively small space. In many shelf architectures, a shelf management interface card is provided to monitor shelf status and provide the ability to manage cards within the shelf, for example by relaying network management queries and responses between a system manager and an application card. The shelf management interface card may also provide a pathway through which an external management console may interface with an application card in a shelf assembly, such as that described in commonly-assigned, co-pending U.S. Provisional Patent Application Ser. No. 60/626,801, entitled METHODS AND SYSTEMS FOR PROVIDING MANAGEMENT IN A TELECOMMUNICATIONS EQUIPMENT SHELF ASSEMBLY USING A SHARED SERIAL BUS, filed on Nov. 10, 2004, the disclosure of which is incorporated herein by reference in its entirety.  
         [0005]     The console port enables a system manager to interact with the application card at a low level, such as at the basic input/output system (BIOS) or operating system levels. The system manager may be able to make changes to the application configuration or initialization information to enable a malfunctioning application card to initialize correctly. In addition, in the event that an application card fails, the operating system may use the console port to output information that may be useful for debugging. If each application card has its own console port, data written from the console port to an external device may be captured for diagnostic purposes. However, in more recent architectures, such as that described in the above-referenced commonly-assigned, co-pending patent application, each application card may not always be connected to a shelf or system-level console port. Accordingly, if a failure occurs when an application card is not connected to the shared console port, the data will be lost. An application card may be deployed as a stand-alone unit (i.e., not part of a shelf) and console port data may be lost if the console port of the stand-alone unit is not being monitored.  
         [0006]     Another problem that may exist in preserving console port data is preventing console port data from being over-written before it can be read by an operating system or an external diagnostic device.  
         [0007]     Accordingly, there is a need to provide a system and method for buffering console port data from an unsupervised electronic circuit card, thereby enabling console port data to be stored and/or viewed at a later time.  
       DISCLOSURE OF THE INVENTION  
       [0008]     In accordance with the subject matter described herein, a method for retaining serial port data is provided. Under certain conditions, such as following a system reset, the storage of current serial port data is inhibited. A determination is made whether a non-volatile storage medium is available. If a non-volatile storage medium is available, then data from the buffer containing previously received serial port data is transferred to the non-volatile storage medium. Once the transfer is complete, the storage in a buffer of current serial port data is enabled. If the non-volatile storage medium is not available, then buffering remains inhibited.  
         [0009]     In accordance with another aspect of the subject matter described herein, the determination of whether non-volatile storage media is available may be made by attempting to access storage media using an operating system function or attempting to access a predetermined memory address location where non-volatile storage media is expected to be located. The success of the access may be determined by evaluating any error value returned by the operating system function. The success of the access may also be determined by writing data to the predetermined memory address location, reading data from the predetermined memory address location, and comparing the read data to the written data. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0010]      FIG. 1  is a block diagram of a buffered console port in accordance with one aspect of the subject matter described herein;  
         [0011]      FIG. 2  is an block diagram of another embodiment of the buffered console port in accordance with the subject matter described herein;  
         [0012]      FIG. 3  is a flow diagram of a method for buffering console port data in accordance with an embodiment of the subject matter described herein;  
         [0013]      FIG. 4  is a flow diagram of a method for transferring data from the ring buffer to a non-volatile storage medium in accordance with an embodiment of the subject matter described herein;  
         [0014]      FIG. 5  is a system level block diagram of an application card deployed in a stand-alone configuration and connected to a terminal device in accordance with an embodiment of the subject matter described herein; and  
         [0015]      FIG. 6  is a system level block diagram of an application card deployed in a shelf assembly and connected to a terminal device via a shared midplane in accordance with an embodiment of the subject matter described herein. 
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0016]     The subject matter described herein provides a system and method for buffering data from an application card console port interface. The application card console port interface provides a control interface for an external system manager. The application card may be a self-contained piece of equipment or may be deployed as a card in a shelf assembly. In a shelf assembly, a shelf management card may provide a relay point between the external system manager and the console port or the console port may be accessed directly through a dedicated serial interface, for example via a rear transition module associated with the application card.  
         [0017]      FIG. 1  is a block diagram of a buffered console port  100  in accordance with one aspect of the subject matter described herein. Console port  100  provides access to functions of the application card BIOS and/or operating system and may be used to set initialization parameters. In addition, the application card operating system may use console port  100  to output information as the application card terminates application processes. In the event that the application card terminates a process due to a process error or malfunction, the information output by the application card may be useful in helping to identify the cause of the process error or malfunction.  
         [0018]     As shown in  FIG. 1 , console port interface  102  provides serial data transport through a dedicated serial I/O interface device  104 , such as a universal asynchronous receiver-transmitter (UART). As is known to the art, a UART  104  receives data from a processor interface  106  and converts the data into a serial bit stream having a format that is compatible with a device connected to console port interface  102 . For example, UART  104  may add start, stop, and parity bits to each character and transmit the character to console port interface  102  at a specified serial data rate. Likewise, serial data that is received at a specified serial data rate from console port interface  102  is converted by UART  104  into a suitable format by removing the start, stop, and parity bits. UART  104  may employ common flow control techniques and an internal data buffer to provide efficient communication between processor interface  106  and console port interface  102 .  
         [0019]     In accordance with one aspect of the subject matter described herein, data written from processor interface  106  to UART  104  is also stored in console port buffer  108 . Console port buffer  108  may be connected in parallel to UART  104 , such that data and control signals sent from the processor interface  106  to the UART  104  are received by UART  104  and console port buffer  108 . It should be appreciated by one skilled in the art that in order for processor interface  106  to write data to both devices simultaneously, the write-cycle timing of console port buffer  108  should be compatible with the write-cycle timing of UART  104 . Any write-acknowledge signal required by processor interface  106  may be generated by UART  104 .  
         [0020]      FIG. 2  is an block diagram of another embodiment of a buffered console port  200  in accordance with the subject matter described herein. As in the previous embodiment, console port interface  102  provides serial data transport through console port UART  104 . Console port UART  104  receives data from processor interface  106  and converts the data into a serial bit stream having a format that is compatible with a device connected to console port interface  102 . In this embodiment, console port UART  104  transmits data to a buffer UART  202  in addition to the console port interface  102 . Buffer UART  202  should be configured to receive data at the same rate and format as the device connected to console port interface  102 . Buffer UART  202  receives the serial data from console port UART  104 , removes any start, stop, and parity bits, and makes the data available to console port buffer  108 . Console port buffer  108  may include logic needed to interface with and retrieve data from buffer UART  202 . It should be appreciated that the embodiment shown in  FIG. 2  provides the ability to buffer serial port data in the event that access to the processor/UART interface is not available.  
         [0021]     In either embodiment, console port buffer  108  may be configured as a ring buffer. As is known to the art, a ring buffer may be implemented using an array of contiguous memory locations. A write pointer is used to indicate the address of the next available memory location of the ring buffer, while a read pointer is used to indicate the address of the memory location that contains the oldest data byte in the ring buffer. Once a memory location is written to, the write pointer may be incremented to indicate the location of the next available memory location. If the write pointer and read pointer indicate the same memory location, the last available memory location has been written to and the ring buffer is full. In embodiments of the subject matter described herein, the ring buffer is configured to capture a predetermined amount of data. Once the ring buffer is full, older data may be overwritten to permit the storage of more recent data. Thus, if the write pointer and read pointer indicate the same memory location, the read pointer is incremented to indicate the memory location of the next-oldest data byte and the memory location of the oldest data byte becomes available.  
         [0022]     Data received by UART  104  may be written to ring buffer  108  at the memory location indicated by the value of the write pointer. The value of the write pointer may be incremented either before or after data is written to the ring buffer, provided that memory locations of the ring buffer are not unintentionally skipped or overwritten. Thus, a write cycle to the ring buffer memory may include either first incrementing the value of the write pointer and then writing data to the memory location indicated by the write pointer or first writing data to the memory location indicated by the write pointer and then incrementing the value of the write pointer. Each time the write pointer is incremented, the new value of the write pointer may be evaluated to ensure that the write pointer indicates a memory location within the predetermined array of contiguous memory locations. If the value of the write pointer indicates a memory location outside the predetermined array of contiguous memory locations, the value of the write pointer may be set to indicate the first memory location in the array.  
         [0023]     Console port buffer  108  includes a buffer enable signal or register. During application card initialization, console port buffering is disabled to prevent data in the buffer from being overwritten, for example, by application process initialization messages. The operating system copies data stored in console port buffer  108  to a more permanent location, such as a storage drive associated with the application card. Processor interface  106  may directly accesses data stored in console port buffer  108 . For example, processor interface  106  may perform a series of read operations from a predetermined address associated with the console port buffer and receive data stored in console port buffer  108 , beginning with the oldest stored data. The retrieved data may be written to the more permanent storage location. Once the information in console port buffer  108  has been copied, the operating system enables console port buffering. If the operating system is not able to successfully copy the information in console port buffer  108  to another location, the operating system will not enable console port buffering. Rather, information in console port buffer  108  is preserved and may be retrieved by a terminal attached to the console port or another attempt to save the contents of console port buffer  108  may be made.  
         [0024]      FIG. 3  is a flow diagram of a method for buffering console port data in accordance with an embodiment of the subject matter described herein. In step  301 , data is received by console buffer  108 . The data may be any suitable data that is written to a console port. For example, the data may be a panic dump from a Linux-based operating system when an application card fails. In step  302 , it is determined whether buffering is enabled. Buffering may be enabled after previously-received console port data has been read from the console port buffer. If, in step  302 , console port buffering is not enabled, the received data is discarded (step  303 ). If, however, console port buffering is enabled, the value of the write pointer is incremented (step  304 ) and evaluated to determine if the value of the write pointer is within the predetermined range of memory addresses allocated for the ring buffer (step  305 ). If the write pointer is outside the range of memory addresses allocated for the ring buffer, the write pointer is set to the address of the first memory location of the ring buffer (step  306 ). If, in step  307 , it is determined that the write pointer and read pointer indicate the same address, the value of the read pointer is incremented (step  308 ). As with the write pointer, each time the read pointer is incremented, the value of the read pointer should be evaluated to ensure that the read pointer indicates a memory location within the predetermined range of memory addresses allocated for the ring buffer. In step  309 , the received data is written to the ring buffer at the memory location indicated by the write pointer.  
         [0025]      FIG. 4  is a flow diagram of a method for transferring data from the ring buffer to a non-volatile storage medium, such as non-volatile memory or a magnetic storage drive. The method may be initiated after power-up or a system or processor reset. In step  401 , console port buffering is disabled to prevent data in the buffer from being overwritten by system initialization messages. In step  402 , the processor determines whether a non-volatile storage medium is available, for example, by querying the BIOS or operating system or by attempting to access a predetermined memory address location. If storage media is available, the processor reads data from the buffer (step  403 ) and writes the data to the storage medium (step  404 ). The processor may read the buffered data into memory before writing the data to the storage medium or may perform the transfer using several read and write cycles. When the processor attempts to write data to the storage medium, the processor determines whether the write operation was successful (step  405 ). The determination may be made by checking the returned error state of an operating system function used to perform the write operation or the processor may read back and verify the data just written. Once all of the buffered data is written to the storage medium, the processor enables console port buffering (step  406 ). However, if storage media is not available (step  402 ) or if an attempt to write buffered data to the storage medium fails (step  405 ), the process terminates (step  407 ) and console port buffering remains disabled.  
         [0026]      FIG. 5  is a system level block diagram of an application card  500  deployed in a stand-alone configuration and connected to a terminal device  502 . Application card  500  may include buffered console port  100  and an application processor  504 . Buffered console port  502  may buffer data written by application processor  504  when application card  502  is not connected to terminal device  502 . As discussed above with respect to  FIGS. 1 and 2 , buffered console port  100  includes console port interface  102 , which provides serial data transport between a device connected to console port interface  102  and UART  104 . As such, in  FIG. 5 , buffered console port  100  may support a serial interface, such as EIA/TIA-232, compatible with terminal device  502 .  
         [0027]      FIG. 6  is a system level block diagram of an application card  500  deployed in a shelf assembly  600  and connected to a terminal device  502  via a shared midplane  602 , such as that described in greater detail in the commonly assigned, co-pending patent application noted above. Application card  500  may include buffered console port  100 . As discussed above with respect to  FIGS. 1 and 2 , buffered console port  100  includes console port interface  102 , which provides serial data transport between a device connected to console port interface  102  and UART  104 . As such, in  FIG. 6 , console port interface  102  may support a serial interface, such as EIA/TIA-422 or EIA/TIA-485, that is compatible with shared midplane  602 . A shelf management card  604  may provide selective connectivity between terminal device  502  and each application card  500  via shared midplane  602 . For example, shelf management card  604  may include a processor  606  that selectively connects each application card console port  100  to terminal device  502  via system level console port  608 . In one exemplary implementation, processor  606  may provide a connection menu for controlling connections between terminal device  502  and console ports  100 .  
         [0028]     Accordingly, the subject matter described herein provides a method and system for buffering data from a console port, thereby preserving the data for later inspection by a system manager or service technician.  
         [0029]     It will be understood that various details of the subject matter described herein may be changed without departing from the scope of the subject matter described herein. Furthermore, the foregoing description is for the purpose of illustration only, and not for the purpose of limitation, as the subject matter described herein is defined by the claims as set forth hereinafter.