#ifndef __nb_h__ #define __nb_h__ /* North Bridge registers */ struct NbReg { Relative > addr; Relative > data; }; #define nbReg ((NbReg*)0x24) /* struct Nb8 { U8 justForPointerArithmetic; inline void operator =(U8 v) { nbReg->addr=(U8)this; nbReg->data8=v; } inline operator U8() { nbReg->addr=(U8)this; return nbReg->data8; } }; */ struct Nb16 { // les index on un increment de un // malgre une taille de data de 2 octets U8 justForPointerArithmetic; inline void operator =(U16 v) { nbReg->addr=(U16)(U32)this; nbReg->data=v; } inline operator U16() { nbReg->addr=(U16)(U32)this; return nbReg->data; } }; struct NbRegs { Relative version; Relative programmableRegion1; Relative programmableRegion2; Relative programmableRegion3; Relative programmableRegion4; Relative programmableRegionControl; Relative cacheabilityOverride; Relative backoffControl; Relative smmControl; Relative processorControl; Relative writeFifoControl; Relative pciControl; Relative clockSkewAdjust; Relative snoopControl; Relative arbiterControl; Relative pciWriteFifoControl; Relative shadowRamReadEnable; Relative shadowRamWriteEnable; struct Bank { Relative control; Relative timing; }; RelativeRef banks; Relative bank0Control; Relative bank0Timing; Relative bank1Control; Relative bank1Timing; Relative bank2Control; Relative bank2Timing; Relative bank3Control; Relative bank3Timing; Relative dramConfiguration1; Relative dramConfiguration2; Relative dramRefresh; Relative sdramModeProgram; Relative sdramModeProgramEx; Relative sdramSlewControl; Relative clockControl; Relative clockControl2; Relative cpuSync; }; #define nbRegs ((NbRegs*)0) #endif /* __nb_h__ */