Facebook’s owner will also have an option to buy 10% of AMD.