]> git.proxmox.com Git - qemu.git/blobdiff - target-sh4/cpu.h
Move TARGET_PHYS_ADDR_SPACE_BITS to target-*/cpu.h.
[qemu.git] / target-sh4 / cpu.h
index 015d59845af642c861d5d9753269829d315e3bb6..18a55320f4c68d300e71fbe1c748977e8868157b 100644 (file)
@@ -44,6 +44,9 @@
 
 #define TARGET_PAGE_BITS 12    /* 4k XXXXX */
 
+#define TARGET_PHYS_ADDR_SPACE_BITS 32
+#define TARGET_VIRT_ADDR_SPACE_BITS 32
+
 #define SR_MD (1 << 30)
 #define SR_RB (1 << 29)
 #define SR_BL (1 << 28)
  * The use of DELAY_SLOT_TRUE flag makes us accept such SR_T modification.
  */
 
-/* XXXXX The structure could be made more compact */
 typedef struct tlb_t {
-    uint8_t asid;              /* address space identifier */
     uint32_t vpn;              /* virtual page number */
-    uint8_t v;                 /* validity */
     uint32_t ppn;              /* physical page number */
-    uint8_t sz;                        /* page size */
-    uint32_t size;             /* cached page size in bytes */
-    uint8_t sh;                        /* share status */
-    uint8_t c;                 /* cacheability */
-    uint8_t pr;                        /* protection key */
-    uint8_t d;                 /* dirty */
-    uint8_t wt;                        /* write through */
-    uint8_t sa;                        /* space attribute (PCMCIA) */
-    uint8_t tc;                        /* timing control */
+    uint32_t size;             /* mapped page size in bytes */
+    uint8_t asid;              /* address space identifier */
+    uint8_t v:1;               /* validity */
+    uint8_t sz:2;              /* page size */
+    uint8_t sh:1;              /* share status */
+    uint8_t c:1;               /* cacheability */
+    uint8_t pr:2;              /* protection key */
+    uint8_t d:1;               /* dirty */
+    uint8_t wt:1;              /* write through */
+    uint8_t sa:3;              /* space attribute (PCMCIA) */
+    uint8_t tc:1;              /* timing control */
 } tlb_t;
 
 #define UTLB_SIZE 64