cpu: Split frame handling macros to the new header cpu/frame.h