VirtualBox

Changeset 85555 in vbox for trunk/src


Ignore:
Timestamp:
Jul 30, 2020 1:11:50 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
139623
Message:

SUP: Fix for solaris VBoxDDR0.r0 loading issue (inverted test in the "it's complicated" part of the code). bugref:9801

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPLibLdr.cpp

    r85546 r85555  
    393393    {
    394394        pArgs->uEndRva = uRvaSeg + cbMapped;
    395         Log2(("supLoadModuleCompileSegmentsCB: -> merged\n"));
     395        Log2(("supLoadModuleCompileSegmentsCB: -> merged, end %#x\n", pArgs->uEndRva));
    396396        return VINF_SUCCESS;
    397397    }
     
    420420            {
    421421                pArgs->uEndRva = uRvaSeg + cbMapped;
    422                 Log2(("supLoadModuleCompileSegmentsCB: -> merge, %#x common, upgrading prot to %#x\n", cbCommon, pArgs->fProt));
     422                Log2(("supLoadModuleCompileSegmentsCB: -> merge, %#x common, upgrading prot to %#x, end %#x\n",
     423                      cbCommon, pArgs->fProt, pArgs->uEndRva));
    423424                return VINF_SUCCESS; /* New segment was smaller than a page. */
    424425            }
     
    438439                pArgs->fProt   = fProt;
    439440                pArgs->uEndRva = uRvaSeg + cbMapped;
    440                 Log2(("supLoadModuleCompileSegmentsCB: -> upgrade current protection\n"));
     441                Log2(("supLoadModuleCompileSegmentsCB: -> upgrade current protection, end %#x\n", pArgs->uEndRva));
    441442                return VINF_SUCCESS; /* Current segment was smaller than a page. */
    442443            }
     
    446447        {
    447448            /* Create a new segment for the common page with the combined protection. */
    448             Log2(("supLoadModuleCompileSegmentsCB: -> its complicated...\n"));
     449            Log2(("supLoadModuleCompileSegmentsCB: -> it's complicated...\n"));
    449450            pArgs->uEndRva &= ~(uint32_t)PAGE_OFFSET_MASK;
    450451            if (pArgs->uEndRva > pArgs->uStartRva)
     
    466467
    467468            uint32_t const cbCommon = PAGE_SIZE - (uRvaSeg & PAGE_OFFSET_MASK);
    468             if (cbCommon <= cbMapped)
     469            if (cbCommon >= cbMapped)
    469470            {
    470471                fProt |= pArgs->fProt;
     
    769770            SegArgs.uEndRva = (uint32_t)CalcArgs.cbImage; /* overflow is checked later */
    770771            if (SegArgs.uEndRva > SegArgs.uStartRva)
     772            {
     773                Log2(("supLoadModule:                  SUP Seg #%u: %#x LB %#x prot %#x\n",
     774                      SegArgs.iSegs, SegArgs.uStartRva, SegArgs.uEndRva - SegArgs.uStartRva, SegArgs.fProt));
    771775                SegArgs.iSegs++;
     776            }
    772777
    773778            const uint32_t offSymTab = RT_ALIGN_32(CalcArgs.cbImage, 8);
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