Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Dec 2021 08:26:12 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 1d66269db393 - main - kboot: simplify _start
Message-ID:  <202112090826.1B98QCn9006584@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=1d66269db39319ec1b22e48a5e56a15087aba0ae

commit 1d66269db39319ec1b22e48a5e56a15087aba0ae
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2021-12-09 08:16:51 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2021-12-09 08:25:40 +0000

    kboot: simplify _start
    
    _start can be implemented directly like this. The code generated is
    identical. It's also portable.
    
    Reviewed by:    md5
    Sponsored by:   Netflix
---
 stand/powerpc/kboot/main.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/stand/powerpc/kboot/main.c b/stand/powerpc/kboot/main.c
index d25b6216f421..9cb4cd2a68d7 100644
--- a/stand/powerpc/kboot/main.c
+++ b/stand/powerpc/kboot/main.c
@@ -482,18 +482,7 @@ kboot_kseg_get(int *nseg, void **ptr)
 void
 _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");
-	main((int)sp[0], (const char **)&sp[1]);
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#endif
-
+	main(argc, argv);
 }
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202112090826.1B98QCn9006584>