The deal will help Samsung and GlobalFoundries provide an adequate supply of mobile chips