[haiku-commits] haiku: hrev54946 - src/system/boot/platform/efi/arch/riscv64

  • From: Alex von Gluck IV <kallisti5@xxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 5 Feb 2021 22:49:54 +0000 (UTC)

hrev54946 adds 1 changeset to branch 'master'
old head: 9e4c5cf124438891e20947b72d13412d78018800
new head: 0cbad7f3a3bfba365697de0e7bdbb07d148c0c95
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=0cbad7f3a3bf+%5E9e4c5cf12443

----------------------------------------------------------------------------

0cbad7f3a3bf: boot/platform/efi: Fill out riscv64 kernel entry assembly
  
  Change-Id: I18867f2c1188b43d5c663a7ceb3aab4a4dedb454
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/3731
  Reviewed-by: Alex von Gluck IV <kallisti5@xxxxxxxxxxx>
  Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@xxxxxxxxx>

                          [ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev54946
Commit:      0cbad7f3a3bfba365697de0e7bdbb07d148c0c95
URL:         https://git.haiku-os.org/haiku/commit/?id=0cbad7f3a3bf
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Tue Feb  2 21:54:31 2021 UTC
Committer:   Alex von Gluck IV <kallisti5@xxxxxxxxxxx>
Commit-Date: Fri Feb  5 21:55:53 2021 UTC

----------------------------------------------------------------------------

1 file changed, 18 insertions(+), 21 deletions(-)
.../boot/platform/efi/arch/riscv64/entry.S       | 39 +++++++++-----------

----------------------------------------------------------------------------

diff --git a/src/system/boot/platform/efi/arch/riscv64/entry.S 
b/src/system/boot/platform/efi/arch/riscv64/entry.S
index 3399ae9931..7ae5221a49 100644
--- a/src/system/boot/platform/efi/arch/riscv64/entry.S
+++ b/src/system/boot/platform/efi/arch/riscv64/entry.S
@@ -1,35 +1,32 @@
 /*
- * Copyright 2011, François Revol <revol@xxxxxxx>.
- * All rights reserved. Distributed under the terms of the MIT License.
+ * Copyright 2020-2021, Haiku, Inc. All rights reserved.
+ * Distributed under the terms of the MIT License.
  */
 
 #include <asm_defs.h>
 
-
     .text
 
 /*  status_t arch_enter_kernel(struct kernel_args *kernelArgs,
         addr_t kernelEntry, addr_t kernelStackTop);
 
-    r0  - kernelArgs
-    r1  - kernelEntry
-    r2  - kernelStackTop
+    a0  - kernelArgs
+    a1  - kernelEntry
+    a2  - kernelStackTop
 */
 FUNCTION(arch_enter_kernel):
-       nop
+       // set the kernel stack
+       mv      sp,a2
+
+       // Setup kernel args
+       //mv    a0,a0   // kernelArgs
+       mv      a4,a1
+       li      a1,0    // currentCPU=0
+
+       // call the kernel
+       jr      a4
 
-//     // set the kernel stack
-//     mov     sp,r2
-//
-//     // set up kernel _start args
-//     //mov   r0,r0   // kernelArgs
-//     mov     r4,r1
-//     mov     r1,#0   // currentCPU=0
-//
-//     // call the kernel
-//     mov     pc,r4
-//
-//     // return
-//     mov     r0,#-1  // B_ERROR
-//     mov     pc,lr
+       // return
+       li      a0,-1  // B_ERROR
+       ret
 FUNCTION_END(arch_enter_kernel)


Other related posts:

  • » [haiku-commits] haiku: hrev54946 - src/system/boot/platform/efi/arch/riscv64 - Alex von Gluck IV