add hardware assist for segment and context flush;