You've looked at the datasheet for the MC9S12XDP512 (MC9S12XDP512V2.pdf), right? Odd. Looks like Port K could be set to either GPIO or extended bus mode (where PK6:0 are output), according to Chapter 22 in the datasheet, Table 22-1. But input only? Only on PK7, in the extended bus mode. It sounds like something strange might be connected to that pin.
---Tom