From: Andrea Arcangeli <aarcange@redhat.com>
To: qemu-devel@nongnu.org, seabios@seabios.org
Cc: Anthony Liguori <aliguori@us.ibm.com>
Subject: [Qemu-devel] [PATCH] add 40-48 bit RAM range to seabios
Date: Wed, 15 Sep 2010 19:15:28 +0200 [thread overview]
Message-ID: <20100915171528.GO5981@random.random> (raw)
Subject: add 40-48 bit RAM range to seabios
From: Andrea Arcangeli <aarcange@redhat.com>
Needed to show >1TB RAM to guests.
This uses a new cmos port at 0x5e that shall read zero to be backwards
compatible.
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
---
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 5d0e2cb..3628ff5 100644
--- a/src/post.c
+++ b/src/post.c
@@ -106,9 +106,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);
next reply other threads:[~2010-09-15 17:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-15 17:15 Andrea Arcangeli [this message]
2010-09-17 1:47 ` [Qemu-devel] [PATCH] add 40-48 bit RAM range to seabios Kevin O'Connor
2010-09-17 12:53 ` Anthony Liguori
2010-09-17 13:11 ` Kevin O'Connor
2010-09-17 18:49 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100915171528.GO5981@random.random \
--to=aarcange@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=seabios@seabios.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.