diff TaskManager/Cell/spe/CellDmaManager.cc @ 604:7a41d2cb0a84

fix mail box size
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 07 Nov 2009 14:23:40 +0900
parents 87462f8d3761
children ab866bc8a624
line wrap: on
line diff
--- a/TaskManager/Cell/spe/CellDmaManager.cc	Sat Nov 07 14:13:29 2009 +0900
+++ b/TaskManager/Cell/spe/CellDmaManager.cc	Sat Nov 07 14:23:40 2009 +0900
@@ -78,15 +78,19 @@
 }
 
 void
-CellDmaManager::mail_write(uint32 data)
+CellDmaManager::mail_write(memaddr data)
 {
-    spu_write_out_mbox(data);
+    spu_write_out_mbox((uint32)data);
+    if (sizeof(memaddr)>4)
+	spu_write_out_mbox(data>>4);
 }
 
-unsigned int
-CellDmaManager::mail_read(void)
+memaddr
+CellDmaManager::mail_read()
 {
-    unsigned int mail = spu_read_in_mbox();
+    memaddr mail = spu_read_in_mbox();
+    if (sizeof(memaddr)>4)
+	mail += (spu_read_in_mbox()<<4);
     return mail;
 }
 
@@ -103,3 +107,5 @@
     mfc_putl(buff, 0, list->element, sizeof(mfc_list_element_t)*list->length,
 	     mask, 0, 0);
 }
+
+/* end */