Two top firms will give the US government 15% of profits from the sale of some advanced semiconductors in China, the BBC has been told.