The ram space is governed by two modules. CPU & GPU. I am sure the 870mb is for the CPU whereas the other 480mb is dedicated for GPU, and just incase binaries are not updated or due to some glitch, it only shows the available ram for the other module.
What ram space it was showing before the KK update? You need to update the binaries manually as when they get failed in the update process. And for binary updates, only the Samsung service centre will be able to do that. Why don't you wipe, flash, wipe again and also shut down the phone completely before putting it in "Download mode" otherwise the bootloader will not stick.