Advanced Micro Devices Inc. and the company that manufactures most of its computer chips have updated their relationship, continuing AMD’s ability to make chips elsewhere.

Under the terms of the five-year deal, which sets annual wafer-purchase targets along with wafer prices for this year and a framework for yearly wafer pricing in future years, AMD will pay Globalfoundries $100 million in installments. AMD also agreed to pay Globalfoundries quarterly, beginning in 2017, based on the volume of certain wafers bought from another foundry.

AMD estimated it would book a $335 million charge in the current quarter. The amount includes $100 million in cash payments to be made to Globalfoundries and $235 million for the estimated value of a warrant to Mubadala Development Co.’s West Coast Hitech LP to buy 75 million AMD shares at $5.98 a share. The warrant is exercisable by Feb. 29, 2020.

Mubadala, an investment and development vehicle owned by the Abu Dhabi government, is the owner of Globalfoundries and controls about 18% of AMD stock. Its ownership is currently capped at 19.99%.

AMD spun off in 2009 what became Globalfoundries, which includes AMD’s former manufacturing operations in Germany.