upstream changes: Enhancements in v5.01: New Features Added support for up to 2 TB of RAM on X64 CPUs Added experimental SMT support up to 32 cores (Press F2 to enable at startup) Added complete detection for memory controllers Added Motherboard Manufacturer & Model reporting Added CPU temperature reporting Added enhanced Fail Safe Mode (Press F1 at startup) Added support for Intel "Sandy Bridge-E" CPUs Added support for Intel "Ivy Bridge" CPUs Added preliminary support for Intel "Haswell" CPUs (Core 4th Gen) Added preliminary support for Intel "Haswell-ULT" CPUs Added support for AMD "Kabini" (K16) CPUs Added support for AMD "Bulldozer" CPUs Added support for AMD "Trinity" CPUs Added support for AMD E-/C-/G-/Z- "Bobcat" CPUs Added support for Intel Atom "Pineview" CPUs Added support for Intel Atom "Cedar Trail" CPUs Added SPD detection on most AMD Chipsets Bug Fixes Enforced Coreboot support Optimized run time for faster memory error detection Rewriten lots of memory timings detection cod Corrected bugs, bugs and more bugs (some could remain)
49 lines
1 KiB
Text
49 lines
1 KiB
Text
$NetBSD: patch-ab,v 1.5 2013/12/08 00:35:28 jakllsch Exp $
|
|
|
|
--- test.c.orig 2013-08-10 02:29:44.000000000 +0000
|
|
+++ test.c
|
|
@@ -14,7 +14,6 @@
|
|
#include "stdint.h"
|
|
#include "cpuid.h"
|
|
#include "smp.h"
|
|
-#include <sys/io.h>
|
|
|
|
extern struct cpu_ident cpu_id;
|
|
extern volatile int mstr_cpu;
|
|
@@ -29,6 +28,36 @@ void rand_seed( unsigned int seed1, unsi
|
|
ulong rand(int me);
|
|
void poll_errors();
|
|
|
|
+static inline void outb(unsigned char value, unsigned short int port)
|
|
+{
|
|
+ asm __volatile__ (
|
|
+ "outb %b0,%w1\n\t"
|
|
+ : :"a" (value), "Nd" (port)
|
|
+ );
|
|
+}
|
|
+
|
|
+static __inline void outb_p(unsigned char value, unsigned short int port)
|
|
+{
|
|
+ asm __volatile__ (
|
|
+ "outb %b0,%w1\n\t"
|
|
+ "outb %%al,$0x80\n\t"
|
|
+ : : "a" (value), "Nd" (port)
|
|
+ );
|
|
+}
|
|
+
|
|
+static __inline unsigned char inb_p(unsigned short int port)
|
|
+{
|
|
+ unsigned char v;
|
|
+
|
|
+ asm __volatile__ (
|
|
+ "inb %w1,%0\n\t"
|
|
+ "outb %%al,$0x80\n\t"
|
|
+ : "=a" (v)
|
|
+ : "Nd" (port)
|
|
+ );
|
|
+ return v;
|
|
+}
|
|
+
|
|
static inline ulong roundup(ulong value, ulong mask)
|
|
{
|
|
return (value + mask) & ~mask;
|