~ubuntu-branches/ubuntu/raring/virtualbox-ose/raring

« back to all changes in this revision

Viewing changes to src/VBox/Runtime/r0drv/solaris/vbi/i86pc/os/vbi.c

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-12-18 16:44:29 UTC
  • mfrom: (0.3.3 upstream) (0.4.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091218164429-jd34ccexpv5na11a
Tags: 3.1.2-dfsg-1ubuntu1
* Merge from Debian unstable (LP: #498219), remaining changes:
  - Disable update action
    - debian/patches/u01-disable-update-action.dpatch
  - VirtualBox should go in Accessories, not in System tools (LP: #288590)
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Add Launchpad integration
    - debian/control
    - debian/lpi-bug.xpm
    - debian/patches/u02-lp-integration.dpatch
* Fixes the following bugs:
  - Kernel module fails to build with Linux >= 2.6.32 (LP: #474625)
  - X.Org drivers need to be rebuilt against X-Server 1.7 (LP: #495935)
  - The *-source packages try to build the kernel modules even though the
    kernel headers aren't available (LP: #473334)
* Replace *-source packages with transitional packages for *-dkms.
* Adapt u01-disable-update-action.dpatch and u02-lp-integration.dpatch for
  new upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
186
186
 
187
187
/* End of v6 intro */
188
188
 
189
 
 
 
189
#if 0
190
190
int
191
191
_init(void)
192
192
{
 
193
    int err = vbi_init();
 
194
    if (!err)
 
195
        err = mod_install(&vbi_modlinkage);
 
196
        return (err);
 
197
}
 
198
#endif
 
199
 
 
200
int
 
201
vbi_init(void)
 
202
{
193
203
        int err;
194
204
 
195
205
        /*
265
275
                cmn_err(CE_NOTE, ":Thread structure sanity check failed! OS version mismatch.\n");
266
276
                return EINVAL;
267
277
        }
268
 
 
269
 
        err = mod_install(&vbi_modlinkage);
270
 
        if (err != 0)
271
 
                return (err);
272
 
 
273
278
        return (0);
274
279
}
275
280
 
 
281
#if 0
276
282
int
277
283
_fini(void)
278
284
{
288
294
{
289
295
        return (mod_info(&vbi_modlinkage, modinfop));
290
296
}
 
297
#endif
 
298
 
291
299
 
292
300
static ddi_dma_attr_t base_attr = {
293
301
        DMA_ATTR_V0,            /* Version Number */
658
666
}
659
667
 
660
668
int
661
 
vbi_lock_va(void *addr, size_t len, void **handle)
 
669
vbi_lock_va(void *addr, size_t len, int access, void **handle)
662
670
{
663
671
        faultcode_t err;
664
672
 
668
676
        *handle = NULL;
669
677
        if (!IS_KERNEL(addr)) {
670
678
                err = as_fault(VBIPROC()->p_as->a_hat, VBIPROC()->p_as,
671
 
                    (caddr_t)addr, len, F_SOFTLOCK, S_WRITE);
 
679
                    (caddr_t)addr, len, F_SOFTLOCK, access);
672
680
                if (err != 0) {
673
681
                        VBI_VERBOSE("vbi_lock_va() failed to lock");
674
682
                        return (-1);
679
687
 
680
688
/*ARGSUSED*/
681
689
void
682
 
vbi_unlock_va(void *addr, size_t len, void *handle)
 
690
vbi_unlock_va(void *addr, size_t len, int access, void *handle)
683
691
{
684
692
        if (!IS_KERNEL(addr))
685
693
                as_fault(VBIPROC()->p_as->a_hat, VBIPROC()->p_as,
686
 
                    (caddr_t)addr, len, F_SOFTUNLOCK, S_WRITE);
 
694
                    (caddr_t)addr, len, F_SOFTUNLOCK, access);
687
695
}
688
696
 
689
697
uint64_t