diff options
author | Michael Cree <mcree@orcon.net.nz> | 2010-09-27 13:39:12 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2010-09-27 13:39:12 -0400 |
commit | 7f8820fcec8c90bf2f823170bd08a23e8b4ff7af (patch) | |
tree | 01bddf7121201cb692a97e5611a6fb7537a602d5 /src | |
parent | c4f834cdfbe96aa47ac5fb039f9dd7aa9730c8a3 (diff) |
Fix some unaligned 32bit accesses in the AtomBios code.
On the Alpha architecture unaligned 32bit accesses incur a software
trap to the kernel and pollute the kernel logs. Fixed by use of the
ldl_u() interface.
Signed-off-by: Michael Cree <mcree@orcon.net.nz>
Diffstat (limited to 'src')
-rw-r--r-- | src/AtomBios/CD_Operations.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/AtomBios/CD_Operations.c b/src/AtomBios/CD_Operations.c index 9d399d54..f8b47e3e 100644 --- a/src/AtomBios/CD_Operations.c +++ b/src/AtomBios/CD_Operations.c @@ -367,7 +367,7 @@ UINT32 GetParametersPS(PARSER_TEMP_DATA STACK_BASED * pParserTempData) UINT32 data; pParserTempData->Index=*pParserTempData->pWorkingTableData->IP; pParserTempData->pWorkingTableData->IP+=sizeof(UINT8); - data = UINT32LE_TO_CPU(*(pParserTempData->pDeviceData->pParameterSpace+pParserTempData->Index)); + data = UINT32LE_TO_CPU(ldl_u(pParserTempData->pDeviceData->pParameterSpace+pParserTempData->Index)); return data; } @@ -430,7 +430,7 @@ UINT32 GetParametersIndirect(PARSER_TEMP_DATA STACK_BASED * pParserTempData) pParserTempData->Index=UINT16LE_TO_CPU(ldw_u((uint16_t *)pParserTempData->pWorkingTableData->IP)); pParserTempData->pWorkingTableData->IP+=sizeof(UINT16); - ret = UINT32LE_TO_CPU(*(UINT32*)(RELATIVE_TO_BIOS_IMAGE(pParserTempData->Index)+pParserTempData->CurrentDataBlock)); + ret = UINT32LE_TO_CPU(ldl_u((UINT32*)(RELATIVE_TO_BIOS_IMAGE(pParserTempData->Index)+pParserTempData->CurrentDataBlock))); return ret; } @@ -453,7 +453,7 @@ UINT32 GetParametersDirect16(PARSER_TEMP_DATA STACK_BASED * pParserTempData) UINT32 GetParametersDirect32(PARSER_TEMP_DATA STACK_BASED * pParserTempData) { pParserTempData->CD_Mask.SrcAlignment=alignmentDword; - pParserTempData->Index=UINT32LE_TO_CPU(*(UINT32*)pParserTempData->pWorkingTableData->IP); + pParserTempData->Index=UINT32LE_TO_CPU(ldl_u((UINT32*)pParserTempData->pWorkingTableData->IP)); pParserTempData->pWorkingTableData->IP+=sizeof(UINT32); return pParserTempData->Index; } |