mm/mtrr: Gate to x86 only

This commit is contained in:
mintsuki 2023-11-14 07:35:47 +01:00
parent 54f3118f4c
commit a7bac25397
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,5 @@
#if defined (__x86_64__) || defined (__i386__)
#include <stdint.h>
#include <stddef.h>
#include <mm/mtrr.h>
@ -138,3 +140,5 @@ void mtrr_restore(void) {
/* restore old value of cr0 */
asm volatile ("mov %0, %%cr0" :: "r"(old_cr0) : "memory");
}
#endif

View File

@ -1,7 +1,11 @@
#ifndef __MM__MTRR_H__
#define __MM__MTRR_H__
#if defined (__x86_64__) || defined (__i386__)
void mtrr_save(void);
void mtrr_restore(void);
#endif
#endif