High resolution equilibrium and stability calculations of pedestal and SOL plasma in tokamaks