I am currently applying hibernation to my linux kernel and I need to manually feed the system watchdog during the last stage of resuming hibernate_exit
. However, during this assembly method, the ttbr1 is switched to a different map table, which means that the initial watchdog’s virtual address cannot be used. I have read about the docs for fixmap and I believe that it might be the solution to my problem. I have mapped the physical address of the watchdog to a virtual address located in the permanent fix address area using __set_fixmap
, and then passed it to hibernate_exit
. However, the system crashes when I try to write something to this VA.
After reading many articles, I have learned that fixmap is only used during the system initialization stage and nowhere else. Therefore, my question is: Can I use fixmap to map a PA during the initialization stage and then use this mapping anytime I need it? In other words, is this mapping always stored in the fixmap area unless I delete it? Also, is my assumption that the fixmap is not affected by the switching in ttbr correct?