#define CPUID1_EDX_FPU (1L) /* FPU presence */
#define CPUID1_EDX_PSE (1L << 3) /* Page Size Extension */
#define CPUID1_EDX_SYSENTER (1L << 11) /* Intel SYSENTER */
+#define CPUID1_EDX_PAE (1L << 6) /* Physical Address Extension */
#define CPUID1_EDX_PGE (1L << 13) /* Page Global (bit) Enable */
#define CPUID1_EDX_APIC_ON_CHIP (1L << 9) /* APIC is present on the chip */
#define CPUID1_EDX_TSC (1L << 4) /* Timestamp counter present */
#define _CPUF_I386_SYSENTER 16 /* Intel SYSENTER instrs */
#define _CPUF_I386_SYSCALL 17 /* AMD SYSCALL instrs */
+#define _CPUF_I386_PAE 18 /* Page Address Extension */
+
int _cpufeature(int featureno);
#endif
.include "system/Makefile.inc"
+.if ${MKPAE:Uno} != "no"
+CPPFLAGS+= -DPAE=1
+.endif
+
.ifdef CONFIG_SMP
SRCS+= smp.c
.endif
#include <sys/reboot.h>
#include <assert.h>
#include <signal.h>
-#include <machine/vm.h>
#include <minix/u64.h>
pgeok = _cpufeature(_CPUF_I386_PGE);
+#ifdef PAE
+ if(_cpufeature(_CPUF_I386_PAE) == 0)
+ panic("kernel built with PAE support, CPU seems to lack PAE support?\n");
+#endif
+
cr0= read_cr0();
cr4= read_cr4();
{
/* Display the MINIX startup banner. */
printf("\nMINIX %s. "
+#ifdef PAE
+"(PAE) "
+#endif
#ifdef _VCS_REVISION
"(" _VCS_REVISION ")\n"
#endif
switch(cpufeature) {
case _CPUF_I386_PSE:
return edx & CPUID1_EDX_PSE;
+ case _CPUF_I386_PAE:
+ return edx & CPUID1_EDX_PAE;
case _CPUF_I386_PGE:
return edx & CPUID1_EDX_PGE;
case _CPUF_I386_APIC_ON_CHIP:
typedef struct st_alloc_pages {
int num_pages;
void *virt_addr;
- uint32_t phys_addr;
+ phys_bytes phys_addr;
struct st_alloc_pages *previous;
} st_alloc_pages;
LDFLAGS+= -T ${.CURDIR}/arch/${MACHINE_ARCH}/vm.lds
.endif
+.if ${MKPAE:Uno} != "no"
+CPPFLAGS+= -DPAE=1
+.endif
+
DPADD+= ${LIBSYS} ${LIBEXEC}
LDADD+= -lsys -lexec
MKSYSDEBUG MKLIVEUPDATE MKLWIP MKLLVMCMDS
.if (${MACHINE_ARCH} == "i386")
_MKVARS.yes+= \
- MKWATCHDOG MKACPI MKAPIC MKDEBUGREG MKINSTALLBOOT MKPCI
+ MKWATCHDOG MKACPI MKPAE MKAPIC MKDEBUGREG MKINSTALLBOOT MKPCI
.endif
.for var in ${_MKVARS.yes}
MKIMAGEONLY MKSMALL MKBITCODE MKMAGIC MKASR MKSRC
.if !empty(MACHINE_ARCH:Mearm*)
_MKVARS.no+= \
- MKWATCHDOG MKACPI MKAPIC MKDEBUGREG MKINSTALLBOOT MKPCI
+ MKWATCHDOG MKPAE MKACPI MKAPIC MKDEBUGREG MKINSTALLBOOT MKPCI
.endif
.for var in ${_MKVARS.no}
#MINIX-specific vars
.for var in \
- USE_WATCHDOG USE_ACPI USE_APIC USE_DEBUGREG USE_SYSDEBUG \
+ USE_WATCHDOG USE_ACPI USE_PAE USE_APIC USE_DEBUGREG USE_SYSDEBUG \
USE_LIVEUPDATE USE_PCI USE_BITCODE USE_MAGIC USE_ASR
.if (${${var:S/USE_/MK/}} == "no")
${var}:= no