diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2011-08-21 23:51:55 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2011-08-22 17:16:49 -0500 |
commit | 91b39e52483cc5a8cc1cb7c7d15c281a150d9572 (patch) | |
tree | 46b53894a06b14e311499f5817e6307285720221 /src/kernel/start.S | |
parent | c6571028ca3b54ba0a4ec73d1f39fdeba6c79fb9 (diff) | |
download | talos-hostboot-91b39e52483cc5a8cc1cb7c7d15c281a150d9572.tar.gz talos-hostboot-91b39e52483cc5a8cc1cb7c7d15c281a150d9572.zip |
Add initial scratch (sprc/sprd) support.
Change-Id: Ica416251241a2881459b2eb1ae0ad3c746de1200
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/267
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/kernel/start.S')
-rw-r--r-- | src/kernel/start.S | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/kernel/start.S b/src/kernel/start.S index d67cb7790..1f7fc7163 100644 --- a/src/kernel/start.S +++ b/src/kernel/start.S @@ -360,6 +360,8 @@ kernel_dispatch_task: ;// Handle fast path system calls. ;// 0x800 = HMER read (HMER -> r3). ;// 0x801 = HMER write (r4 -> HMER). + ;// 0x802 = SCRATCH read (r4 -> SPRC, SPRD -> r3). + ;// 0x803 = SCRATCH write (r4 -> SPRC, r5 -> SPRD). system_call_fast_path: ;// Check if this is HMER read (0x800). ;// Compare was already done in system call path. @@ -373,9 +375,25 @@ system_call_fast_path: mtspr HMER, r4 li r3, 0 b 1f ;// Jump to exit point. - ;// Invalid system call, loop for debug. + ;// Check if this is SCRATCH read (0x802). 3: - b 3b + cmpi cr0, r3, 0x802 + bne cr0, 4f + mtspr 276, r4 + isync + mfspr r3, 277 + b 1f ;// Jump to exit point. + ;// Check if this is SCRATCH write (0x803). +4: + cmpi cr0, r3, 0x803 + bne cr0, 5f + mtspr 276, r4 + isync + mtspr 277, r5 + b 1f ;// Jump to exit point. + ;// Invalid system call, loop for debug. +5: + b 5b 1: rfid ;// Return from interrupt. |