Changeset 39cea6a in mainline for arch/amd64/include/pm.h


Ignore:
Timestamp:
2006-04-13T17:38:03Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e185136
Parents:
897ad60
Message:

Cleanup pm.c and pm.h code on ia32 and amd64.
Add before_task_runs() and before_task_runs_arch() for each architecture.
Add ia32 and amd64 code to ensure I/O Permission Bitmap update.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/amd64/include/pm.h

    r897ad60 r39cea6a  
    6767#define DPL_USER        (PL_USER<<5)
    6868
    69 #define IO_MAP_BASE     (104)
     69#define TSS_BASIC_SIZE  104
    7070
    7171#ifndef __ASM__
     
    8383        unsigned base_24_31: 8;
    8484} __attribute__ ((packed));
     85typedef struct descriptor descriptor_t;
    8586
    8687struct tss_descriptor {
     
    8990        unsigned base_16_23: 8;
    9091        unsigned type: 4;
    91         unsigned  : 1;
     92        unsigned : 1;
    9293        unsigned dpl : 2;
    9394        unsigned present : 1;
     
    100101        unsigned  : 32;
    101102} __attribute__ ((packed));
     103typedef struct tss_descriptor tss_descriptor_t;
    102104
    103105struct idescriptor {
     
    113115        unsigned  : 32;
    114116} __attribute__ ((packed));
     117typedef struct idescriptor idescriptor_t;
    115118
    116119struct ptr_16_64 {
     
    118121        __u64 base;
    119122} __attribute__ ((packed));
     123typedef struct ptr_16_64 ptr_16_64_t;
    120124
    121125struct ptr_16_32 {
     
    123127        __u32 base;
    124128} __attribute__ ((packed));
     129typedef struct ptr_16_32 ptr_16_32_t;
    125130
    126131struct tss {
     
    142147        __u8 iomap[0x10000 + 1];        /* 64K + 1 terminating byte */
    143148} __attribute__ ((packed));
     149typedef struct tss tss_t;
    144150
    145 extern struct tss *tss_p;
     151extern tss_t *tss_p;
    146152
    147 extern struct descriptor gdt[];
    148 extern struct idescriptor idt[];
     153extern descriptor_t gdt[];
     154extern idescriptor_t idt[];
    149155
    150 extern struct ptr_16_64 gdtr;
    151 extern struct ptr_16_32 bootstrap_gdtr;
    152 extern struct ptr_16_32 protected_ap_gdtr;
     156extern ptr_16_64_t gdtr;
     157extern ptr_16_32_t bootstrap_gdtr;
     158extern ptr_16_32_t protected_ap_gdtr;
    153159
    154160extern void pm_init(void);
    155161
    156 extern void gdt_tss_setbase(struct descriptor *d, __address base);
    157 extern void gdt_tss_setlimit(struct descriptor *d, __u32 limit);
     162extern void gdt_tss_setbase(descriptor_t *d, __address base);
     163extern void gdt_tss_setlimit(descriptor_t *d, __u32 limit);
    158164
    159165extern void idt_init(void);
    160 extern void idt_setoffset(struct idescriptor *d, __address offset);
     166extern void idt_setoffset(idescriptor_t *d, __address offset);
    161167
    162 extern void tss_initialize(struct tss *t);
     168extern void tss_initialize(tss_t *t);
    163169
    164170#endif /* __ASM__ */
Note: See TracChangeset for help on using the changeset viewer.