X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fcmos.h;h=e4b64623316814732daeab07ba1dc2635335ac45;hb=refs%2Fheads%2Fcoreboot;hp=fe765c1aa8d93b0cf158c10707c3204f1bcc6d0f;hpb=15aee2e806cfca315835ecc7a2239e289eb36724;p=seabios.git diff --git a/src/cmos.h b/src/cmos.h index fe765c1..e4b6462 100644 --- a/src/cmos.h +++ b/src/cmos.h @@ -2,12 +2,10 @@ // // Copyright (C) 2008 Kevin O'Connor // -// This file may be distributed under the terms of the GNU GPLv3 license. +// This file may be distributed under the terms of the GNU LGPLv3 license. #ifndef __CMOS_H #define __CMOS_H -#include "ioport.h" // inb, outb - #define CMOS_RTC_SECONDS 0x00 #define CMOS_RTC_SECONDS_ALARM 0x01 #define CMOS_RTC_MINUTES 0x02 @@ -30,18 +28,18 @@ #define CMOS_DISK_DRIVE2_TYPE 0x1a #define CMOS_DISK_DRIVE1_CYL 0x1b #define CMOS_DISK_DRIVE2_CYL 0x24 -#define CMOS_BIOS_CONFIG 0x2d -#define CMOS_EXTMEM_LOW 0x30 -#define CMOS_EXTMEM_HIGH 0x31 +#define CMOS_MEM_EXTMEM_LOW 0x30 +#define CMOS_MEM_EXTMEM_HIGH 0x31 #define CMOS_CENTURY 0x32 -#define CMOS_EXTMEM2_LOW 0x34 -#define CMOS_EXTMEM2_HIGH 0x35 +#define CMOS_MEM_EXTMEM2_LOW 0x34 +#define CMOS_MEM_EXTMEM2_HIGH 0x35 #define CMOS_BIOS_BOOTFLAG1 0x38 #define CMOS_BIOS_DISKTRANSFLAG 0x39 #define CMOS_BIOS_BOOTFLAG2 0x3d - -// CMOS_STATUS_B bitdefs -#define CSB_EN_ALARM_IRQ (1<<5) +#define CMOS_MEM_HIGHMEM_LOW 0x5b +#define CMOS_MEM_HIGHMEM_MID 0x5c +#define CMOS_MEM_HIGHMEM_HIGH 0x5d +#define CMOS_BIOS_SMP_COUNT 0x5f // CMOS_FLOPPY_DRIVE_TYPE bitdefs #define CFD_NO_DRIVE 0 @@ -51,9 +49,14 @@ #define CFD_144MB 4 #define CFD_288MB 5 +#ifndef __ASSEMBLY__ + +#include "ioport.h" // inb, outb + static inline u8 inb_cmos(u8 reg) { + reg |= NMI_DISABLE_BIT; outb(reg, PORT_CMOS_INDEX); return inb(PORT_CMOS_DATA); } @@ -61,8 +64,11 @@ inb_cmos(u8 reg) static inline void outb_cmos(u8 val, u8 reg) { + reg |= NMI_DISABLE_BIT; outb(reg, PORT_CMOS_INDEX); outb(val, PORT_CMOS_DATA); } +#endif // !__ASSEMBLY__ + #endif // cmos.h