how to do cache line scan test?

Since there could be some 'bad bits' in cahe line, which will cause calculation fault/process error,

is there any method to check whether a chip has any 'bad bits' ?


read and write the cache line directly by address?

adjust reflecting relation between virtual address and physical address to scan each cache line?