VirtualBox

Changeset 44591 in vbox for trunk/include/VBox/vmm


Ignore:
Timestamp:
Feb 8, 2013 4:48:00 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
83669
Message:

DevEFI,Nvram.cpp: Cleaning up. (partly tested)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmnvram.h

    r43131 r44591  
    44
    55/*
    6  * Copyright (C) 2012 Oracle Corporation
     6 * Copyright (C) 2012-2013 Oracle Corporation
    77 *
    88 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    3737 */
    3838
    39 typedef struct PDMINVRAM *PPDMINVRAM;
     39/** Pointer to NVRAM interface provided by the driver. */
     40typedef struct PDMINVRAMCONNECTOR *PPDMINVRAMCONNECTOR;
    4041
    41 typedef struct PDMINVRAM
     42/**
     43 * Non-volatile RAM storage interface provided by the driver (up).
     44 *
     45 * @note    The variable indexes used here 0-based, sequential and without gaps.
     46 */
     47typedef struct PDMINVRAMCONNECTOR
    4248{
    4349    /**
    44      * This method flushes all values in the storage.
     50     * Query a variable by variable index.
     51     *
     52     * @returns VBox status code.
     53     * @retval  VERR_NOT_FOUND if the variable was not found. This indicates that
     54     *          there are not variables with a higher index.
     55     *
     56     * @param   idxVariable     The variable index. By starting @a idxVariable at 0
     57     *                          and increasing it with each call, this can be used
     58     *                          to enumerate all available variables.
     59     * @param   pVendorUuid     The vendor UUID of the variable.
     60     * @param   pszName         The variable name buffer.
     61     * @param   pcchName        On input this hold the name buffer size (including
     62     *                          the space for the terminator char).  On successful
     63     *                          return it holds the strlen() value for @a pszName.
     64     * @param   pfAttributes    Where to return the value attributes.
     65     * @param   pbValue         The value buffer.
     66     * @param   pcbValue        On input the size of the value buffer, on output the
     67     *                          actual number of bytes returned.
    4568     */
    46     DECLR3CALLBACKMEMBER(int, pfnFlushNvramStorage, (PPDMINVRAM pInterface));
     69    DECLR3CALLBACKMEMBER(int, pfnVarQueryByIndex,(PPDMINVRAMCONNECTOR pInterface, uint32_t idxVariable,
     70                                                  PRTUUID pVendorUuid, char *pszName, uint32_t *pcchName,
     71                                                  uint32_t *pfAttributes, uint8_t *pbValue, uint32_t *pcbValue));
    4772
    4873    /**
    49      *  This method store NVRAM variable to storage
     74     * Begins variable store sequence.
     75     *
     76     * @returns VBox status code.
     77     * @param   pInterance      Pointer to this interface structure.
     78     * @param   cVariables      The number of variables.
    5079     */
    51     DECLR3CALLBACKMEMBER(int, pfnStoreNvramValue, (PPDMINVRAM pInterface, int idxVariable, RTUUID *pVendorUuid, const char *pcszVariableName, size_t cbVariableName, uint8_t *pu8Value, size_t cbValue));
     80    DECLR3CALLBACKMEMBER(int, pfnVarStoreSeqBegin,(PPDMINVRAMCONNECTOR pInterface, uint32_t cVariables));
    5281
    5382    /**
    54      *  This method load NVRAM variable to storage
     83     * Puts the next variable in the store sequence.
     84     *
     85     * @returns VBox status code.
     86     * @param   idxVariable     The variable index. This will start at 0 and advance
     87     *                          up to @a cVariables - 1.
     88     * @param   pVendorUuid     The vendor UUID of the variable.
     89     * @param   pszName         The variable name buffer.
     90     * @param   pcchName        On input this hold the name buffer size (including
     91     *                          the space for the terminator char).  On successful
     92     *                          return it holds the strlen() value for @a pszName.
     93     * @param   fAttributes     The value attributes.
     94     * @param   pbValue         The value buffer.
     95     * @param   pcbValue        On input the size of the value buffer, on output the
     96     *                          actual number of bytes returned.
    5597     */
    56     DECLR3CALLBACKMEMBER(int, pfnLoadNvramValue, (PPDMINVRAM pInterface, int idxVariable, RTUUID *pVendorUuid, char *pcszVariableName, size_t *pcbVariableName, uint8_t *pu8Value, size_t *pcbValue));
     98    DECLR3CALLBACKMEMBER(int, pfnVarStoreSeqPut,(PPDMINVRAMCONNECTOR pInterface, int idxVariable,
     99                                                 PCRTUUID pVendorUuid, const char *pszName, size_t cchName,
     100                                                 uint32_t fAttributes, uint8_t const *pbValue, size_t cbValue));
    57101
    58 } PDMINVRAM;
     102    /**
     103     * Ends a variable store sequence.
     104     *
     105     * @returns VBox status code, @a rc on success.
     106     * @param   pInterance      Pointer to this interface structure.
     107     * @param   rc              The VBox status code for the whole store operation.
     108     */
     109    DECLR3CALLBACKMEMBER(int, pfnVarStoreSeqEnd,(PPDMINVRAMCONNECTOR pInterface, int rc));
    59110
    60 
    61 #define PDMINVRAM_IID                       "11226408-CB4C-4369-9218-1EE0092FB9F8"
     111} PDMINVRAMCONNECTOR;
     112/** PDMINVRAMCONNECTOR interface ID. */
     113#define PDMINVRAMCONNECTOR_IID                 "057bc5c9-8022-43a8-9a41-0b106f97a89f"
    62114
    63115/** @} */
     
    65117RT_C_DECLS_END
    66118
    67 
    68119#endif
    69120
    70 
Note: See TracChangeset for help on using the changeset viewer.

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