diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2014-03-27 21:58:58 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2014-03-27 21:58:58 +0000 |
commit | 9b1b20636dc73cfdd48b3c7a823889be75e67da5 (patch) | |
tree | 23d230486066ad1726198bd32e0d3e871dcb3d40 /sys/arch | |
parent | 7b95a4fea6da5383083952f4aa376b605505ff07 (diff) |
Make sure the HIBERNATE pages get reserved regardless of the memory layout.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/loongson/loongson/loongson2_machdep.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/loongson/loongson/loongson2_machdep.c b/sys/arch/loongson/loongson/loongson2_machdep.c index d1b4d18501a..5025ee9c83e 100644 --- a/sys/arch/loongson/loongson/loongson2_machdep.c +++ b/sys/arch/loongson/loongson/loongson2_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: loongson2_machdep.c,v 1.14 2013/06/02 21:46:04 pirofti Exp $ */ +/* $OpenBSD: loongson2_machdep.c,v 1.15 2014/03/27 21:58:57 miod Exp $ */ /* * Copyright (c) 2009, 2010 Miodrag Vallat. @@ -152,9 +152,6 @@ loongson2f_setup(u_long memlo, u_long memhi) if (memhi != 0) { /* do NOT stomp on exception area */ mem_layout[0].mem_first_page = atop(DDR_WINDOW_BASE) + 1; -#ifdef HIBERNATE - mem_layout[0].mem_first_page += HIBERNATE_RESERVED_PAGES; -#endif mem_layout[0].mem_last_page = atop(DDR_WINDOW_BASE) + memlo + memhi; loongson_dma_base = PCI_DDR_BASE ^ DDR_WINDOW_BASE; @@ -162,9 +159,12 @@ loongson2f_setup(u_long memlo, u_long memhi) /* do NOT stomp on exception area */ mem_layout[0].mem_first_page = atop(DDR_PHYSICAL_BASE) + 1; mem_layout[0].mem_last_page = atop(DDR_PHYSICAL_BASE) + - memlo + memhi; + memlo /* + memhi */; loongson_dma_base = PCI_DDR_BASE ^ DDR_PHYSICAL_BASE; } +#ifdef HIBERNATE + mem_layout[0].mem_first_page += HIBERNATE_RESERVED_PAGES; +#endif /* * Allow access to memory beyond 256MB, by programming the |