Hi
There is a professional implementation at http://www.utasker.com/kinetis/FRDM-K64F.html (see right at the bottom of page) which you could use in case you prefer to save development time.
See also the discussion at:
https://community.nxp.com/message/586326#586326
The address of 0x80000 is correct but maybe you have an issue with the flash swap indicator(?)
Attached is the uTasker Flash driver (single file solution for all K,KW,KV,KL,KE, KEA flash features which is IDE and chip-independent) as reference - search for SUPPORT_SWAP_BLOCK to locate code relevant to the flash swap. The Flash and the flash swap process is also simulated in the uTasker simulator which allows developers to work more efficiently that using traditional tools.
Regards
Mark