1bf21cd93STycho Nightingale /* 2bf21cd93STycho Nightingale * This file and its contents are supplied under the terms of the 3bf21cd93STycho Nightingale * Common Development and Distribution License ("CDDL"), version 1.0. 4bf21cd93STycho Nightingale * You may only use this file in accordance with the terms of version 5bf21cd93STycho Nightingale * 1.0 of the CDDL. 6bf21cd93STycho Nightingale * 7bf21cd93STycho Nightingale * A full copy of the text of the CDDL should have accompanied this 8bf21cd93STycho Nightingale * source. A copy of the CDDL is also available via the Internet at 9bf21cd93STycho Nightingale * http://www.illumos.org/license/CDDL. 10bf21cd93STycho Nightingale */ 11bf21cd93STycho Nightingale 12bf21cd93STycho Nightingale /* 13bf21cd93STycho Nightingale * Copyright 2013 Pluribus Networks Inc. 14bf21cd93STycho Nightingale */ 15bf21cd93STycho Nightingale 16bf21cd93STycho Nightingale #ifndef _COMPAT_FREEBSD_AMD64_MACHINE_PARAM_H_ 17bf21cd93STycho Nightingale #define _COMPAT_FREEBSD_AMD64_MACHINE_PARAM_H_ 18bf21cd93STycho Nightingale 19bf21cd93STycho Nightingale #ifdef _KERNEL 20bf21cd93STycho Nightingale #define MAXCPU NCPU 21bf21cd93STycho Nightingale #endif /* _KERNEL */ 22bf21cd93STycho Nightingale 23bf21cd93STycho Nightingale #define PAGE_SHIFT 12 /* LOG2(PAGE_SIZE) */ 24bf21cd93STycho Nightingale #define PAGE_SIZE (1<<PAGE_SHIFT) /* bytes/page */ 25bf21cd93STycho Nightingale #define PAGE_MASK (PAGE_SIZE-1) 26bf21cd93STycho Nightingale 27bf21cd93STycho Nightingale /* Size of the level 1 page table units */ 28bf21cd93STycho Nightingale #define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t))) 29bf21cd93STycho Nightingale 30bf21cd93STycho Nightingale /* Size of the level 2 page directory units */ 31bf21cd93STycho Nightingale #define NPDEPG (PAGE_SIZE/(sizeof (pd_entry_t))) 32bf21cd93STycho Nightingale 33bf21cd93STycho Nightingale /* Size of the level 3 page directory pointer table units */ 34bf21cd93STycho Nightingale #define NPDPEPG (PAGE_SIZE/(sizeof (pdp_entry_t))) 35bf21cd93STycho Nightingale 36bf21cd93STycho Nightingale /* Size of the level 4 page-map level-4 table units */ 37bf21cd93STycho Nightingale #define NPML4EPG (PAGE_SIZE/(sizeof (pml4_entry_t))) 38bf21cd93STycho Nightingale 394c87aefeSPatrick Mooney #define CACHE_LINE_SIZE 64 404c87aefeSPatrick Mooney 41bf21cd93STycho Nightingale #endif /* _COMPAT_FREEBSD_AMD64_MACHINE_PARAM_H_ */ 42