diff options
| author | Patrick Williams <iawillia@us.ibm.com> | 2011-07-08 19:33:40 -0500 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2011-07-20 14:58:43 -0500 |
| commit | 471f09f1a9bcc46fc385fa8aca776cb682075c0b (patch) | |
| tree | e0a4969825799dcc4c28a71975cb68439f507390 /src/kernel/exception.C | |
| parent | 3ecf7085ccc55eb4f815a62f47ea09f55bb6688e (diff) | |
| download | talos-hostboot-471f09f1a9bcc46fc385fa8aca776cb682075c0b.tar.gz talos-hostboot-471f09f1a9bcc46fc385fa8aca776cb682075c0b.zip | |
VMM Improvements.
- Segment Manager
- Base / Device Segments
- Block for Base image.
Change-Id: Ic0c058e5c5b210ec1c48d30f6ed9f9837d74a3c8
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/193
Tested-by: Jenkins Server
Reviewed-by: MATTHEW S. BARTH <msbarth@us.ibm.com>
Diffstat (limited to 'src/kernel/exception.C')
| -rw-r--r-- | src/kernel/exception.C | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/kernel/exception.C b/src/kernel/exception.C index cbbf3cf89..b12914fe8 100644 --- a/src/kernel/exception.C +++ b/src/kernel/exception.C @@ -47,12 +47,12 @@ void kernel_execute_data_storage() switch(exception) { case EXCEPTION_DSISR_PTEMISS: - handled = VmmManager::pteMiss(t); + handled = VmmManager::pteMiss(t, getDAR()); break; } if (!handled) { - printk("Data Storage exception on %d: %lx, %lx\n", + printk("Data Storage exception on %d: %lx, %lx\n", t->tid, getDAR(), getDSISR()); Systemcalls::TaskEnd(t); } @@ -66,12 +66,28 @@ void kernel_execute_data_segment() Systemcalls::TaskEnd(t); } +const uint64_t EXCEPTION_SRR1_INSTR_MASK = 0x0000000040000000; +const uint64_t EXCEPTION_SRR1_INSTR_PTEMISS = 0x0000000040000000; + extern "C" void kernel_execute_inst_storage() { task_t* t = TaskManager::getCurrentTask(); - printk("Inst Storage exception, killing task %d\n", t->tid); - Systemcalls::TaskEnd(t); + uint64_t exception = getSRR1() & EXCEPTION_SRR1_INSTR_MASK; + + bool handled = false; + switch (exception) + { + case EXCEPTION_SRR1_INSTR_PTEMISS: + handled = VmmManager::pteMiss(t, getSRR0()); + break; + } + if (!handled) + { + printk("Inst Storage exception on %d: %lx, %lx\n", + t->tid, getSRR0(), getSRR1()); + Systemcalls::TaskEnd(t); + } } extern "C" @@ -103,7 +119,7 @@ namespace ExceptionHandles // check for mfsprg3 if ((instruction & 0xfc1fffff) == 0x7c1342a6) { - t->context.gprs[(instruction & 0x03E00000) >> 21] = + t->context.gprs[(instruction & 0x03E00000) >> 21] = (uint64_t) t; t->context.nip = (void*) (((uint64_t)t->context.nip)+4); return true; |

