Rev 1778 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1778 | Rev 1783 | ||
|---|---|---|---|
| Line 24... | Line 24... | ||
| 24 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 26 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | # |
27 | # |
| 28 | 28 | ||
| - | 29 | #define STACK_WINDOW_SAVE_AREA_SIZE (16*8) |
|
| - | 30 | ||
| - | 31 | #define PSTATE_AM_BIT 8 |
|
| - | 32 | ||
| 29 | .text |
33 | .text |
| 30 | 34 | ||
| 31 | .global halt |
35 | .global halt |
| 32 | .global memcpy |
36 | .global memcpy |
| 33 | .global jump_to_kernel |
37 | .global jump_to_kernel |
| Line 92... | Line 96... | ||
| 92 | 96 | ||
| 93 | jmp %o7 + 8 ! exit point |
97 | jmp %o7 + 8 ! exit point |
| 94 | mov %o1, %o0 |
98 | mov %o1, %o0 |
| 95 | 99 | ||
| 96 | jump_to_kernel: |
100 | jump_to_kernel: |
| 97 | set ofw, %l0 |
101 | set ofw_cif, %l0 |
| 98 | jmp %o0 ! jump to kernel |
102 | jmp %o0 ! jump to kernel |
| 99 | ldx [%l0], %o4 ! pass OpenFirmware address in %o4 |
103 | ldx [%l0], %o4 ! pass OpenFirmware address in %o4 |
| - | 104 | ||
| - | 105 | .global ofw |
|
| - | 106 | ofw: |
|
| - | 107 | save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp |
|
| - | 108 | set ofw_cif, %l0 |
|
| - | 109 | ldx [%l0], %l0 |
|
| - | 110 | ||
| - | 111 | rdpr %pstate, %l1 |
|
| - | 112 | and %l1, ~PSTATE_AM_BIT, %l2 |
|
| - | 113 | wrpr %l2, 0, %pstate |
|
| - | 114 | ||
| - | 115 | jmpl %l0, %o7 |
|
| - | 116 | mov %i0, %o0 |
|
| - | 117 | ||
| - | 118 | wrpr %l1, 0, %pstate |
|
| - | 119 | ||
| - | 120 | ret |
|
| - | 121 | restore %o0, 0, %o0 |
|