j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: mcayland Date: Mon Dec 16 19:06:16 2013 New Revision: 1241 URL: http://tracker.coreboot.org/trac/openbios/changeset/1241
Log: Move PAGE_SHIFT into architecture-specific header files
This commit moves the declaration of PAGE_SHIFT (the number of bits in a page) into architecture-specific header files. This is required for a subsequent commit to ensure that OFMEM can correctly unmap pages on architectures where PAGE_SHIFT != 12 (4K page size).
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Modified: trunk/openbios-devel/include/arch/amd64/types.h trunk/openbios-devel/include/arch/ppc/types.h trunk/openbios-devel/include/arch/sparc32/types.h trunk/openbios-devel/include/arch/sparc64/types.h trunk/openbios-devel/include/arch/x86/types.h trunk/openbios-devel/include/libopenbios/ofmem.h
Modified: trunk/openbios-devel/include/arch/amd64/types.h ============================================================================== --- trunk/openbios-devel/include/arch/amd64/types.h Mon Dec 16 19:06:13 2013 (r1240) +++ trunk/openbios-devel/include/arch/amd64/types.h Mon Dec 16 19:06:16 2013 (r1241) @@ -50,6 +50,8 @@
#define BITS 64
+#define PAGE_SHIFT 12 + /* size named types */
typedef unsigned char u8;
Modified: trunk/openbios-devel/include/arch/ppc/types.h ============================================================================== --- trunk/openbios-devel/include/arch/ppc/types.h Mon Dec 16 19:06:13 2013 (r1240) +++ trunk/openbios-devel/include/arch/ppc/types.h Mon Dec 16 19:06:16 2013 (r1241) @@ -79,6 +79,8 @@
#define BITS 32
+#define PAGE_SHIFT 12 + /* size named types */
typedef unsigned char u8;
Modified: trunk/openbios-devel/include/arch/sparc32/types.h ============================================================================== --- trunk/openbios-devel/include/arch/sparc32/types.h Mon Dec 16 19:06:13 2013 (r1240) +++ trunk/openbios-devel/include/arch/sparc32/types.h Mon Dec 16 19:06:16 2013 (r1241) @@ -76,6 +76,8 @@
#define BITS 32
+#define PAGE_SHIFT 12 + /* size named types */
typedef unsigned char u8;
Modified: trunk/openbios-devel/include/arch/sparc64/types.h ============================================================================== --- trunk/openbios-devel/include/arch/sparc64/types.h Mon Dec 16 19:06:13 2013 (r1240) +++ trunk/openbios-devel/include/arch/sparc64/types.h Mon Dec 16 19:06:16 2013 (r1241) @@ -85,6 +85,8 @@
#define BITS 64
+#define PAGE_SHIFT 12 + /* size named types */
typedef unsigned char u8;
Modified: trunk/openbios-devel/include/arch/x86/types.h ============================================================================== --- trunk/openbios-devel/include/arch/x86/types.h Mon Dec 16 19:06:13 2013 (r1240) +++ trunk/openbios-devel/include/arch/x86/types.h Mon Dec 16 19:06:16 2013 (r1241) @@ -52,6 +52,8 @@
#define BITS 32
+#define PAGE_SHIFT 12 + /* size named types */
typedef unsigned char u8;
Modified: trunk/openbios-devel/include/libopenbios/ofmem.h ============================================================================== --- trunk/openbios-devel/include/libopenbios/ofmem.h Mon Dec 16 19:06:13 2013 (r1240) +++ trunk/openbios-devel/include/libopenbios/ofmem.h Mon Dec 16 19:06:16 2013 (r1241) @@ -127,9 +127,6 @@ extern phandle_t s_phandle_memory; extern phandle_t s_phandle_mmu;
-/* Currently the same for all architectures */ -#define PAGE_SHIFT 12 - #define PAGE_SIZE (1 << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE - 1)) #define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK)