Changeset View
Changeset View
Standalone View
Standalone View
head/stand/powerpc/kboot/main.c
Show First 20 Lines • Show All 478 Lines • ▼ Show 20 Lines | #endif | ||||
*nseg = nkexec_segments; | *nseg = nkexec_segments; | ||||
*ptr = &loaded_segments[0]; | *ptr = &loaded_segments[0]; | ||||
} | } | ||||
void | void | ||||
_start(int argc, const char **argv, char **env) | _start(int argc, const char **argv, char **env) | ||||
{ | { | ||||
// This makes error "variable 'sp' is uninitialized" be just a warning on clang. | |||||
// Initializing 'sp' is not desired here as it would overwrite "r1" original value | |||||
#if defined(__clang__) | |||||
#pragma clang diagnostic push | |||||
#pragma clang diagnostic warning "-Wuninitialized" | |||||
#endif | |||||
register volatile void **sp asm("r1"); | register volatile void **sp asm("r1"); | ||||
main((int)sp[0], (const char **)&sp[1]); | main((int)sp[0], (const char **)&sp[1]); | ||||
#if defined(__clang__) | |||||
#pragma clang diagnostic pop | |||||
#endif | |||||
} | } | ||||
/* | /* | ||||
* Since proper fdt command handling function is defined in fdt_loader_cmd.c, | * Since proper fdt command handling function is defined in fdt_loader_cmd.c, | ||||
* and declaring it as extern is in contradiction with COMMAND_SET() macro | * and declaring it as extern is in contradiction with COMMAND_SET() macro | ||||
* (which uses static pointer), we're defining wrapper function, which | * (which uses static pointer), we're defining wrapper function, which | ||||
* calls the proper fdt handling routine. | * calls the proper fdt handling routine. | ||||
*/ | */ | ||||
Show All 9 Lines |