summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/cpu/x86/smm.h4
-rw-r--r--src/include/string.h12
-rw-r--r--src/include/types.h25
3 files changed, 38 insertions, 3 deletions
diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h
index 72a4782084..1eef6382c7 100644
--- a/src/include/cpu/x86/smm.h
+++ b/src/include/cpu/x86/smm.h
@@ -1,7 +1,7 @@
/*
* This file is part of the coreboot project.
*
- * Copyright (C) 2008 coresystems GmbH
+ * Copyright (C) 2008-2009 coresystems GmbH
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,8 +18,6 @@
*/
-typedef uint64_t u64;
-
/* AMD64 SMM State-Save Area
* starts @ 0x7e00
*/
diff --git a/src/include/string.h b/src/include/string.h
index 25e741e810..d82b3ac1c4 100644
--- a/src/include/string.h
+++ b/src/include/string.h
@@ -81,6 +81,18 @@ static inline int strcmp(const char *s1, const char *s2)
return r;
}
+static inline int strncmp(const char *s1, const char *s2, int maxlen)
+{
+ int i;
+
+ for (i = 0; i < maxlen; i++) {
+ if (s1[i] != s2[i])
+ return s1[i] - s2[i];
+ }
+
+ return 0;
+}
+
static inline int isspace(int c)
{
switch (c) {
diff --git a/src/include/types.h b/src/include/types.h
new file mode 100644
index 0000000000..f433194473
--- /dev/null
+++ b/src/include/types.h
@@ -0,0 +1,25 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2009 coresystems GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __TYPES_H
+#define __TYPES_H
+#include <stdint.h>
+#include <stddef.h>
+#endif
+