Changeset 99d6fd0 in mainline for kernel/arch/amd64/src/ddi/ddi.c


Ignore:
Timestamp:
2009-03-13T12:57:15Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
421c833
Parents:
0160b1c8
Message:

cleanup pm.h and related stuff (no change in functionality)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/ddi/ddi.c

    r0160b1c8 r99d6fd0  
    5858{
    5959        count_t bits;
    60 
     60       
    6161        bits = ioaddr + size;
    6262        if (bits > IO_PORTS)
    6363                return ENOENT;
    64 
     64       
    6565        if (task->arch.iomap.bits < bits) {
    6666                bitmap_t oldiomap;
    6767                uint8_t *newmap;
    68        
     68               
    6969                /*
    7070                 * The I/O permission bitmap is too small and needs to be grown.
     
    7878                    task->arch.iomap.bits);
    7979                bitmap_initialize(&task->arch.iomap, newmap, bits);
    80 
     80               
    8181                /*
    8282                 * Mark the new range inaccessible.
     
    8484                bitmap_set_range(&task->arch.iomap, oldiomap.bits,
    8585                    bits - oldiomap.bits);
    86 
     86               
    8787                /*
    8888                 * In case there really existed smaller iomap,
    8989                 * copy its contents and deallocate it.
    90                  */             
     90                 */
    9191                if (oldiomap.bits) {
    9292                        bitmap_copy(&task->arch.iomap, &oldiomap,
     
    9595                }
    9696        }
    97 
     97       
    9898        /*
    9999         * Enable the range and we are done.
    100100         */
    101101        bitmap_clear_range(&task->arch.iomap, (index_t) ioaddr, (count_t) size);
    102 
     102       
    103103        /*
    104104         * Increment I/O Permission bitmap generation counter.
    105105         */
    106106        task->arch.iomapver++;
    107 
     107       
    108108        return 0;
    109109}
     
    123123        tss_descriptor_t *tss_desc;
    124124        count_t ver;
    125 
     125       
    126126        /* First, copy the I/O Permission Bitmap. */
    127127        spinlock_lock(&TASK->lock);
     
    141141        }
    142142        spinlock_unlock(&TASK->lock);
    143 
     143       
    144144        /*
    145145         * Second, adjust TSS segment limit.
     
    152152       
    153153        /*
    154         * Before we load new TSS limit, the current TSS descriptor
    155         * type must be changed to describe inactive TSS.
    156         */
    157         tss_desc = (tss_descriptor_t *) &gdt_p[TSS_DES];
     154        * Before we load new TSS limit, the current TSS descriptor
     155        * type must be changed to describe inactive TSS.
     156        */
     157        tss_desc = (tss_descriptor_t *) &gdt_p[TSS_DES];
    158158        tss_desc->type = AR_TSS;
    159159        tr_load(gdtselector(TSS_DES));
Note: See TracChangeset for help on using the changeset viewer.