本文整理汇总了C++中convert_to_wide函数的典型用法代码示例。如果您正苦于以下问题:C++ convert_to_wide函数的具体用法?C++ convert_to_wide怎么用?C++ convert_to_wide使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了convert_to_wide函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: set_firmware_width_unlocked
void __cpuinit set_firmware_width_unlocked(void)
{
int ret;
ret = mem_pdc_call(PDC_MODEL, PDC_MODEL_CAPABILITIES,
__pa(pdc_result), 0);
convert_to_wide(pdc_result);
if (pdc_result[0] != NARROW_FIRMWARE)
parisc_narrow_firmware = 0;
}
开发者ID:emreharbutoglu,项目名称:Xperia-X10-Kernel-2.6.29,代码行数:10,代码来源:firmware.c
示例2: pdc_model_info
/**
* pdc_model_info - Return model information about the processor.
* @model: The return buffer.
*
* Returns the version numbers, identifiers, and capabilities from the processor module.
*/
int pdc_model_info(struct pdc_model *model)
{
int retval;
spin_lock_irq(&pdc_lock);
retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_INFO, __pa(pdc_result), 0);
convert_to_wide(pdc_result);
memcpy(model, pdc_result, sizeof(*model));
spin_unlock_irq(&pdc_lock);
return retval;
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:18,代码来源:firmware.c
示例3: pdc_cache_info
/**
* pdc_cache_info - Return cache and TLB information.
* @cache_info: The return buffer.
*
* Returns information about the processor's cache and TLB.
*/
int pdc_cache_info(struct pdc_cache_info *cache_info)
{
int retval;
spin_lock_irq(&pdc_lock);
retval = mem_pdc_call(PDC_CACHE, PDC_CACHE_INFO, __pa(pdc_result), 0);
convert_to_wide(pdc_result);
memcpy(cache_info, pdc_result, sizeof(*cache_info));
spin_unlock_irq(&pdc_lock);
return retval;
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:18,代码来源:firmware.c
示例4: pdc_tod_read
/**
* pdc_tod_read - Read the Time-Of-Day clock.
* @tod: The return buffer:
*
* Read the Time-Of-Day clock
*/
int pdc_tod_read(struct pdc_tod *tod)
{
int retval;
spin_lock_irq(&pdc_lock);
retval = mem_pdc_call(PDC_TOD, PDC_TOD_READ, __pa(pdc_result), 0);
convert_to_wide(pdc_result);
memcpy(tod, pdc_result, sizeof(*tod));
spin_unlock_irq(&pdc_lock);
return retval;
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:18,代码来源:firmware.c
示例5: pdc_model_versions
/**
* pdc_model_versions - Identify the version number of each processor.
* @cpu_id: The return buffer.
* @id: The id of the processor to check.
*
* Returns the version number for each processor component.
*
* This comment was here before, but I do not know what it means :( -RB
* id: 0 = cpu revision, 1 = boot-rom-version
*/
int pdc_model_versions(unsigned long *versions, int id)
{
int retval;
spin_lock_irq(&pdc_lock);
retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_VERSIONS, __pa(pdc_result), id);
convert_to_wide(pdc_result);
*versions = pdc_result[0];
spin_unlock_irq(&pdc_lock);
return retval;
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:22,代码来源:firmware.c
示例6: pdc_stable_write
/**
* pdc_stable_write - Write data to Stable Storage.
* @staddr: Stable Storage address to access.
* @memaddr: The memory address where Stable Storage data shall be read from.
* @count: number of bytes to transfert. count is multiple of 4.
*
* This PDC call reads count bytes from the supplied memaddr address,
* and copies count bytes to the Stable Storage address staddr.
* The call will fail if staddr+count > PDC_STABLE size.
*/
int pdc_stable_write(unsigned long staddr, void *memaddr, unsigned long count)
{
int retval;
spin_lock_irq(&pdc_lock);
memcpy(pdc_result, memaddr, count);
convert_to_wide(pdc_result);
retval = mem_pdc_call(PDC_STABLE, PDC_STABLE_WRITE, staddr,
__pa(pdc_result), count);
spin_unlock_irq(&pdc_lock);
return retval;
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:23,代码来源:firmware.c
示例7: pdc_tod_read
/**
* pdc_tod_read - Read the Time-Of-Day clock.
* @tod: The return buffer:
*
* Read the Time-Of-Day clock
*/
int pdc_tod_read(struct pdc_tod *tod)
{
int retval;
unsigned long flags;
spin_lock_irqsave(&pdc_lock, flags);
retval = mem_pdc_call(PDC_TOD, PDC_TOD_READ, __pa(pdc_result), 0);
convert_to_wide(pdc_result);
memcpy(tod, pdc_result, sizeof(*tod));
spin_unlock_irqrestore(&pdc_lock, flags);
return retval;
}
开发者ID:emreharbutoglu,项目名称:Xperia-X10-Kernel-2.6.29,代码行数:19,代码来源:firmware.c
示例8: pdc_coproc_cfg_unlocked
int __cpuinit pdc_coproc_cfg_unlocked(struct pdc_coproc_cfg *pdc_coproc_info)
{
int ret;
ret = mem_pdc_call(PDC_COPROC, PDC_COPROC_CFG, __pa(pdc_result));
convert_to_wide(pdc_result);
pdc_coproc_info->ccr_functional = pdc_result[0];
pdc_coproc_info->ccr_present = pdc_result[1];
pdc_coproc_info->revision = pdc_result[17];
pdc_coproc_info->model = pdc_result[18];
return ret;
}
开发者ID:emreharbutoglu,项目名称:Xperia-X10-Kernel-2.6.29,代码行数:13,代码来源:firmware.c
示例9: pdc_model_info
/**
* pdc_model_info - Return model information about the processor.
* @model: The return buffer.
*
* Returns the version numbers, identifiers, and capabilities from the processor module.
*/
int pdc_model_info(struct pdc_model *model)
{
int retval;
unsigned long flags;
spin_lock_irqsave(&pdc_lock, flags);
retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_INFO, __pa(pdc_result), 0);
convert_to_wide(pdc_result);
memcpy(model, pdc_result, sizeof(*model));
spin_unlock_irqrestore(&pdc_lock, flags);
return retval;
}
开发者ID:emreharbutoglu,项目名称:Xperia-X10-Kernel-2.6.29,代码行数:19,代码来源:firmware.c
示例10: pdc_pci_irt_size
/**
* pdc_pci_irt_size - Get the number of entries in the interrupt routing table.
* @num_entries: The return value.
* @hpa: The HPA for the device.
*
* This PDC function returns the number of entries in the specified cell's
* interrupt table.
* Similar to PDC_PAT stuff - but added for Forte/Allegro boxes
*/
int pdc_pci_irt_size(unsigned long *num_entries, unsigned long hpa)
{
int retval;
spin_lock_irq(&pdc_lock);
retval = mem_pdc_call(PDC_PCI_INDEX, PDC_PCI_GET_INT_TBL_SIZE,
__pa(pdc_result), hpa);
convert_to_wide(pdc_result);
*num_entries = pdc_result[0];
spin_unlock_irq(&pdc_lock);
return retval;
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:22,代码来源:firmware.c
示例11: pdc_spaceid_bits
/**
* pdc_spaceid_bits - Return whether Space ID hashing is turned on.
* @space_bits: Should be 0, if not, bad mojo!
*
* Returns information about Space ID hashing.
*/
int pdc_spaceid_bits(unsigned long *space_bits)
{
int retval;
spin_lock_irq(&pdc_lock);
pdc_result[0] = 0;
retval = mem_pdc_call(PDC_CACHE, PDC_CACHE_RET_SPID, __pa(pdc_result), 0);
convert_to_wide(pdc_result);
*space_bits = pdc_result[0];
spin_unlock_irq(&pdc_lock);
return retval;
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:19,代码来源:firmware.c
示例12: pdc_cache_info
/**
* pdc_cache_info - Return cache and TLB information.
* @cache_info: The return buffer.
*
* Returns information about the processor's cache and TLB.
*/
int pdc_cache_info(struct pdc_cache_info *cache_info)
{
int retval;
unsigned long flags;
spin_lock_irqsave(&pdc_lock, flags);
retval = mem_pdc_call(PDC_CACHE, PDC_CACHE_INFO, __pa(pdc_result), 0);
convert_to_wide(pdc_result);
memcpy(cache_info, pdc_result, sizeof(*cache_info));
spin_unlock_irqrestore(&pdc_lock, flags);
return retval;
}
开发者ID:emreharbutoglu,项目名称:Xperia-X10-Kernel-2.6.29,代码行数:19,代码来源:firmware.c
示例13: pdc_model_capabilities
/**
* pdc_model_capabilities - Returns the platform capabilities.
* @capabilities: The return buffer.
*
* Returns information about platform support for 32- and/or 64-bit
* OSes, IO-PDIR coherency, and virtual aliasing.
*/
int pdc_model_capabilities(unsigned long *capabilities)
{
int retval;
spin_lock_irq(&pdc_lock);
pdc_result[0] = 0; /* preset zero (call may not be implemented!) */
retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_CAPABILITIES, __pa(pdc_result), 0);
convert_to_wide(pdc_result);
*capabilities = pdc_result[0];
spin_unlock_irq(&pdc_lock);
return retval;
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:20,代码来源:firmware.c
示例14: pdc_model_cpuid
/**
* pdc_model_cpuid - Returns the CPU_ID.
* @cpu_id: The return buffer.
*
* Returns the CPU_ID value which uniquely identifies the cpu portion of
* the processor module.
*/
int pdc_model_cpuid(unsigned long *cpu_id)
{
int retval;
spin_lock_irq(&pdc_lock);
pdc_result[0] = 0; /* preset zero (call may not be implemented!) */
retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_CPU_ID, __pa(pdc_result), 0);
convert_to_wide(pdc_result);
*cpu_id = pdc_result[0];
spin_unlock_irq(&pdc_lock);
return retval;
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:20,代码来源:firmware.c
示例15: set_firmware_width
/**
* set_firmware_width - Determine if the firmware is wide or narrow.
*
* This function must be called before any pdc_* function that uses the convert_to_wide
* function.
*/
void __init set_firmware_width(void)
{
#ifdef __LP64__
int retval;
spin_lock_irq(&pdc_lock);
retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_CAPABILITIES, __pa(pdc_result), 0);
convert_to_wide(pdc_result);
if(pdc_result[0] != NARROW_FIRMWARE)
parisc_narrow_firmware = 0;
spin_unlock_irq(&pdc_lock);
#endif
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:19,代码来源:firmware.c
示例16: pdc_mem_mem_table
int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr,
struct pdc_memory_table *tbl, unsigned long entries)
{
int retval;
spin_lock_irq(&pdc_lock);
retval = mem_pdc_call(PDC_MEM, PDC_MEM_TABLE, __pa(pdc_result), __pa(pdc_result2), entries);
convert_to_wide(pdc_result);
memcpy(r_addr, pdc_result, sizeof(*r_addr));
memcpy(tbl, pdc_result2, entries * sizeof(*tbl));
spin_unlock_irq(&pdc_lock);
return retval;
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:14,代码来源:firmware.c
示例17: pdc_stable_read
/**
* pdc_stable_read - Read data from Stable Storage.
* @staddr: Stable Storage address to access.
* @memaddr: The memory address where Stable Storage data shall be copied.
* @count: number of bytes to transfer. count is multiple of 4.
*
* This PDC call reads from the Stable Storage address supplied in staddr
* and copies count bytes to the memory address memaddr.
* The call will fail if staddr+count > PDC_STABLE size.
*/
int pdc_stable_read(unsigned long staddr, void *memaddr, unsigned long count)
{
int retval;
unsigned long flags;
spin_lock_irqsave(&pdc_lock, flags);
retval = mem_pdc_call(PDC_STABLE, PDC_STABLE_READ, staddr,
__pa(pdc_result), count);
convert_to_wide(pdc_result);
memcpy(memaddr, pdc_result, count);
spin_unlock_irqrestore(&pdc_lock, flags);
return retval;
}
开发者ID:emreharbutoglu,项目名称:Xperia-X10-Kernel-2.6.29,代码行数:24,代码来源:firmware.c
示例18: pdc_system_map_find_addrs
/**
* pdc_system_map_find_addrs - Retrieve additional address ranges.
* @pdc_addr_info: Return buffer address.
* @mod_index: Fixed address module index.
* @addr_index: Address range index.
*
* Retrieve additional information about subsequent address ranges for modules
* with multiple address ranges.
*/
int pdc_system_map_find_addrs(struct pdc_system_map_addr_info *pdc_addr_info,
long mod_index, long addr_index)
{
int retval;
spin_lock_irq(&pdc_lock);
retval = mem_pdc_call(PDC_SYSTEM_MAP, PDC_FIND_ADDRESS, __pa(pdc_result),
mod_index, addr_index);
convert_to_wide(pdc_result);
memcpy(pdc_addr_info, pdc_result, sizeof(*pdc_addr_info));
spin_unlock_irq(&pdc_lock);
pdc_addr_info->mod_addr = f_extend(pdc_addr_info->mod_addr);
return retval;
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:24,代码来源:firmware.c
示例19: pdc_coproc_cfg
/**
* pdc_coproc_cfg - To identify coprocessors attached to the processor.
* @pdc_coproc_info: Return buffer address.
*
* This PDC call returns the presence and status of all the coprocessors
* attached to the processor.
*/
int __init pdc_coproc_cfg(struct pdc_coproc_cfg *pdc_coproc_info)
{
int retval;
spin_lock_irq(&pdc_lock);
retval = mem_pdc_call(PDC_COPROC, PDC_COPROC_CFG, __pa(pdc_result));
convert_to_wide(pdc_result);
pdc_coproc_info->ccr_functional = pdc_result[0];
pdc_coproc_info->ccr_present = pdc_result[1];
pdc_coproc_info->revision = pdc_result[17];
pdc_coproc_info->model = pdc_result[18];
spin_unlock_irq(&pdc_lock);
return retval;
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:22,代码来源:firmware.c
示例20: pdc_iodc_read
/**
* pdc_iodc_read - Read data from the modules IODC.
* @actcnt: The actual number of bytes.
* @hpa: The HPA of the module for the iodc read.
* @index: The iodc entry point.
* @iodc_data: A buffer memory for the iodc options.
* @iodc_data_size: Size of the memory buffer.
*
* This PDC call reads from the IODC of the module specified by the hpa
* argument.
*/
int pdc_iodc_read(unsigned long *actcnt, unsigned long hpa, unsigned int index,
void *iodc_data, unsigned int iodc_data_size)
{
int retval;
spin_lock_irq(&pdc_lock);
retval = mem_pdc_call(PDC_IODC, PDC_IODC_READ, __pa(pdc_result), hpa,
index, __pa(pdc_result2), iodc_data_size);
convert_to_wide(pdc_result);
*actcnt = pdc_result[0];
memcpy(iodc_data, pdc_result2, iodc_data_size);
spin_unlock_irq(&pdc_lock);
return retval;
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:26,代码来源:firmware.c
注:本文中的convert_to_wide函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论