- Timestamp:
- Oct 22, 2009 2:39:51 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 53820
- Location:
- trunk/src/VBox/Devices/PC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevDMA.cpp
r23986 r23987 137 137 unsigned int dshift; 138 138 struct dma_regs regs[4]; 139 uint8_t ext_page[4];140 139 }; 141 140 … … 161 160 }; 162 161 163 static int channels[8] = {-1, 2, 3, 1, - 2, -3, -4, 0};162 static int channels[8] = {-1, 2, 3, 1, -1, -1, -1, 0}; 164 163 165 164 static void write_page (void *opaque, uint32_t nport, uint32_t data) 166 {167 struct dma_cont *d = (struct dma_cont*)opaque;168 int ichan;169 170 ichan = channels[nport & 7];171 if (ichan >= 0)172 d->regs[ichan].page = data;173 else174 d->ext_page[-ichan - 1] = data;175 }176 177 static void write_pageh (void *opaque, uint32_t nport, uint32_t data)178 165 { 179 166 struct dma_cont *d = (struct dma_cont*)opaque; … … 185 172 return; 186 173 } 174 d->regs[ichan].page = data; 175 } 176 177 static void write_pageh (void *opaque, uint32_t nport, uint32_t data) 178 { 179 struct dma_cont *d = (struct dma_cont*)opaque; 180 int ichan; 181 182 ichan = channels[nport & 7]; 183 if (-1 == ichan) { 184 dolog ("invalid channel %#x %#x\n", nport, data); 185 return; 186 } 187 187 d->regs[ichan].pageh = data; 188 188 } … … 194 194 195 195 ichan = channels[nport & 7]; 196 if (ichan >= 0) 197 return d->regs[ichan].page; 198 else 199 return d->regs[-ichan - 1].page; 196 if (-1 == ichan) { 197 dolog ("invalid channel read %#x\n", nport); 198 return 0; 199 } 200 return d->regs[ichan].page; 200 201 } 201 202 … … 668 669 { 669 670 const static int page_port_list[] = { 0x1, 0x2, 0x3, 0x7 }; 670 const static int misc_port_list[] = { 0x0, 0x4, 0x5, 0x6 };671 671 int i; 672 672 … … 707 707 PDMDevHlpIOPortRegister (s->pDevIns, base + ((i + 8) << dshift), 1, d, 708 708 io_write_cont, io_read_cont, NULL, NULL, "DMA cont"); 709 PDMDevHlpIOPortRegister (s->pDevIns, page_base + misc_port_list[i], 1, d,710 io_write_page, io_read_page, NULL, NULL, "Dummy DMA Page");711 709 #else 712 710 register_ioport_write (base + ((i + 8) << dshift), 1, 1, -
trunk/src/VBox/Devices/PC/DevPIC.cpp
r23986 r23987 486 486 AssertReleaseMsgFailed(("single mode not supported")); 487 487 if (val & 0x08) 488 LogRel(("level sensitive irq not supported - ignoring"));488 AssertReleaseMsgFailed(("level sensitive irq not supported")); 489 489 } else if (val & 0x08) { 490 490 if (val & 0x04)
Note:
See TracChangeset
for help on using the changeset viewer.