Add method for getting physical address
Fix some warnings