Commit e2e5a722 authored by Jeffrey Lee's avatar Jeffrey Lee Committed by ROOL
Browse files

Add safety checks to s.CPUFeatures

To avoid CallASWI's CPUFeatures implementation getting dangerously out
of sync with the kernel, add extra asserts to both sets of sources to
check try and make sure both sets of sources get updated when new flags
are added.
parent 305dc195
......@@ -21,6 +21,19 @@
InKernel SETL {TRUE}
]
; Check that when new flags are added, the code is updated appropriately. This
; is necessary (particularly for CallASWI) because the code will claim that it
; supports all the flags up to CPUFeature_Max, which could lead to misreporting
; if the code for calculating that flag doesn't exist yet.
[ CPUFeature_Max <> 65
[ InKernel
! 1, "Please update this check value after adding support for the new feature flags, and remember to update CallASWI"
|
; (we're in CallASWI)
! 1, "Please re-sync with Kernel.s.CPUFeatures to ensure CallASWI reports the correct flag values"
]
]
; Potential non-feature register flags:
; * NOP after banked LDM?
; * StrongARM MSR bug?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment