spi/amd64: Add CPUID helpers
Signed-off-by: Ian Moffett <ian@mirocom.org>
This commit is contained in:
@@ -6,3 +6,4 @@
|
|||||||
*.o
|
*.o
|
||||||
/var
|
/var
|
||||||
/usr/src/boot/stand
|
/usr/src/boot/stand
|
||||||
|
/usr/src/sp1/head/target
|
||||||
|
|||||||
@@ -10,7 +10,12 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: common $(ARCH)
|
all: target common $(ARCH)
|
||||||
|
|
||||||
|
.PHONY: target
|
||||||
|
target:
|
||||||
|
mkdir -p head/target/machine/
|
||||||
|
rsync -avr head/$(ARCH)/*.h head/target/machine/
|
||||||
|
|
||||||
.PHONY: common
|
.PHONY: common
|
||||||
common:
|
common:
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ LD = \
|
|||||||
CFLAGS = \
|
CFLAGS = \
|
||||||
$(SYS_CFLAGS) \
|
$(SYS_CFLAGS) \
|
||||||
-I../../head \
|
-I../../head \
|
||||||
|
-I../../sp1/head/target \
|
||||||
-I../../sp1/head \
|
-I../../sp1/head \
|
||||||
-D_KERNEL
|
-D_KERNEL
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ CC = ../../../../$(SYS_CC)
|
|||||||
CFLAGS = \
|
CFLAGS = \
|
||||||
$(SYS_CFLAGS) \
|
$(SYS_CFLAGS) \
|
||||||
-I../head \
|
-I../head \
|
||||||
|
-I../head/target/ \
|
||||||
-I../../head \
|
-I../../head \
|
||||||
-I../ext/flanterm/src/ \
|
-I../ext/flanterm/src/ \
|
||||||
-D_KERNEL \
|
-D_KERNEL \
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2026, Mirocom Laboratories
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* The following sources are CONFIDENTIAL and PROPRIETARY
|
||||||
|
* property of Mirocom Laboratories. Unauthorized copying,
|
||||||
|
* use, distribution or modification of this file, in whole
|
||||||
|
* and in part, is strictly prohibited without the prior written
|
||||||
|
* consent from Mirocom Laboratories.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _MACHINE_CPUID_H_
|
||||||
|
#define _MACHINE_CPUID_H_ 1
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
|
#define __cpuid(level, a, b, c, d) \
|
||||||
|
__asmv("cpuid\n\t" \
|
||||||
|
: "=a" (a), "=b" (b), "=c" (c), "=d" (d) \
|
||||||
|
: "0" (level))
|
||||||
|
|
||||||
|
#endif /* !_MACHINE_CPUID_H_ */
|
||||||
Reference in New Issue
Block a user