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