vgabios: Add scrolling for linear (packed pixel) graphics mode.
[seabios.git] / src / cmos.h
index 4087cfc2b714892f995558ad10cb4420ecec4a57..e4b64623316814732daeab07ba1dc2635335ac45 100644 (file)
@@ -2,12 +2,10 @@
 //
 // Copyright (C) 2008  Kevin O'Connor <kevin@koconnor.net>
 //
-// 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
@@ -41,6 +39,7 @@
 #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
 #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);
 }
@@ -60,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