VirtualBox

Ignore:
Timestamp:
Jul 20, 2018 10:14:05 AM (6 years ago)
Author:
vboxsync
Message:

Devices/Serial: Saved state handling for the UART core and the legacy serial device (no saved states for the OXPCIe958 device yet)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Serial/UartCore.h

    r73243 r73259  
    2323#include <VBox/vmm/pdmdev.h>
    2424#include <VBox/vmm/pdmserialifs.h>
     25#include <VBox/vmm/ssm.h>
    2526#include <iprt/assert.h>
    2627
     
    3031*   Defined Constants And Macros                                                                                                 *
    3132*********************************************************************************************************************************/
     33
     34/** The current serial code saved state version. */
     35#define UART_SAVED_STATE_VERSION              6
     36/** Saved state version of the legacy code which got replaced after 5.2. */
     37#define UART_SAVED_STATE_VERSION_LEGACY_CODE  5
     38/** Includes some missing bits from the previous saved state. */
     39#define UART_SAVED_STATE_VERSION_MISSING_BITS 4
     40/** Saved state version when only the 16450 variant was implemented. */
     41#define UART_SAVED_STATE_VERSION_16450        3
    3242
    3343/** Maximum size of a FIFO. */
     
    278288DECLHIDDEN(void) uartR3Relocate(PUARTCORE pThis, RTGCINTPTR offDelta);
    279289
     290/**
     291 * Saves the UART state to the given SSM handle.
     292 *
     293 * @returns VBox status code.
     294 * @param   pThis               The UART core instance.
     295 * @param   pSSM                The SSM handle to save to.
     296 */
     297DECLHIDDEN(int) uartR3SaveExec(PUARTCORE pThis, PSSMHANDLE pSSM);
     298
     299/**
     300 * Loads the UART state from the given SSM handle.
     301 *
     302 * @returns VBox status code.
     303 * @param   pThis               The UART core instance.
     304 * @param   pSSM                The SSM handle to load from.
     305 * @param   uVersion            Saved state version.
     306 * @param   uPass               The SSM pass the call is done in.
     307 * @param   puIrq               Where to store the IRQ value for legacy
     308 *                              saved states - optional.
     309 * @param   pPortBase           Where to store the I/O port base for legacy
     310 *                              saved states - optional.
     311 */
     312DECLHIDDEN(int) uartR3LoadExec(PUARTCORE pThis, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass,
     313                               uint8_t *puIrq, RTIOPORT *pPortBase);
     314
     315/**
     316 * Called when loading the state completed, updates the parameters of any driver underneath.
     317 *
     318 * @returns VBox status code.
     319 * @param   pThis               The UART core instance.
     320 * @param   pSSM                The SSM handle.
     321 */
     322DECLHIDDEN(int) uartR3LoadDone(PUARTCORE pThis, PSSMHANDLE pSSM);
     323
    280324# endif
    281325
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette