// Copyright 2023 Google LLC.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
//
// A starting functions for simple kelvin programs.

/**
 * Entry point.
 */
        .section ._init
        .balign 4
        .global _start
        .type _start, @function
_start:
        ###############################################
        # Put all scalar registers into a known state #
        ###############################################
        la   sp, __stack_end__
        la   gp, _global_pointer
        mv   tp, zero
        mv   t1, zero
        mv   t2, zero
        mv   s0, zero
        mv   s1, zero
        mv   a1, zero
        mv   a2, zero
        mv   a3, zero
        mv   a4, zero
        mv   a5, zero
        mv   a6, zero
        mv   a7, zero
        mv   s2, zero
        mv   s3, zero
        mv   s4, zero
        mv   s5, zero
        mv   s6, zero
        mv   s7, zero
        mv   s8, zero
        mv   s9, zero
        mv   s10, zero
        mv   s11, zero
        mv   t3, zero
        mv   t4, zero
        mv   t5, zero
        mv   t6, zero

        # Zero out the bss section
        la   a0, __bss_start__
        la   a1, __bss_end__
        call crt_section_clear

        # Initialize the heap ptr after clearing BSS
        la   s0, __heap_start__
        sw   s0, _heap_ptr, s1

        # Initialize arrays
        la   s0, __init_array_start__
        la   s1, __init_array_end__
        bgeu s0, s1, init_array_loop_end
init_array_loop:
        lw   t0, 0(s0)
        jalr t0
        addi s0, s0, 0x4
        bltu s0, s1, init_array_loop
init_array_loop_end:

        # Set up sentinel value in _ret
        # If we see this after an ebreak,
        # the break source is unlikely to
        # be a clean return from main.
        la   t0, _ret
        li   a0, 0x0badd00d
        sw   a0, 0(t0)

        #############
        # Call main #
        #############
        li   a0, 0  # argv
        li   a1, 0  # argc
        la   ra, main
        jalr ra, ra
        # Store the application's return value at _ret
        la   t0, _ret
        sw   a0, 0(t0)
        flushall
        beqz a0, success
failure:
        ebreak
        j    loop
success:
        mpause      # Kelvin end of program op
loop:
        j    loop
