Skip to contentSkip to conversation

frame_table initialisation

DISCUSSION PUCCETTI Armand 2 participants 2 messages Feb 26, 2007

lore
Share & tools
lore
#0 lore raw

It is unclear for me how variable frame_table is initialised:

1. According to function __start_xen:
Variable frame_table is initialised by __start_xen -> init_frametable.

but

2. some lines before in __start_xen, this variable is referenced by function map_pages_to_xen -> virt_to_xen_l2 -> alloc_xen_pagetable -> mfn_to_page. What should the value of frame_table be there?

Do I miss some pre-initialisation(s)?

Armand

#1 lore raw
Quoted 6 lines · PUCCETTI Armand

2. some lines before in __start_xen, this variable is referenced by function map_pages_to_xen -> virt_to_xen_l2 -> alloc_xen_pagetable -> mfn_to_page.
What should the value of frame_table be there?

Do I miss some pre-initialisation(s)?

The fact that frame_table is not initialised here (and hence will be NULL) doesn't actually matter, since the result of mfn_to_page() is only actually used as a value to page_to_mfn(). And page_to_mfn(mfn_to_page(m))==m for any (constant) value of frame_table.

This code could be clearer I'll admit. It probably makes sense for alloc_xen_pagetable to return an MFN rather than a page_info pointer.

-- Keir