mips: PMC MSP71xx mips common
Quoted 25 lines · Thiemo Seufer
Marc St-Jean wrote:
[snip]Quoted 3 lines
Quoted 3 lines
Review
Quoted 3 lines
(quoted diff) +3
-0+#ifdef CONFIG_PMC_MSP + jal kernel_entry +#elseMaybe introduce a
CONFIG_BOOT_RAW(and use it inarch/mips/Makefileto objcopy the kernel to a raw binary).Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
(quoted diff) +2
-0+ /* * Reserved space for exception handlers. * Necessary for machines which link their kernels at KSEG0. */ .fill 0x400 +#endif /* CONFIG_PMC_MSP */Quoted 8 lines
Quoted 3 lines
This is getting kind of ugly. There are a whole lot of config choices that need to use the 'j
kernel_entry'. Do they all have to have their own? I'm not sure what the best way is to handle them all.I agree but don't know the best way to handle this. I could introduce a
SYS_NO_EXEPT_FILLor similar flag but this seems excessive.Any other ideas from
arch/mipsfolks?
Quoted 8 lines
Something like
#if LOADADDR == 0xffffffff80000000 .fill 0x400#endif
but by defining an appropriate name in
arch/mips/Makefileinstead of externalizing the load-y/LOADADDR there.
Thanks for the suggestions Thiemo.
We only need one of these solutions and I think the second one is cleaner. I do have a few questions before respinning the patch:
1. Why do you want to create another name, wouldn't there be less confusion and chance for errors by reusing LOADADDR and ensuring it's the same as what the linker script uses?
2. Looking at arch/mips/Makefile there are many boards not using 0xffffffff80000000. If we introduce this check it seems that all of these boards will have their _stext changed and it'll affect their "jump" address from monitor/boot scripts?
Marc
Quoted 34 lines · Marc St-Jean
Quoted 31 lines · Thiemo Seufer
Marc St-Jean wrote:
[snip]Quoted 3 lines
Quoted 3 lines
Review
Quoted 3 lines
(quoted diff) +3
-0+#ifdef CONFIG_PMC_MSP + jal kernel_entry +#elseMaybe introduce a
CONFIG_BOOT_RAW(and use it inarch/mips/Makefileto objcopy the kernel to a raw binary).Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
(quoted diff) +2
-0+ /* * Reserved space for exception handlers. * Necessary for machines which link their kernels at KSEG0. */ .fill 0x400 +#endif /* CONFIG_PMC_MSP */Quoted 8 lines
Quoted 3 lines
This is getting kind of ugly. There are a whole lot of config choices that need to use the 'j
kernel_entry'. Do they all have to have their own? I'm not sure what the best way is to handle them all.I agree but don't know the best way to handle this. I could introduce a
SYS_NO_EXEPT_FILLor similar flag but this seems excessive.Any other ideas from
arch/mipsfolks?Something like
#if LOADADDR == 0xffffffff80000000 .fill 0x400#endif
Quoted 6 lines
Quoted 2 lines
but by defining an appropriate name in
arch/mips/Makefileinstead of externalizing the load-y/LOADADDR there.Thanks for the suggestions Thiemo.
We only need one of these solutions and I think the second one is cleaner.
You need both as they solve two independent problems. One is rerouting the kernel entry, the other saves some space in the image.
Quoted 5 lines
I do have a few questions before respinning the patch:
1. Why do you want to create another name, wouldn't there be less confusion and chance for errors by reusing LOADADDR and ensuring it's the same as what the linker script uses?
LOADADDR is a short and thus bad name for a global symbol.
Quoted 4 lines
2. Looking at
arch/mips/Makefilethere are many boards not using0xffffffff80000000. If we introduce this check it seems that all of these boards will have their_stextchanged and it'll affect their "jump" address from monitor/boot scripts?
For targets with a raw binary kernel the assumption is that their firmware jumps to the start of the image. The .fill translates to nops.
Targets which don't use 0x80000000 as load address don't need to reserve space at the start for exception handlers.
Thiemo