Franck Bui-Huu wrote: [snip] > >> If so could you explain the choice of these values > >> because I fail to understand it. > > > > It allows to load a 64-bit kernel in KSEG0, > > sorry to be ignorant of 64 bit kernels, but what's the point > to load them in KSEG0. Smaller code with better performance. > > and use short 2-instruction symbol references there. > > do you mean "it allows to use only 2 'lui' instructions to load > a symbol address into a register" ? It allows a 2-instruction "lui ; addiu" sequence instead of a 6-instruction "lui ; lui ; addiu ; addiu ; dsll32 ; addu" sequence. > Futhermore I don't see how some part of the kernel convert virtual > address into a physical one with such values. For example in setup.c, > the function resource_init() does: > > code_resource.start = virt_to_phys(&_text); > code_resource.end = virt_to_phys(&_etext) - 1; > data_resource.start = virt_to_phys(&_etext); > data_resource.end = virt_to_phys(&_edata) - 1; > > How does it work in this case ? Those are addresses in 64-bit space, no special handling is needed there. The same doesn't hold for the initrd addresses supplied by the (32-bit) firmware. The firmware doesn't convert the kernel parameters to 64-bit values because the O2 kernel used to allow a pure 32-bit build, and the firmware can't find out what's actually inside the object file. Thiemo