Open
Description
Consider to perform a target specific initialization outside the runtime package in target specific packages as proposed by n64 port:
go/src/runtime/tasker_noos_mips64.go
Lines 9 to 15 in 8df86cc
It may give us more flexibility when it comes to early hardware initialization. For example, with this approach we can probably avoid the plugin code in imxmbr.
Questions
- Does this
//go:linkname
approach affects the order of package initialization if we use Go (nosplit) instead of assembly? - Can we reduce the number of external functions to only
_rt0_GOARCH_noos
and in some way force theinit
function in some external package to be the first one (with dependencies) executed by runtime? - If the init approach described above doesn't work, can we reduce the number of external functions to only two. For example the second one in the form of:
func noos_defaults() map[string]any
? - Maybe only one
_rt0_GOARCH_noos
function is enough to fulfill our needs?
I personally prefer 4. You can probably use DATA unhandledException
set to very dumb handler that stops execution here and update it in the _rt0_GOARCH_noos
to more intelligent one.
Metadata
Metadata
Assignees
Labels
No labels