Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/arm/physmem.c
Show All 23 Lines | |||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
*/ | */ | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include "opt_acpi.h" | |||||
#include "opt_ddb.h" | #include "opt_ddb.h" | ||||
/* | /* | ||||
* Routines for describing and initializing anything related to physical memory. | * Routines for describing and initializing anything related to physical memory. | ||||
*/ | */ | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <vm/vm.h> | #include <vm/vm.h> | ||||
#include <machine/md_var.h> | #include <machine/md_var.h> | ||||
#include <arm/include/physmem.h> | #include <arm/include/physmem.h> | ||||
/* | /* | ||||
* These structures are used internally to keep track of regions of physical | * These structures are used internally to keep track of regions of physical | ||||
* ram, and regions within the physical ram that need to be excluded. An | * ram, and regions within the physical ram that need to be excluded. An | ||||
* exclusion region can be excluded from crash dumps, from the vm pool of pages | * exclusion region can be excluded from crash dumps, from the vm pool of pages | ||||
* that can be allocated, or both, depending on the exclusion flags associated | * that can be allocated, or both, depending on the exclusion flags associated | ||||
* with the region. | * with the region. | ||||
*/ | */ | ||||
#ifdef DEV_ACPI | |||||
#define MAX_HWCNT 32 /* ACPI needs more regions */ | |||||
#define MAX_EXCNT 32 | |||||
#else | |||||
#define MAX_HWCNT 16 | #define MAX_HWCNT 16 | ||||
#define MAX_EXCNT 16 | #define MAX_EXCNT 16 | ||||
#endif | |||||
#if defined(__arm__) | #if defined(__arm__) | ||||
#define MAX_PHYS_ADDR 0xFFFFFFFFull | #define MAX_PHYS_ADDR 0xFFFFFFFFull | ||||
#define pm_btop(x) arm32_btop(x) | #define pm_btop(x) arm32_btop(x) | ||||
#elif defined(__aarch64__) | #elif defined(__aarch64__) | ||||
#define MAX_PHYS_ADDR 0xFFFFFFFFFFFFFFFFull | #define MAX_PHYS_ADDR 0xFFFFFFFFFFFFFFFFull | ||||
#define pm_btop(x) arm64_btop(x) | #define pm_btop(x) arm64_btop(x) | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 361 Lines • Show Last 20 Lines |