VirtualBox

Changeset 23987 in vbox for trunk/src


Ignore:
Timestamp:
Oct 22, 2009 2:39:51 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53820
Message:

Reverted unintentionally submitted changes.

Location:
trunk/src/VBox/Devices/PC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevDMA.cpp

    r23986 r23987  
    137137    unsigned int dshift;
    138138    struct dma_regs regs[4];
    139     uint8_t ext_page[4];
    140139};
    141140
     
    161160};
    162161
    163 static int channels[8] = {-1, 2, 3, 1, -2, -3, -4, 0};
     162static int channels[8] = {-1, 2, 3, 1, -1, -1, -1, 0};
    164163
    165164static 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     else
    174         d->ext_page[-ichan - 1] = data;
    175 }
    176 
    177 static void write_pageh (void *opaque, uint32_t nport, uint32_t data)
    178165{
    179166    struct dma_cont *d = (struct dma_cont*)opaque;
     
    185172        return;
    186173    }
     174    d->regs[ichan].page = data;
     175}
     176
     177static 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    }
    187187    d->regs[ichan].pageh = data;
    188188}
     
    194194
    195195    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;
    200201}
    201202
     
    668669{
    669670    const static int page_port_list[] = { 0x1, 0x2, 0x3, 0x7 };
    670     const static int misc_port_list[] = { 0x0, 0x4, 0x5, 0x6 };
    671671    int i;
    672672
     
    707707        PDMDevHlpIOPortRegister (s->pDevIns, base + ((i + 8) << dshift), 1, d,
    708708                                 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");
    711709#else
    712710        register_ioport_write (base + ((i + 8) << dshift), 1, 1,
  • trunk/src/VBox/Devices/PC/DevPIC.cpp

    r23986 r23987  
    486486                AssertReleaseMsgFailed(("single mode not supported"));
    487487            if (val & 0x08)
    488                 LogRel(("level sensitive irq not supported - ignoring"));
     488                AssertReleaseMsgFailed(("level sensitive irq not supported"));
    489489        } else if (val & 0x08) {
    490490            if (val & 0x04)
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette