h6. [[Hardware Abstraction Layer]] h6. » HAL workspace The OS is able to provide the HAL with two areas of workspace: * Static workspace * Non-cacheable workspace The HAL is not able to claim extra memory at runtime, so the workspace size must be chosen appropriately. h4. Static workspace When the OS calls [[HAL_Init]], the sb register will contain the pointer to the HAL's static workspace. The workspace will have been zero-initialised by the OS, and will be the of the size indicated in word 5 of the "HAL descriptor":haldescriptor The static workspace will be marked as cacheable & bufferable, is only guaranteed to be 4 byte aligned, and is not guaranteed to occupy physically contiguous pages of RAM. h4. Non-cacheable workspace This workspace is optional. If the HAL requires it, it must request it by setting bit 0 of the flags word in the "HAL descriptor":haldescriptor When the OS calls [[HAL_Init]], the _uncacheable_ws_ parameter will contain a pointer to the uncacheable workspace. The uncacheable workspace has a fixed size of 32KB, and will be marked as non-cacheable & non-bufferable. It's guaranteed to be at least 4KB aligned, and to occupy physically contiguous pages of RAM. [haldescriptor]/wiki/documentation/show/HAL%20OS%20layout%20and%20headers#haldescriptor