(memRange *)NULL,
(memRange *)NULL,
0,
- 0xcf,
+ 0x4f, /* 68 register available 0x0C to 0x4F (0x8C to 0xCF mapped to bank 0) */
0x80,
},
static int num_of_supported_PICS = sizeof(Pics)/sizeof(PIC_device);
-#define DEFAULT_PIC "f877"
-
static PIC_device *pic=NULL;
AssignedMemory *finalMapping=NULL;
for(i=0; i<=pic->maxRAMaddress; i++) {
finalMapping[i].reg = NULL;
finalMapping[i].isValid = 0;
+ finalMapping[i].bank = (i>>7);
}
}
} else {
if(start>=0) {
- /* clear the lower 7-bits of the start address of the first
- * variable declared in this bank. The upper bits for the mid
- * range pics are the bank select bits.
+ /* clear the lower 7-bits of the start address of the first
+ * variable declared in this bank. The upper bits for the mid
+ * range pics are the bank select bits.
*/
bank_base = start & 0xfff8;
*-----------------------------------------------------------------*/
void setDefMaxRam(void)
{
- setMaxRAM(pic->defMaxRAMaddrs); // Max RAM has not been included, so use default setting
+ unsigned i;
+ setMaxRAM(pic->defMaxRAMaddrs); /* Max RAM has not been included, so use default setting */
+ /* Validate full memory range for use by general purpose RAM */
+ for (i=pic->defMaxRAMaddrs; i--; ) {
+ finalMapping[i].bank = (i>>7);
+ finalMapping[i].isValid = 1;
+ }
+}
+
+/*-----------------------------------------------------------------*
+*
+*-----------------------------------------------------------------*/
+unsigned getMaxRam(void)
+{
+ return pic->defMaxRAMaddrs;
}