* Note: snprintf format specifier is:
* %[flags] [width] [.precision] [{h | l | I64 | L}]type
*/
-void uuid_uuid_to_string(IN struct dsp_uuid *uuid_obj, OUT char *pszUuid,
+void uuid_uuid_to_string(IN struct dsp_uuid *uuid_obj, OUT char *sz_uuid,
IN s32 size)
{
s32 i; /* return result from snprintf. */
- DBC_REQUIRE(uuid_obj && pszUuid);
+ DBC_REQUIRE(uuid_obj && sz_uuid);
- i = snprintf(pszUuid, size,
+ i = snprintf(sz_uuid, size,
"%.8X_%.4X_%.4X_%.2X%.2X_%.2X%.2X%.2X%.2X%.2X%.2X",
uuid_obj->ul_data1, uuid_obj->us_data2, uuid_obj->us_data3,
uuid_obj->uc_data4, uuid_obj->uc_data5,
* Purpose:
* Converts a string to a struct dsp_uuid.
*/
-void uuid_uuid_from_string(IN char *pszUuid, OUT struct dsp_uuid *uuid_obj)
+void uuid_uuid_from_string(IN char *sz_uuid, OUT struct dsp_uuid *uuid_obj)
{
s32 j;
- uuid_obj->ul_data1 = uuid_hex_to_bin(pszUuid, 8);
- pszUuid += 8;
+ uuid_obj->ul_data1 = uuid_hex_to_bin(sz_uuid, 8);
+ sz_uuid += 8;
/* Step over underscore */
- pszUuid++;
+ sz_uuid++;
- uuid_obj->us_data2 = (u16) uuid_hex_to_bin(pszUuid, 4);
- pszUuid += 4;
+ uuid_obj->us_data2 = (u16) uuid_hex_to_bin(sz_uuid, 4);
+ sz_uuid += 4;
/* Step over underscore */
- pszUuid++;
+ sz_uuid++;
- uuid_obj->us_data3 = (u16) uuid_hex_to_bin(pszUuid, 4);
- pszUuid += 4;
+ uuid_obj->us_data3 = (u16) uuid_hex_to_bin(sz_uuid, 4);
+ sz_uuid += 4;
/* Step over underscore */
- pszUuid++;
+ sz_uuid++;
- uuid_obj->uc_data4 = (u8) uuid_hex_to_bin(pszUuid, 2);
- pszUuid += 2;
+ uuid_obj->uc_data4 = (u8) uuid_hex_to_bin(sz_uuid, 2);
+ sz_uuid += 2;
- uuid_obj->uc_data5 = (u8) uuid_hex_to_bin(pszUuid, 2);
- pszUuid += 2;
+ uuid_obj->uc_data5 = (u8) uuid_hex_to_bin(sz_uuid, 2);
+ sz_uuid += 2;
/* Step over underscore */
- pszUuid++;
+ sz_uuid++;
for (j = 0; j < 6; j++) {
- uuid_obj->uc_data6[j] = (u8) uuid_hex_to_bin(pszUuid, 2);
- pszUuid += 2;
+ uuid_obj->uc_data6[j] = (u8) uuid_hex_to_bin(sz_uuid, 2);
+ sz_uuid += 2;
}
}
* Parameters:
* dev_node_obj: Handle to the dev_node who's driver we are querying.
* buf_size: Size of buffer.
- * pstrZLFileName: Ptr to character buf to hold ZLFileName.
+ * str_zl_file_name: Ptr to character buf to hold ZLFileName.
* Returns:
* 0: Success.
- * -EFAULT: pstrZLFileName is invalid or dev_node_obj is invalid.
+ * -EFAULT: str_zl_file_name is invalid or dev_node_obj is invalid.
* -ENODATA: couldn't find the ZLFileName.
* Requires:
* CFG initialized.
* Ensures:
* 0: Not more than buf_size bytes were copied into
- * pstrZLFileName, and *pstrZLFileName contains ZLFileName
+ * str_zl_file_name, and *str_zl_file_name contains ZLFileName
* for this devnode.
*/
extern int cfg_get_zl_file(IN struct cfg_devnode *dev_node_obj,
- IN u32 buf_size, OUT char *pstrZLFileName);
+ IN u32 buf_size, OUT char *str_zl_file_name);
/*
* ======== cfg_init ========
* using the cod_get_sym_value() function.
* Parameters:
* manager: created manager object
- * pstrZLFile: ZL DLL filename, of length < COD_MAXPATHLENGTH.
+ * str_zl_file: ZL DLL filename, of length < COD_MAXPATHLENGTH.
* attrs: attributes to be used by this object. A NULL value
* will cause default attrs to be used.
* Returns:
* non default values of attrs.
* Requires:
* COD module initialized.
- * pstrZLFile != NULL
+ * str_zl_file != NULL
* Ensures:
*/
extern int cod_create(OUT struct cod_manager **manager,
- char *pstrZLFile,
+ char *str_zl_file,
IN OPTIONAL CONST struct cod_attrs *attrs);
/*
* Get the name of the base image DBL library.
* Parameters:
* cod_mgr_obj: handle of manager to be deleted
- * pszName: location to store library name on output.
+ * sz_name: location to store library name on output.
* usize: size of name buffer.
* Returns:
* 0: Success.
* Requires:
* COD module initialized.
* valid cod_mgr_obj.
- * pszName != NULL.
+ * sz_name != NULL.
* Ensures:
*/
extern int cod_get_base_name(struct cod_manager *cod_mgr_obj,
- char *pszName, u32 usize);
+ char *sz_name, u32 usize);
/*
* ======== cod_get_entry ========
* given the section name.
* Parameters:
* lib Library handle returned from cod_open().
- * pstrSect: name of the section, with or without leading "."
- * puAddr: Location to store address.
+ * str_sect: name of the section, with or without leading "."
+ * addr: Location to store address.
* puLen: Location to store length.
* Returns:
* 0: Success
* Requires:
* COD module initialized.
* valid cod_mgr_obj.
- * pstrSect != NULL;
- * puAddr != NULL;
+ * str_sect != NULL;
+ * addr != NULL;
* puLen != NULL;
* Ensures:
- * 0: *puAddr and *puLen contain the address and length of the
+ * 0: *addr and *puLen contain the address and length of the
* section.
- * else: *puAddr == 0 and *puLen == 0;
+ * else: *addr == 0 and *puLen == 0;
*
*/
extern int cod_get_section(struct cod_libraryobj *lib,
- IN char *pstrSect,
- OUT u32 *puAddr, OUT u32 *puLen);
+ IN char *str_sect,
+ OUT u32 *addr, OUT u32 *puLen);
/*
* ======== cod_get_sym_value ========
* Requires:
* COD module initialized.
* Valid cod_mgr_obj.
- * pstrSym != NULL.
+ * str_sym != NULL.
* pul_value != NULL.
* Ensures:
*/
extern int cod_get_sym_value(struct cod_manager *cod_mgr_obj,
- IN char *pstrSym, OUT u32 * pul_value);
+ IN char *str_sym, OUT u32 * pul_value);
/*
* ======== cod_init ========
* Open a library for reading sections. Does not load or set the base.
* Parameters:
* hmgr: manager to load the code with
- * pszCoffPath: Coff file to open.
+ * sz_coff_path: Coff file to open.
* flags: COD_NOLOAD (don't load symbols) or COD_SYMB (load
* symbols).
* lib_obj: Handle returned that can be used in calls to cod_close
* COD module initialized.
* hmgr is valid.
* flags == COD_NOLOAD || flags == COD_SYMB.
- * pszCoffPath != NULL.
+ * sz_coff_path != NULL.
* Ensures:
*/
extern int cod_open(struct cod_manager *hmgr,
- IN char *pszCoffPath,
+ IN char *sz_coff_path,
u32 flags, OUT struct cod_libraryobj **lib_obj);
/*
* Open base image for reading sections. Does not load the base.
* Parameters:
* hmgr: manager to load the code with
- * pszCoffPath: Coff file to open.
+ * sz_coff_path: Coff file to open.
* flags: Specifies whether to load symbols.
* Returns:
* 0: Success.
* Requires:
* COD module initialized.
* hmgr is valid.
- * pszCoffPath != NULL.
+ * sz_coff_path != NULL.
* Ensures:
*/
-extern int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,
+extern int cod_open_base(struct cod_manager *hmgr, IN char *sz_coff_path,
dbll_flags flags);
/*
* Retrieve the content of a code section given the section name.
* Parameters:
* cod_mgr_obj - manager in which to search for the symbol
- * pstrSect - name of the section, with or without leading "."
+ * str_sect - name of the section, with or without leading "."
* str_content - buffer to store content of the section.
* Returns:
* 0: on success, error code on failure
* Requires:
* COD module initialized.
* valid cod_mgr_obj.
- * pstrSect != NULL;
+ * str_sect != NULL;
* str_content != NULL;
* Ensures:
* 0: *str_content stores the content of the named section.
*/
extern int cod_read_section(struct cod_libraryobj *lib,
- IN char *pstrSect,
+ IN char *str_sect,
OUT char *str_content, IN u32 content_size);
#endif /* COD_ */
* special COFF section called ".dcd_register"
* Parameters:
* hdcd_mgr: A DCD manager handle.
- * pszCoffPath: Pointer to name of COFF file containing DCD
+ * sz_coff_path: Pointer to name of COFF file containing DCD
* objects to be registered.
* Returns:
* 0: Success.
* ".dcd_register", which is used for auto registration.
*/
extern int dcd_auto_register(IN struct dcd_manager *hdcd_mgr,
- IN char *pszCoffPath);
+ IN char *sz_coff_path);
/*
* ======== dcd_auto_unregister ========
* special COFF section called ".dcd_register"
* Parameters:
* hdcd_mgr: A DCD manager handle.
- * pszCoffPath: Pointer to name of COFF file containing
+ * sz_coff_path: Pointer to name of COFF file containing
* DCD objects to be unregistered.
* Returns:
* 0: Success.
* ".dcd_register", which is used for auto unregistration.
*/
extern int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr,
- IN char *pszCoffPath);
+ IN char *sz_coff_path);
/*
* ======== dcd_create_manager ========
* Purpose:
* This function creates a DCD module manager.
* Parameters:
- * pszZlDllName: Pointer to a DLL name string.
+ * sz_zl_dll_name: Pointer to a DLL name string.
* dcd_mgr: A pointer to a DCD manager handle.
* Returns:
* 0: Success.
* -EPERM: General failure.
* Requires:
* DCD initialized.
- * pszZlDllName is non-NULL.
+ * sz_zl_dll_name is non-NULL.
* dcd_mgr is non-NULL.
* Ensures:
* A DCD manager handle is created.
*/
-extern int dcd_create_manager(IN char *pszZlDllName,
+extern int dcd_create_manager(IN char *sz_zl_dll_name,
OUT struct dcd_manager **dcd_mgr);
/*
* hdcd_mgr: A DCD manager handle.
* uuid_obj: Pointer to a dsp_uuid that represents a unique DSP/BIOS
* Bridge object.
- * pstrLibName: Buffer to hold library name.
+ * str_lib_name: Buffer to hold library name.
* buff_size: Contains buffer size. Set to string size on output.
* phase: Which phase to load
* phase_split: Are phases in multiple libraries
* Requires:
* DCD initialized.
* Valid hdcd_mgr.
- * pstrLibName != NULL.
+ * str_lib_name != NULL.
* uuid_obj != NULL
* buff_size != NULL.
* Ensures:
*/
extern int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
- IN OUT char *pstrLibName,
+ IN OUT char *str_lib_name,
IN OUT u32 *buff_size,
IN enum nldr_phase phase,
OUT bool *phase_split);
* unregister nodes from the node database, and 3) add overlay nodes.
* Parameters:
* hdcd_mgr: A DCD manager handle.
- * pszCoffPath: Pointer to name of COFF file containing DCD
+ * sz_coff_path: Pointer to name of COFF file containing DCD
* objects.
* registerFxn: Callback fxn to be applied on each located
* DCD object.
* ".dcd_register", which is used for auto registration.
*/
extern int dcd_get_objects(IN struct dcd_manager *hdcd_mgr,
- IN char *pszCoffPath,
+ IN char *sz_coff_path,
dcd_registerfxn registerFxn, void *handle);
/*
* Ensures:
*/
typedef int(*dbll_load_sect_fxn) (struct dbll_library_obj *lib,
- char *pszSectName,
+ char *sz_sect_name,
struct dbll_attrs *attrs);
/*
* Ensures:
*/
typedef int(*dbll_unload_sect_fxn) (struct dbll_library_obj *lib,
- char *pszSectName,
+ char *sz_sect_name,
struct dbll_attrs *attrs);
struct dbll_fxns {
* Parameters:
* hdev_obj: Handle to device object created with
* dev_create_device().
- * pstrSym: Name of symbol to look up.
+ * str_sym: Name of symbol to look up.
* pul_value: Ptr to symbol value.
* Returns:
* 0: Success.
* -ESPIPE: Symbols couldn not be found or have not been loaded onto
* the board.
* Requires:
- * pstrSym != NULL.
+ * str_sym != NULL.
* pul_value != NULL.
* DEV Initialized.
* Ensures:
* 0: *pul_value contains the symbol value;
*/
extern int dev_get_symbol(struct dev_object *hdev_obj,
- IN CONST char *pstrSym, OUT u32 * pul_value);
+ IN CONST char *str_sym, OUT u32 * pul_value);
/*
* ======== dev_get_bridge_context ========
extern void nldr_exit(void);
extern int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
- char *pstrFxn, u32 * pulAddr);
+ char *str_fxn, u32 * addr);
extern int nldr_get_rmm_manager(struct nldr_object *nldr,
OUT struct rmm_target_obj **rmm_mgr);
*
* Parameters:
* nldr_node_obj: Handle returned from nldr_allocate().
- * pstrFxn: Name of function.
- * pulAddr: Location to store function address.
+ * str_fxn: Name of function.
+ * addr: Location to store function address.
* Returns:
* 0: Success.
* -ESPIPE: Address of function not found.
* Requires:
* nldr_init(void) called.
* Valid nldr_node_obj.
- * pulAddr != NULL;
- * pstrFxn != NULL;
+ * addr != NULL;
+ * str_fxn != NULL;
* Ensures:
*/
typedef int(*nldr_getfxnaddrfxn) (struct nldr_nodeobject
* nldr_node_obj,
- char *pstrFxn, u32 * pulAddr);
+ char *str_fxn, u32 * addr);
/*
* ======== nldr_init ========
* Parameters:
* stream_obj: Stream handle returned from strm_open().
* buf_ptr: Location to store pointer to reclaimed buffer.
- * pulBytes: Location where number of bytes of data in the
+ * nbytes: Location where number of bytes of data in the
* buffer will be written.
- * pulBufSize: Location where actual buffer size will be written.
+ * buff_size: Location where actual buffer size will be written.
* pdw_arg: Location where user argument that travels with
* the buffer will be written.
* Returns:
* Requires:
* strm_init(void) called.
* buf_ptr != NULL.
- * pulBytes != NULL.
+ * nbytes != NULL.
* pdw_arg != NULL.
* Ensures:
*/
extern int strm_reclaim(struct strm_object *stream_obj,
- OUT u8 **buf_ptr, u32 * pulBytes,
- u32 *pulBufSize, u32 *pdw_arg);
+ OUT u8 **buf_ptr, u32 * nbytes,
+ u32 *buff_size, u32 *pdw_arg);
/*
* ======== strm_register_notify ========
* Converts a dsp_uuid to an ANSI string.
* Parameters:
* uuid_obj: Pointer to a dsp_uuid object.
- * pszUuid: Pointer to a buffer to receive a NULL-terminated UUID
+ * sz_uuid: Pointer to a buffer to receive a NULL-terminated UUID
* string.
- * size: Maximum size of the pszUuid string.
+ * size: Maximum size of the sz_uuid string.
* Returns:
* Requires:
- * uuid_obj & pszUuid are non-NULL values.
+ * uuid_obj & sz_uuid are non-NULL values.
* Ensures:
- * Lenghth of pszUuid is less than MAXUUIDLEN.
+ * Lenghth of sz_uuid is less than MAXUUIDLEN.
* Details:
* UUID string limit currently set at MAXUUIDLEN.
*/
-void uuid_uuid_to_string(IN struct dsp_uuid *uuid_obj, OUT char *pszUuid,
+void uuid_uuid_to_string(IN struct dsp_uuid *uuid_obj, OUT char *sz_uuid,
s32 size);
/*
* Purpose:
* Converts an ANSI string to a dsp_uuid.
* Parameters:
- * pszUuid: Pointer to a string that represents a dsp_uuid object.
+ * sz_uuid: Pointer to a string that represents a dsp_uuid object.
* uuid_obj: Pointer to a dsp_uuid object.
* Returns:
* Requires:
- * uuid_obj & pszUuid are non-NULL values.
+ * uuid_obj & sz_uuid are non-NULL values.
* Ensures:
* Details:
* We assume the string representation of a UUID has the following format:
* "12345678_1234_1234_1234_123456789abc".
*/
-extern void uuid_uuid_from_string(IN char *pszUuid,
+extern void uuid_uuid_from_string(IN char *sz_uuid,
OUT struct dsp_uuid *uuid_obj);
#endif /* UUIDUTIL_ */
return 0;
}
-static struct file *cod_f_open(CONST char *psz_file_name, CONST char *pszMode)
+static struct file *cod_f_open(CONST char *psz_file_name, CONST char *sz_mode)
{
mm_segment_t fs;
struct file *filp;
/*
* ======== cod_get_base_name ========
*/
-int cod_get_base_name(struct cod_manager *cod_mgr_obj, char *pszName,
+int cod_get_base_name(struct cod_manager *cod_mgr_obj, char *sz_name,
u32 usize)
{
int status = 0;
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(IS_VALID(cod_mgr_obj));
- DBC_REQUIRE(pszName != NULL);
+ DBC_REQUIRE(sz_name != NULL);
if (usize <= COD_MAXPATHLENGTH)
- strncpy(pszName, cod_mgr_obj->sz_zl_file, usize);
+ strncpy(sz_name, cod_mgr_obj->sz_zl_file, usize);
else
status = -EPERM;
* Retrieve the starting address and length of a section in the COFF file
* given the section name.
*/
-int cod_get_section(struct cod_libraryobj *lib, IN char *pstrSect,
- OUT u32 *puAddr, OUT u32 *puLen)
+int cod_get_section(struct cod_libraryobj *lib, IN char *str_sect,
+ OUT u32 *addr, OUT u32 *puLen)
{
struct cod_manager *cod_mgr_obj;
int status = 0;
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(lib != NULL);
DBC_REQUIRE(IS_VALID(lib->cod_mgr));
- DBC_REQUIRE(pstrSect != NULL);
- DBC_REQUIRE(puAddr != NULL);
+ DBC_REQUIRE(str_sect != NULL);
+ DBC_REQUIRE(addr != NULL);
DBC_REQUIRE(puLen != NULL);
- *puAddr = 0;
+ *addr = 0;
*puLen = 0;
if (lib != NULL) {
cod_mgr_obj = lib->cod_mgr;
- status = cod_mgr_obj->fxns.get_sect_fxn(lib->dbll_lib, pstrSect,
- puAddr, puLen);
+ status = cod_mgr_obj->fxns.get_sect_fxn(lib->dbll_lib, str_sect,
+ addr, puLen);
} else {
status = -ESPIPE;
}
- DBC_ENSURE(DSP_SUCCEEDED(status) || ((*puAddr == 0) && (*puLen == 0)));
+ DBC_ENSURE(DSP_SUCCEEDED(status) || ((*addr == 0) && (*puLen == 0)));
return status;
}
* C symbol.
*
*/
-int cod_get_sym_value(struct cod_manager *hmgr, char *pstrSym,
+int cod_get_sym_value(struct cod_manager *hmgr, char *str_sym,
u32 *pul_value)
{
struct dbll_sym_val *dbll_sym;
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(IS_VALID(hmgr));
- DBC_REQUIRE(pstrSym != NULL);
+ DBC_REQUIRE(str_sym != NULL);
DBC_REQUIRE(pul_value != NULL);
- dev_dbg(bridge, "%s: hmgr: %p pstrSym: %s pul_value: %p\n",
- __func__, hmgr, pstrSym, pul_value);
+ dev_dbg(bridge, "%s: hmgr: %p str_sym: %s pul_value: %p\n",
+ __func__, hmgr, str_sym, pul_value);
if (hmgr->base_lib) {
if (!hmgr->fxns.
- get_addr_fxn(hmgr->base_lib, pstrSym, &dbll_sym)) {
+ get_addr_fxn(hmgr->base_lib, str_sym, &dbll_sym)) {
if (!hmgr->fxns.
- get_c_addr_fxn(hmgr->base_lib, pstrSym, &dbll_sym))
+ get_c_addr_fxn(hmgr->base_lib, str_sym, &dbll_sym))
return -ESPIPE;
}
} else {
* ======== cod_open ========
* Open library for reading sections.
*/
-int cod_open(struct cod_manager *hmgr, IN char *pszCoffPath,
+int cod_open(struct cod_manager *hmgr, IN char *sz_coff_path,
u32 flags, struct cod_libraryobj **lib_obj)
{
int status = 0;
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(IS_VALID(hmgr));
- DBC_REQUIRE(pszCoffPath != NULL);
+ DBC_REQUIRE(sz_coff_path != NULL);
DBC_REQUIRE(flags == COD_NOLOAD || flags == COD_SYMB);
DBC_REQUIRE(lib_obj != NULL);
if (DSP_SUCCEEDED(status)) {
lib->cod_mgr = hmgr;
- status = hmgr->fxns.open_fxn(hmgr->target, pszCoffPath, flags,
+ status = hmgr->fxns.open_fxn(hmgr->target, sz_coff_path, flags,
&lib->dbll_lib);
if (DSP_SUCCEEDED(status))
*lib_obj = lib;
}
if (DSP_FAILED(status))
- pr_err("%s: error status 0x%x, pszCoffPath: %s flags: 0x%x\n",
- __func__, status, pszCoffPath, flags);
+ pr_err("%s: error status 0x%x, sz_coff_path: %s flags: 0x%x\n",
+ __func__, status, sz_coff_path, flags);
return status;
}
* Purpose:
* Open base image for reading sections.
*/
-int cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,
+int cod_open_base(struct cod_manager *hmgr, IN char *sz_coff_path,
dbll_flags flags)
{
int status = 0;
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(IS_VALID(hmgr));
- DBC_REQUIRE(pszCoffPath != NULL);
+ DBC_REQUIRE(sz_coff_path != NULL);
/* if we previously opened a base image, close it now */
if (hmgr->base_lib) {
hmgr->fxns.close_fxn(hmgr->base_lib);
hmgr->base_lib = NULL;
}
- status = hmgr->fxns.open_fxn(hmgr->target, pszCoffPath, flags, &lib);
+ status = hmgr->fxns.open_fxn(hmgr->target, sz_coff_path, flags, &lib);
if (DSP_SUCCEEDED(status)) {
/* hang onto the library for subsequent sym table usage */
hmgr->base_lib = lib;
- strncpy(hmgr->sz_zl_file, pszCoffPath, COD_MAXPATHLENGTH - 1);
+ strncpy(hmgr->sz_zl_file, sz_coff_path, COD_MAXPATHLENGTH - 1);
hmgr->sz_zl_file[COD_MAXPATHLENGTH - 1] = '\0';
}
if (DSP_FAILED(status))
- pr_err("%s: error status 0x%x pszCoffPath: %s\n", __func__,
- status, pszCoffPath);
+ pr_err("%s: error status 0x%x sz_coff_path: %s\n", __func__,
+ status, sz_coff_path);
return status;
}
* Purpose:
* Retrieve the content of a code section given the section name.
*/
-int cod_read_section(struct cod_libraryobj *lib, IN char *pstrSect,
+int cod_read_section(struct cod_libraryobj *lib, IN char *str_sect,
OUT char *str_content, IN u32 content_size)
{
int status = 0;
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(lib != NULL);
DBC_REQUIRE(IS_VALID(lib->cod_mgr));
- DBC_REQUIRE(pstrSect != NULL);
+ DBC_REQUIRE(str_sect != NULL);
DBC_REQUIRE(str_content != NULL);
if (lib != NULL)
status =
- lib->cod_mgr->fxns.read_sect_fxn(lib->dbll_lib, pstrSect,
+ lib->cod_mgr->fxns.read_sect_fxn(lib->dbll_lib, str_sect,
str_content, content_size);
else
status = -ESPIPE;
* ======== dev_get_symbol ========
*/
int dev_get_symbol(struct dev_object *hdev_obj,
- IN CONST char *pstrSym, OUT u32 * pul_value)
+ IN CONST char *str_sym, OUT u32 * pul_value)
{
int status = 0;
struct cod_manager *cod_mgr;
DBC_REQUIRE(refs > 0);
- DBC_REQUIRE(pstrSym != NULL && pul_value != NULL);
+ DBC_REQUIRE(str_sym != NULL && pul_value != NULL);
if (hdev_obj) {
status = dev_get_cod_mgr(hdev_obj, &cod_mgr);
if (cod_mgr)
- status = cod_get_sym_value(cod_mgr, (char *)pstrSym,
+ status = cod_get_sym_value(cod_mgr, (char *)str_sym,
pul_value);
else
status = -EFAULT;
* Parses the supplied image and resigsters with DCD.
*/
int dcd_auto_register(IN struct dcd_manager *hdcd_mgr,
- IN char *pszCoffPath)
+ IN char *sz_coff_path)
{
int status = 0;
DBC_REQUIRE(refs > 0);
if (hdcd_mgr)
- status = dcd_get_objects(hdcd_mgr, pszCoffPath,
+ status = dcd_get_objects(hdcd_mgr, sz_coff_path,
(dcd_registerfxn) dcd_register_object,
- (void *)pszCoffPath);
+ (void *)sz_coff_path);
else
status = -EFAULT;
* Parses the supplied DSP image and unresiters from DCD.
*/
int dcd_auto_unregister(IN struct dcd_manager *hdcd_mgr,
- IN char *pszCoffPath)
+ IN char *sz_coff_path)
{
int status = 0;
DBC_REQUIRE(refs > 0);
if (hdcd_mgr)
- status = dcd_get_objects(hdcd_mgr, pszCoffPath,
+ status = dcd_get_objects(hdcd_mgr, sz_coff_path,
(dcd_registerfxn) dcd_register_object,
NULL);
else
* Purpose:
* Creates DCD manager.
*/
-int dcd_create_manager(IN char *pszZlDllName,
+int dcd_create_manager(IN char *sz_zl_dll_name,
OUT struct dcd_manager **dcd_mgr)
{
struct cod_manager *cod_mgr; /* COD manager handle */
DBC_REQUIRE(refs >= 0);
DBC_REQUIRE(dcd_mgr);
- status = cod_create(&cod_mgr, pszZlDllName, NULL);
+ status = cod_create(&cod_mgr, sz_zl_dll_name, NULL);
if (DSP_FAILED(status))
goto func_end;
* ======== dcd_get_objects ========
*/
int dcd_get_objects(IN struct dcd_manager *hdcd_mgr,
- IN char *pszCoffPath, dcd_registerfxn registerFxn,
+ IN char *sz_coff_path, dcd_registerfxn registerFxn,
void *handle)
{
struct dcd_manager *dcd_mgr_obj = hdcd_mgr;
}
/* Open DSP coff file, don't load symbols. */
- status = cod_open(dcd_mgr_obj->cod_mgr, pszCoffPath, COD_NOLOAD, &lib);
+ status = cod_open(dcd_mgr_obj->cod_mgr, sz_coff_path, COD_NOLOAD, &lib);
if (DSP_FAILED(status)) {
status = -EACCES;
goto func_cont;
/* Allocate zeroed buffer. */
psz_coff_buf = kzalloc(ul_len + 4, GFP_KERNEL);
#ifdef _DB_TIOMAP
- if (strstr(pszCoffPath, "iva") == NULL) {
+ if (strstr(sz_coff_path, "iva") == NULL) {
/* Locate section by objectID and read its content. */
status = cod_read_section(lib, DCD_REGISTER_SECTION,
psz_coff_buf, ul_len);
#endif
if (DSP_SUCCEEDED(status)) {
/* Compress DSP buffer to conform to PC format. */
- if (strstr(pszCoffPath, "iva") == NULL) {
+ if (strstr(sz_coff_path, "iva") == NULL) {
compress_buf(psz_coff_buf, ul_len, DSPWORDSIZE);
} else {
compress_buf(psz_coff_buf, ul_len, 1);
*/
int dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,
IN struct dsp_uuid *uuid_obj,
- IN OUT char *pstrLibName,
+ IN OUT char *str_lib_name,
IN OUT u32 *buff_size,
enum nldr_phase phase, OUT bool *phase_split)
{
struct dcd_key_elem *dcd_key = NULL;
DBC_REQUIRE(uuid_obj != NULL);
- DBC_REQUIRE(pstrLibName != NULL);
+ DBC_REQUIRE(str_lib_name != NULL);
DBC_REQUIRE(buff_size != NULL);
DBC_REQUIRE(hdcd_mgr);
- dev_dbg(bridge, "%s: hdcd_mgr %p, uuid_obj %p, pstrLibName %p,"
- " buff_size %p\n", __func__, hdcd_mgr, uuid_obj, pstrLibName,
+ dev_dbg(bridge, "%s: hdcd_mgr %p, uuid_obj %p, str_lib_name %p,"
+ " buff_size %p\n", __func__, hdcd_mgr, uuid_obj, str_lib_name,
buff_size);
/*
}
if (DSP_SUCCEEDED(status))
- memcpy(pstrLibName, dcd_key->path, strlen(dcd_key->path) + 1);
+ memcpy(str_lib_name, dcd_key->path, strlen(dcd_key->path) + 1);
return status;
}
* ======== nldr_get_fxn_addr ========
*/
int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
- char *pstrFxn, u32 * pulAddr)
+ char *str_fxn, u32 * addr)
{
struct dbll_sym_val *dbll_sym;
struct nldr_object *nldr_obj;
struct lib_node root = { NULL, 0, NULL };
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(nldr_node_obj);
- DBC_REQUIRE(pulAddr != NULL);
- DBC_REQUIRE(pstrFxn != NULL);
+ DBC_REQUIRE(addr != NULL);
+ DBC_REQUIRE(str_fxn != NULL);
nldr_obj = nldr_node_obj->nldr_obj;
/* Called from node_create(), node_delete(), or node_run(). */
root = nldr_node_obj->root;
}
status1 =
- nldr_obj->ldr_fxns.get_c_addr_fxn(root.lib, pstrFxn, &dbll_sym);
+ nldr_obj->ldr_fxns.get_c_addr_fxn(root.lib, str_fxn, &dbll_sym);
if (!status1)
status1 =
- nldr_obj->ldr_fxns.get_addr_fxn(root.lib, pstrFxn,
+ nldr_obj->ldr_fxns.get_addr_fxn(root.lib, str_fxn,
&dbll_sym);
/* If symbol not found, check dependent libraries */
for (i = 0; i < root.dep_libs; i++) {
status1 =
nldr_obj->ldr_fxns.get_addr_fxn(root.dep_libs_tree
- [i].lib, pstrFxn,
+ [i].lib, str_fxn,
&dbll_sym);
if (!status1) {
status1 =
nldr_obj->ldr_fxns.
get_c_addr_fxn(root.dep_libs_tree[i].lib,
- pstrFxn, &dbll_sym);
+ str_fxn, &dbll_sym);
}
if (status1) {
/* Symbol found */
status1 =
nldr_obj->ldr_fxns.
get_addr_fxn(nldr_node_obj->pers_lib_table[i].lib,
- pstrFxn, &dbll_sym);
+ str_fxn, &dbll_sym);
if (!status1) {
status1 =
nldr_obj->ldr_fxns.
get_c_addr_fxn(nldr_node_obj->pers_lib_table
- [i].lib, pstrFxn, &dbll_sym);
+ [i].lib, str_fxn, &dbll_sym);
}
if (status1) {
/* Symbol found */
}
if (status1)
- *pulAddr = dbll_sym->value;
+ *addr = dbll_sym->value;
else
status = -ESPIPE;
* Relcaims a buffer from a stream.
*/
int strm_reclaim(struct strm_object *stream_obj, OUT u8 ** buf_ptr,
- u32 *pulBytes, u32 *pulBufSize, u32 *pdw_arg)
+ u32 *nbytes, u32 *buff_size, u32 *pdw_arg)
{
struct bridge_drv_interface *intf_fxns;
struct chnl_ioc chnl_ioc_obj;
DBC_REQUIRE(refs > 0);
DBC_REQUIRE(buf_ptr != NULL);
- DBC_REQUIRE(pulBytes != NULL);
+ DBC_REQUIRE(nbytes != NULL);
DBC_REQUIRE(pdw_arg != NULL);
if (!stream_obj) {
stream_obj->utimeout,
&chnl_ioc_obj);
if (DSP_SUCCEEDED(status)) {
- *pulBytes = chnl_ioc_obj.byte_size;
- if (pulBufSize)
- *pulBufSize = chnl_ioc_obj.buf_size;
+ *nbytes = chnl_ioc_obj.byte_size;
+ if (buff_size)
+ *buff_size = chnl_ioc_obj.buf_size;
*pdw_arg = chnl_ioc_obj.dw_arg;
if (!CHNL_IS_IO_COMPLETE(chnl_ioc_obj)) {
status == -ETIME || status == -ESRCH ||
status == -EPERM);
- dev_dbg(bridge, "%s: stream_obj: %p buf_ptr: %p pulBytes: %p "
+ dev_dbg(bridge, "%s: stream_obj: %p buf_ptr: %p nbytes: %p "
"pdw_arg: %p status 0x%x\n", __func__, stream_obj,
- buf_ptr, pulBytes, pdw_arg, status);
+ buf_ptr, nbytes, pdw_arg, status);
return status;
}