As far as I can tell the SDK functions just provide back what's stored initially which is essentially defined in the makefile - hence if I define 512kB (4Mbit) in the makefile everything works fine no matter if the actual chip is way bigger but probably the SDK calls to determine flash size will return 512kB no matter what the real size is.
One option (last resort) could be to write a program that just tries write to the flash and then reads from the same address... (starting with 128M and then going down).