From 90414ef38b1f32b5b844e1fc27d30bd6d229f5de Mon Sep 17 00:00:00 2001 From: Andrea Arcangeli Date: Tue, 8 Oct 2013 17:07:23 +0200 Subject: [PATCH 8/8] allow >1TB of RAM RH-Author: Andrea Arcangeli Message-id: <1381252043-13480-2-git-send-email-aarcange@redhat.com> Patchwork-id: 54785 O-Subject: [RHEL-7.0 seabios PATCH] allow >1TB of RAM Bugzilla: 1016974 RH-Acked-by: Paolo Bonzini RH-Acked-by: Gleb Natapov RH-Acked-by: Laszlo Ersek Receive bits 40-48 from qemu to setup e820 maps with more than 1TB of ram. Signed-off-by: Andrea Arcangeli --- src/cmos.h | 7 ++++--- src/post.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) Signed-off-by: Miroslav Rezanina --- src/cmos.h | 7 ++++--- src/post.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/cmos.h b/src/cmos.h index e4b6462..e810534 100644 --- a/src/cmos.h +++ b/src/cmos.h @@ -36,9 +36,10 @@ #define CMOS_BIOS_BOOTFLAG1 0x38 #define CMOS_BIOS_DISKTRANSFLAG 0x39 #define CMOS_BIOS_BOOTFLAG2 0x3d -#define CMOS_MEM_HIGHMEM_LOW 0x5b -#define CMOS_MEM_HIGHMEM_MID 0x5c -#define CMOS_MEM_HIGHMEM_HIGH 0x5d +#define CMOS_MEM_HIGHMEM_16 0x5b +#define CMOS_MEM_HIGHMEM_24 0x5c +#define CMOS_MEM_HIGHMEM_32 0x5d +#define CMOS_MEM_HIGHMEM_40 0x5e #define CMOS_BIOS_SMP_COUNT 0x5f // CMOS_FLOPPY_DRIVE_TYPE bitdefs diff --git a/src/post.c b/src/post.c index f3b56b8..737c16d 100644 --- a/src/post.c +++ b/src/post.c @@ -122,9 +122,10 @@ ram_probe(void) add_e820(0, rs, E820_RAM); // Check for memory over 4Gig - u64 high = ((inb_cmos(CMOS_MEM_HIGHMEM_LOW) << 16) - | ((u32)inb_cmos(CMOS_MEM_HIGHMEM_MID) << 24) - | ((u64)inb_cmos(CMOS_MEM_HIGHMEM_HIGH) << 32)); + u64 high = ((inb_cmos(CMOS_MEM_HIGHMEM_16) << 16) + | ((u32)inb_cmos(CMOS_MEM_HIGHMEM_24) << 24) + | ((u64)inb_cmos(CMOS_MEM_HIGHMEM_32) << 32) + | ((u64)inb_cmos(CMOS_MEM_HIGHMEM_40) << 40)); RamSizeOver4G = high; add_e820(0x100000000ull, high, E820_RAM); -- 1.7.1