Writing Device Drivers

SPARC Data Alignment

All quantities must be aligned on their natural boundaries, using standard C data types:

Usually, the compiler handles any alignment issues. However, driver writers are more likely to be concerned about alignment because the proper data types must be used to access the devices. Because device registers are commonly accessed through a pointer reference, drivers must ensure that pointers are properly aligned when accessing the device.