gdt.h
src/sys/include/sys/idt.h
src/sys/init/main.c
src/sys/isa/atkbd.c
src/sys/isa/fdc.c
src/sys/isa/mouse.c
src/sys/kernel/sched.c
src/sys/pci/lnc.c
src/sys/sys/idt.c
src/sys/pci/lnc.c
src/sys/kernel/sched.c
src/sys/include/sys/idt.h
src/sys/init/main.c
src/sys/include/sys/gdt.h
src/sys/isa/ne2k.c
src/sys/isa/atkbd.c
src/sys/include/ubixos/init.h
src/sys/sys/idt.c
src/sys/isa/fdc.c
src/sys/isa/mouse.c
descriptorTableUnion
gdtDescriptor
gdtGate
dAcc
0x100
dBig
0x40
ubixDescriptorTable
dBiglim
0x80
ubixDescriptorTable
dBusy
0xB00
dCall
0x0C00
dCode
0x1800
ubixDescriptorTable
dConform
0x400
dData
0x1000
ubixDescriptorTable
dDpl0
0x0000
atkbd_init
idt_init
ne2k_init
dDpl1
0x2000
dDpl2
0x4000
dDpl3
0x6000
idt_init
initLNC
mouseInit
ubixDescriptorTable
dEexdown
0x400
dInt
0x0E00
atkbd_init
fdc_init
idt_init
initLNC
mouseInit
ne2k_init
dLdt
0x200
ubixDescriptorTable
dNpresent
0x8000
dPresent
0x8000
atkbd_init
fdc_init
idt_init
initLNC
mouseInit
ne2k_init
dRead
0x200
ubixDescriptorTable
dTask
0x500
idt_init
dTrap
0x0F00
idt_init
dTss
0x900
ubixDescriptorTable
dWrite
0x200
ubixDescriptorTable
ubixDescriptorTable
name
length
union descriptorTableUnion name[length] =
ubixGateDescriptor
offset
selector
control
{gate: {(offset & 0xffff), selector, \ (control+dPresent), (offset >> 16) }}
ubixStandardDescriptor
base
limit
control
{descriptor: \ {(limit & 0xffff), \ (base & 0xffff), \ ((base >> 16) & 0xff), \ ((control+dPresent) >> 8), \ (limit >> 16), \ ((control & 0xff) >> 4), \ (base >> 24)}}
ubixDescriptorTable
gdtGate struct gdtGate packed packed
gdtDescriptor struct gdtDescriptor packed packed
descriptorTableUnion union descriptorTableUnion ubixGDT[9] [9] ubixGDT

    /*****************************************************************************************
    Copyright(c)2002-2004TheUbixOSProject
    Allrightsreserved.

    Redistributionanduseinsourceandbinaryforms,withorwithoutmodification,are
    permittedprovidedthatthefollowingconditionsaremet:

    Redistributionsofsourcecodemustretaintheabovecopyrightnotice,thislistof
    conditions,thefollowingdisclaimerandthelistofauthors.Redistributionsinbinary
    formmustreproducetheabovecopyrightnotice,thislistofconditions,thefollowing
    disclaimerandthelistofauthorsinthedocumentationand/orothermaterialsprovided
    withthedistribution.NeitherthenameoftheUbixOSProjectnorthenamesofits
    contributorsmaybeusedtoendorseorpromoteproductsderivedfromthissoftware
    withoutspecificpriorwrittenpermission.

    THISSOFTWAREISPROVIDEDBYTHECOPYRIGHTHOLDERSANDCONTRIBUTORS"ASIS"ANDANY
    EXPRESSORIMPLIEDWARRANTIES,INCLUDING,BUTNOTLIMITEDTO,THEIMPLIEDWARRANTIESOF
    MERCHANTABILITYANDFITNESSFORAPARTICULARPURPOSEAREDISCLAIMED.INNOEVENTSHALL
    THECOPYRIGHTOWNERORCONTRIBUTORSBELIABLEFORANYDIRECT,INDIRECT,INCIDENTAL,
    SPECIAL,EXEMPLARY,ORCONSEQUENTIALDAMAGES(INCLUDING,BUTNOTLIMITEDTO,PROCUREMENT
    OFSUBSTITUTEGOODSORSERVICES;LOSSOFUSE,DATA,ORPROFITS;ORBUSINESSINTERRUPTION)
    HOWEVERCAUSEDANDONANYTHEORYOFLIABILITY,WHETHERINCONTRACT,STRICTLIABILITY,OR
    TORT(INCLUDINGNEGLIGENCEOROTHERWISE)ARISINGINANYWAYOUTOFTHEUSEOFTHIS
    SOFTWARE,EVENIFADVISEDOFTHEPOSSIBILITYOFSUCHDAMAGE.

    $Id: gdt_8h.xml 88 2016-01-12 00:11:29Z reddawg $

    *****************************************************************************************/

    #ifndef_GDT_H
    #define_GDT_H

    /*DescriptorDefinitions*/
    #definedCall0x0C00/*386CallGate*/
    #definedCode0x1800/*CodeSegment*/
    #definedData0x1000/*DataSegment*/
    #definedInt0x0E00/*386InterruptGate*/
    #definedLdt0x200/*LocalDescriptorTable(LDT)*/
    #definedTask0x500/*Taskgate*/
    #definedTrap0x0F00/*386TrapGate*/
    #definedTss0x900/*TaskStateSegment(TSS)*/

    /*DescriptorOptions*/
    #definedDpl30x6000/*DPL3ormaskforDPL*/
    #definedDpl20x4000/*DPL2ormaskforDPL*/
    #definedDpl10x2000/*DPL1ormaskforDPL*/
    #definedDpl00x0000/*DPL0ormaskforDPL*/
    #definedPresent0x8000/*Present*/
    #definedNpresent0x8000/*NotPresent*/
    #definedAcc0x100/*Accessed(DataorCode)*/
    #definedWrite0x200/*Writable(Datasegmentsonly)*/
    #definedRead0x200/*Readable(Codesegmentsonly)*/
    #definedBusy0xB00/*Busy(TSSonly)was200*/
    #definedEexdown0x400/*Expanddown(Datasegmentsonly)*/
    #definedConform0x400/*Conforming(Codesegmentsonly)*/
    #definedBig0x40/*Defaultto32bitmode*/
    #definedBiglim0x80/*Limitisin4Kunits*/

    /*GDTDescriptor*/
    structgdtDescriptor{
    unsignedshortlimitLow;/*Limit0..15*/
    unsignedshortbaseLow;/*Base0..15*/
    unsignedcharbaseMed;/*Base16..23*/
    unsignedcharaccess;/*AccessByte*/
    unsignedintlimitHigh:4;/*Limit16..19*/
    unsignedintgranularity:4;/*Granularity*/
    unsignedcharbaseHigh;/*Base24..31*/
    }__attribute__((packed));

    structgdtGate{
    unsignedshortoffsetLow;/*Offset0..15*/
    unsignedshortselector;/*Selector*/
    unsignedshortaccess;/*AccessFlags*/
    unsignedshortoffsetHigh;/*Offset16..31*/
    }__attribute__((packed));

    uniondescriptorTableUnion{
    structgdtDescriptordescriptor;/*Normaldescriptor*/
    structgdtGategate;/*Gatedescriptor*/
    unsignedlongdummy;/*Anyotherinfo*/
    };

    #defineubixDescriptorTable(name,length)uniondescriptorTableUnionname[length]=
    #defineubixStandardDescriptor(base,limit,control){descriptor:\
    {(limit&0xffff),\
    (base&0xffff),\
    ((base>>16)&0xff),\
    ((control+dPresent)>>8),\
    (limit>>16),\
    ((control&0xff)>>4),\
    (base>>24)}}
    #defineubixGateDescriptor(offset,selector,control){gate:{(offset&0xffff),selector,\
    (control+dPresent),(offset>>16)}}

    externuniondescriptorTableUnionubixGDT[9];

    #endif

    /***
    $Log: gdt_8h.xml,v $
    Revision 1.6  2006/12/19 14:12:51  reddawg
    rtld-elf almost workign

    Revision1.1.1.12006/06/0112:46:15reddawg
    ubix2

    Revision1.22005/10/1200:13:37reddawg
    Removed

    Revision1.1.1.12005/09/2617:23:52reddawg
    nomessage

    Revision1.52004/08/1516:47:49reddawg
    Fixed

    Revision1.42004/07/2220:53:07reddawg
    atkbd:fixedproblem

    Revision1.32004/05/2115:12:17reddawg
    Cleanedup

    END
    ***/