Commit 7217e1240340ab49878c4e415df40aa0c6376eb9

Authored by aliguori
1 parent 2edd089f

Update PC BIOS to latest bits from Bochs

A number of patches were merged since we last pulled.

Thanks to Marcelo Tosatti for rebasing the existing patches and testing.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6589 c046a42c-6fe2-441c-8c8c-71466251a162
pc-bios/bios-pq/0002_kvm-bios-update-smbios-table-to-report-memory-above-4g.patch
... ... @@ -6,19 +6,43 @@ Signed-off-by: Anthony Liguori &lt;aliguori@us.ibm.com&gt;
6 6  
7 7 Index: bochs/bios/rombios32.c
8 8 ===================================================================
9   ---- bochs.orig/bios/rombios32.c
10   -+++ bochs/bios/rombios32.c
11   -@@ -2081,7 +2081,8 @@ void smbios_init(void)
  9 +diff --git a/bios/rombios32.c b/bios/rombios32.c
  10 +index 3269be5..9587288 100644
  11 +--- a/bios/rombios32.c
  12 ++++ b/bios/rombios32.c
  13 +@@ -429,6 +429,7 @@ uint32_t cpuid_signature;
  14 + uint32_t cpuid_features;
  15 + uint32_t cpuid_ext_features;
  16 + unsigned long ram_size;
  17 ++uint64_t ram_end;
  18 + uint8_t bios_uuid[16];
  19 + #ifdef BX_USE_EBDA_TABLES
  20 + unsigned long ebda_cur_addr;
  21 +@@ -571,6 +572,13 @@ void ram_probe(void)
  22 + ram_size = (cmos_readb(0x30) | (cmos_readb(0x31) << 8)) * 1024 +
  23 + 1 * 1024 * 1024;
  24 + BX_INFO("ram_size=0x%08lx\n", ram_size);
  25 ++ if (cmos_readb(0x5b) | cmos_readb(0x5c) | cmos_readb(0x5d))
  26 ++ ram_end = (((uint64_t)cmos_readb(0x5b) << 16) |
  27 ++ ((uint64_t)cmos_readb(0x5c) << 24) |
  28 ++ ((uint64_t)cmos_readb(0x5d) << 32)) + (1ull << 32);
  29 ++ else
  30 ++ ram_end = ram_size;
  31 ++ BX_INFO("end of ram=%ldMB\n", ram_end >> 20);
  32 + #ifdef BX_USE_EBDA_TABLES
  33 + ebda_cur_addr = ((*(uint16_t *)(0x40e)) << 4) + 0x380;
  34 + BX_INFO("ebda_cur_addr: 0x%08lx\n", ebda_cur_addr);
  35 +@@ -2174,7 +2182,8 @@ void smbios_init(void)
12 36 {
13 37 unsigned cpu_num, nr_structs = 0, max_struct_size = 0;
14 38 char *start, *p, *q;
15 39 - int memsize = ram_size / (1024 * 1024);
16 40 + int memsize = (ram_end == ram_size) ? ram_size / (1024 * 1024) :
17 41 + (ram_end - (1ull << 32) + ram_size) / (1024 * 1024);
18   -
  42 +
19 43 #ifdef BX_USE_EBDA_TABLES
20 44 ebda_cur_addr = align(ebda_cur_addr, 16);
21   -@@ -2108,8 +2109,8 @@ void smbios_init(void)
  45 +@@ -2201,8 +2210,8 @@ void smbios_init(void)
22 46 add_struct(smbios_type_4_init(p, cpu_num));
23 47 add_struct(smbios_type_16_init(p, memsize));
24 48 add_struct(smbios_type_17_init(p, memsize));
... ... @@ -28,6 +52,4 @@ Index: bochs/bios/rombios32.c
28 52 + add_struct(smbios_type_20_init(p, ram_end / (1024 * 1024)));
29 53 add_struct(smbios_type_32_init(p));
30 54 add_struct(smbios_type_127_init(p));
31   -
32   -
33   -
  55 +
... ...
pc-bios/bios-pq/0004_kvm-bios-add-mtrr-support.patch deleted 100644 → 0
1   -add mtrr support (Avi Kivity)
2   -
3   -program mtrrs for cpu 0. Doesn't support >=4G at the moment.
4   -
5   -Signed-off-by: Avi Kivity <avi@qumranet.com>
6   -Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
7   -
8   -Index: bochs/bios/rombios32.c
9   -===================================================================
10   ---- bochs.orig/bios/rombios32.c
11   -+++ bochs/bios/rombios32.c
12   -@@ -64,6 +64,23 @@ typedef unsigned long long uint64_t;
13   -
14   - #define BIOS_TMP_STORAGE 0x00030000 /* 64 KB used to copy the BIOS to shadow RAM */
15   -
16   -+#define MSR_MTRRcap 0x000000fe
17   -+#define MSR_MTRRfix64K_00000 0x00000250
18   -+#define MSR_MTRRfix16K_80000 0x00000258
19   -+#define MSR_MTRRfix16K_A0000 0x00000259
20   -+#define MSR_MTRRfix4K_C0000 0x00000268
21   -+#define MSR_MTRRfix4K_C8000 0x00000269
22   -+#define MSR_MTRRfix4K_D0000 0x0000026a
23   -+#define MSR_MTRRfix4K_D8000 0x0000026b
24   -+#define MSR_MTRRfix4K_E0000 0x0000026c
25   -+#define MSR_MTRRfix4K_E8000 0x0000026d
26   -+#define MSR_MTRRfix4K_F0000 0x0000026e
27   -+#define MSR_MTRRfix4K_F8000 0x0000026f
28   -+#define MSR_MTRRdefType 0x000002ff
29   -+
30   -+#define MTRRphysBase_MSR(reg) (0x200 + 2 * (reg))
31   -+#define MTRRphysMask_MSR(reg) (0x200 + 2 * (reg) + 1)
32   -+
33   - static inline void outl(int addr, int val)
34   - {
35   - asm volatile ("outl %1, %w0" : : "d" (addr), "a" (val));
36   -@@ -135,6 +152,19 @@ static inline void putc(int c)
37   - outb(INFO_PORT, c);
38   - }
39   -
40   -+static uint64_t rdmsr(unsigned index)
41   -+{
42   -+ unsigned long long ret;
43   -+
44   -+ asm ("rdmsr" : "=A"(ret) : "c"(index));
45   -+ return ret;
46   -+}
47   -+
48   -+static void wrmsr(unsigned index, uint64_t val)
49   -+{
50   -+ asm volatile ("wrmsr" : : "c"(index), "A"(val));
51   -+}
52   -+
53   - static inline int isdigit(int c)
54   - {
55   - return c >= '0' && c <= '9';
56   -@@ -469,6 +499,54 @@ static int cmos_readb(int addr)
57   - return inb(0x71);
58   - }
59   -
60   -+void setup_mtrr(void)
61   -+{
62   -+ int i, vcnt, fix, wc;
63   -+ uint32_t mtrr_cap;
64   -+ union {
65   -+ uint8_t valb[8];
66   -+ uint64_t val;
67   -+ } u;
68   -+ uint64_t vbase, vmask;
69   -+
70   -+ mtrr_cap = rdmsr(MSR_MTRRcap);
71   -+ vcnt = mtrr_cap & 0xff;
72   -+ fix = mtrr_cap & 0x100;
73   -+ wc = mtrr_cap & 0x400;
74   -+ if (!vcnt || !fix)
75   -+ return;
76   -+ u.val = 0;
77   -+ for (i = 0; i < 8; ++i)
78   -+ if (ram_size >= 65536 * (i + 1))
79   -+ u.valb[i] = 6;
80   -+ wrmsr(MSR_MTRRfix64K_00000, u.val);
81   -+ u.val = 0;
82   -+ for (i = 0; i < 8; ++i)
83   -+ if (ram_size >= 65536 * 8 + 16384 * (i + 1))
84   -+ u.valb[i] = 6;
85   -+ wrmsr(MSR_MTRRfix16K_80000, u.val);
86   -+ wrmsr(MSR_MTRRfix16K_A0000, 0);
87   -+ wrmsr(MSR_MTRRfix4K_C0000, 0);
88   -+ wrmsr(MSR_MTRRfix4K_C8000, 0);
89   -+ wrmsr(MSR_MTRRfix4K_D0000, 0);
90   -+ wrmsr(MSR_MTRRfix4K_D8000, 0);
91   -+ wrmsr(MSR_MTRRfix4K_E0000, 0);
92   -+ wrmsr(MSR_MTRRfix4K_E8000, 0);
93   -+ wrmsr(MSR_MTRRfix4K_F0000, 0);
94   -+ wrmsr(MSR_MTRRfix4K_F8000, 0);
95   -+ vbase = 0;
96   -+ --vcnt; /* leave one mtrr for VRAM */
97   -+ for (i = 0; i < vcnt && vbase < ram_size; ++i) {
98   -+ vmask = (1ull << 40) - 1;
99   -+ while (vbase + vmask + 1 > ram_size)
100   -+ vmask >>= 1;
101   -+ wrmsr(MTRRphysBase_MSR(i), vbase | 6);
102   -+ wrmsr(MTRRphysMask_MSR(i), (~vmask & 0xfffffff000ull) | 0x800);
103   -+ vbase += vmask + 1;
104   -+ }
105   -+ wrmsr(MSR_MTRRdefType, 0xc00);
106   -+}
107   -+
108   - void ram_probe(void)
109   - {
110   - if (cmos_readb(0x34) | cmos_readb(0x35))
111   -@@ -482,6 +560,7 @@ void ram_probe(void)
112   - ebda_cur_addr = ((*(uint16_t *)(0x40e)) << 4) + 0x380;
113   - BX_INFO("ebda_cur_addr: 0x%08lx\n", ebda_cur_addr);
114   - #endif
115   -+ setup_mtrr();
116   - }
117   -
118   - /****************************************************/
119   -
120   -
pc-bios/bios-pq/0009_kvm-bios-resolve-memory-device-roll-over-reporting--issues-with-32g-guests.patch renamed to pc-bios/bios-pq/0004_kvm-bios-resolve-memory-device-roll-over-reporting--issues-with-32g-guests.patch
pc-bios/bios-pq/0010_kvm-bios-fix-smbios-memory-device-length-boundary--condition.patch renamed to pc-bios/bios-pq/0005_kvm-bios-fix-smbios-memory-device-length-boundary--condition.patch
pc-bios/bios-pq/0005_kvm-bios-smp-mtrr-support.patch deleted 100644 → 0
1   -smp mtrr support (Avi Kivity)
2   -
3   -Signed-off-by: Avi Kivity <avi@qumranet.com>
4   -Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
5   -
6   -Index: bochs/bios/rombios.h
7   -===================================================================
8   ---- bochs.orig/bios/rombios.h
9   -+++ bochs/bios/rombios.h
10   -@@ -56,6 +56,7 @@
11   - #define ACPI_DATA_SIZE 0x00010000L
12   - #define PM_IO_BASE 0xb000
13   - #define SMB_IO_BASE 0xb100
14   -+#define SMP_MSR_ADDR 0xf010
15   -
16   - // Define the application NAME
17   - #if defined(BX_QEMU)
18   -Index: bochs/bios/rombios32.c
19   -===================================================================
20   ---- bochs.orig/bios/rombios32.c
21   -+++ bochs/bios/rombios32.c
22   -@@ -472,6 +472,23 @@ void qemu_cfg_read(uint8_t *buf, int len
23   - }
24   - #endif
25   -
26   -+void init_smp_msrs(void)
27   -+{
28   -+ *(uint32_t *)SMP_MSR_ADDR = 0;
29   -+}
30   -+
31   -+void wrmsr_smp(uint32_t index, uint64_t val)
32   -+{
33   -+ static struct { uint32_t ecx, eax, edx; } *p = (void *)SMP_MSR_ADDR;
34   -+
35   -+ wrmsr(index, val);
36   -+ p->ecx = index;
37   -+ p->eax = val;
38   -+ p->edx = val >> 32;
39   -+ ++p;
40   -+ p->ecx = 0;
41   -+}
42   -+
43   - void uuid_probe(void)
44   - {
45   - #ifdef BX_QEMU
46   -@@ -519,32 +536,32 @@ void setup_mtrr(void)
47   - for (i = 0; i < 8; ++i)
48   - if (ram_size >= 65536 * (i + 1))
49   - u.valb[i] = 6;
50   -- wrmsr(MSR_MTRRfix64K_00000, u.val);
51   -+ wrmsr_smp(MSR_MTRRfix64K_00000, u.val);
52   - u.val = 0;
53   - for (i = 0; i < 8; ++i)
54   - if (ram_size >= 65536 * 8 + 16384 * (i + 1))
55   - u.valb[i] = 6;
56   -- wrmsr(MSR_MTRRfix16K_80000, u.val);
57   -- wrmsr(MSR_MTRRfix16K_A0000, 0);
58   -- wrmsr(MSR_MTRRfix4K_C0000, 0);
59   -- wrmsr(MSR_MTRRfix4K_C8000, 0);
60   -- wrmsr(MSR_MTRRfix4K_D0000, 0);
61   -- wrmsr(MSR_MTRRfix4K_D8000, 0);
62   -- wrmsr(MSR_MTRRfix4K_E0000, 0);
63   -- wrmsr(MSR_MTRRfix4K_E8000, 0);
64   -- wrmsr(MSR_MTRRfix4K_F0000, 0);
65   -- wrmsr(MSR_MTRRfix4K_F8000, 0);
66   -+ wrmsr_smp(MSR_MTRRfix16K_80000, u.val);
67   -+ wrmsr_smp(MSR_MTRRfix16K_A0000, 0);
68   -+ wrmsr_smp(MSR_MTRRfix4K_C0000, 0);
69   -+ wrmsr_smp(MSR_MTRRfix4K_C8000, 0);
70   -+ wrmsr_smp(MSR_MTRRfix4K_D0000, 0);
71   -+ wrmsr_smp(MSR_MTRRfix4K_D8000, 0);
72   -+ wrmsr_smp(MSR_MTRRfix4K_E0000, 0);
73   -+ wrmsr_smp(MSR_MTRRfix4K_E8000, 0);
74   -+ wrmsr_smp(MSR_MTRRfix4K_F0000, 0);
75   -+ wrmsr_smp(MSR_MTRRfix4K_F8000, 0);
76   - vbase = 0;
77   - --vcnt; /* leave one mtrr for VRAM */
78   - for (i = 0; i < vcnt && vbase < ram_size; ++i) {
79   - vmask = (1ull << 40) - 1;
80   - while (vbase + vmask + 1 > ram_size)
81   - vmask >>= 1;
82   -- wrmsr(MTRRphysBase_MSR(i), vbase | 6);
83   -- wrmsr(MTRRphysMask_MSR(i), (~vmask & 0xfffffff000ull) | 0x800);
84   -+ wrmsr_smp(MTRRphysBase_MSR(i), vbase | 6);
85   -+ wrmsr_smp(MTRRphysMask_MSR(i), (~vmask & 0xfffffff000ull) | 0x800);
86   - vbase += vmask + 1;
87   - }
88   -- wrmsr(MSR_MTRRdefType, 0xc00);
89   -+ wrmsr_smp(MSR_MTRRdefType, 0xc00);
90   - }
91   -
92   - void ram_probe(void)
93   -@@ -2263,6 +2280,8 @@ void rombios32_init(uint32_t *s3_resume_
94   - qemu_cfg_port = qemu_cfg_port_probe();
95   - #endif
96   -
97   -+ init_smp_msrs();
98   -+
99   - ram_probe();
100   -
101   - cpu_probe();
102   -Index: bochs/bios/rombios32start.S
103   -===================================================================
104   ---- bochs.orig/bios/rombios32start.S
105   -+++ bochs/bios/rombios32start.S
106   -@@ -49,6 +49,18 @@ _start:
107   - smp_ap_boot_code_start:
108   - xor %ax, %ax
109   - mov %ax, %ds
110   -+
111   -+ mov $SMP_MSR_ADDR, %ebx
112   -+11:
113   -+ mov 0(%ebx), %ecx
114   -+ test %ecx, %ecx
115   -+ jz 12f
116   -+ mov 4(%ebx), %eax
117   -+ mov 8(%ebx), %edx
118   -+ wrmsr
119   -+ add $12, %ebx
120   -+ jmp 11b
121   -+12:
122   - lock incw smp_cpus
123   - 1:
124   - hlt
125   -
126   -
pc-bios/bios-pq/0006_kvm-bios-extend-mtrrs-to-above-4g.patch deleted 100644 → 0
1   -extend MTRRs to above 4G (Alex Williamson)
2   -
3   -When I try to boot guests using a recent Linux kernel (2.6.26+), memory
4   -above 3.5G gets thrown away with an error like this:
5   -
6   -WARNING: BIOS bug: CPU MTRRs don't cover all of memory, losing 4608MB of RAM
7   -
8   -This extends MTRRs to cover all of memory.
9   -
10   -Signed-off-by: Alex Williamson <alex.williamson@hp.com>
11   -Signed-off-by: Avi Kivity <avi@redhat.com>
12   -Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13   -
14   -Index: bochs/bios/rombios32.c
15   -===================================================================
16   ---- bochs.orig/bios/rombios32.c
17   -+++ bochs/bios/rombios32.c
18   -@@ -427,6 +427,7 @@ uint32_t cpuid_signature;
19   - uint32_t cpuid_features;
20   - uint32_t cpuid_ext_features;
21   - unsigned long ram_size;
22   -+uint64_t above4g_ram_size;
23   - uint8_t bios_uuid[16];
24   - #ifdef BX_USE_EBDA_TABLES
25   - unsigned long ebda_cur_addr;
26   -@@ -561,6 +562,14 @@ void setup_mtrr(void)
27   - wrmsr_smp(MTRRphysMask_MSR(i), (~vmask & 0xfffffff000ull) | 0x800);
28   - vbase += vmask + 1;
29   - }
30   -+ for (vbase = 1ull << 32; i < vcnt && vbase < above4g_ram_size; ++i) {
31   -+ vmask = (1ull << 40) - 1;
32   -+ while (vbase + vmask + 1 > above4g_ram_size)
33   -+ vmask >>= 1;
34   -+ wrmsr_smp(MTRRphysBase_MSR(i), vbase | 6);
35   -+ wrmsr_smp(MTRRphysMask_MSR(i), (~vmask & 0xfffffff000ull) | 0x800);
36   -+ vbase += vmask + 1;
37   -+ }
38   - wrmsr_smp(MSR_MTRRdefType, 0xc00);
39   - }
40   -
41   -@@ -572,11 +581,19 @@ void ram_probe(void)
42   - else
43   - ram_size = (cmos_readb(0x30) | (cmos_readb(0x31) << 8)) * 1024 +
44   - 1 * 1024 * 1024;
45   -+ if (cmos_readb(0x5b) | cmos_readb(0x5c) | cmos_readb(0x5d))
46   -+ above4g_ram_size = ((uint64_t)cmos_readb(0x5b) << 16) |
47   -+ ((uint64_t)cmos_readb(0x5c) << 24) | ((uint64_t)cmos_readb(0x5d) << 32);
48   -+
49   -+ if (above4g_ram_size)
50   -+ above4g_ram_size += 1ull << 32;
51   -+
52   - BX_INFO("ram_size=0x%08lx\n", ram_size);
53   - #ifdef BX_USE_EBDA_TABLES
54   - ebda_cur_addr = ((*(uint16_t *)(0x40e)) << 4) + 0x380;
55   - BX_INFO("ebda_cur_addr: 0x%08lx\n", ebda_cur_addr);
56   - #endif
57   -+ BX_INFO("top of ram %ldMB\n", above4g_ram_size >> 20);
58   - setup_mtrr();
59   - }
60   -
61   -
62   -
pc-bios/bios-pq/0007_kvm-bios-cleanup-consolidate-above-4g-memory-parsing.patch deleted 100644 → 0
1   -cleanup/consolidate above 4G memory parsing (Alex Williamson)
2   -
3   -Signed-off-by: Alex Williamson <alex.williamson@hp.com>
4   -Signed-off-by: Avi Kivity <avi@redhat.com>
5   -Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
6   -
7   -Index: bochs/bios/rombios32.c
8   -===================================================================
9   ---- bochs.orig/bios/rombios32.c
10   -+++ bochs/bios/rombios32.c
11   -@@ -427,7 +427,7 @@ uint32_t cpuid_signature;
12   - uint32_t cpuid_features;
13   - uint32_t cpuid_ext_features;
14   - unsigned long ram_size;
15   --uint64_t above4g_ram_size;
16   -+uint64_t ram_end;
17   - uint8_t bios_uuid[16];
18   - #ifdef BX_USE_EBDA_TABLES
19   - unsigned long ebda_cur_addr;
20   -@@ -562,9 +562,9 @@ void setup_mtrr(void)
21   - wrmsr_smp(MTRRphysMask_MSR(i), (~vmask & 0xfffffff000ull) | 0x800);
22   - vbase += vmask + 1;
23   - }
24   -- for (vbase = 1ull << 32; i < vcnt && vbase < above4g_ram_size; ++i) {
25   -+ for (vbase = 1ull << 32; i < vcnt && vbase < ram_end; ++i) {
26   - vmask = (1ull << 40) - 1;
27   -- while (vbase + vmask + 1 > above4g_ram_size)
28   -+ while (vbase + vmask + 1 > ram_end)
29   - vmask >>= 1;
30   - wrmsr_smp(MTRRphysBase_MSR(i), vbase | 6);
31   - wrmsr_smp(MTRRphysMask_MSR(i), (~vmask & 0xfffffff000ull) | 0x800);
32   -@@ -582,18 +582,19 @@ void ram_probe(void)
33   - ram_size = (cmos_readb(0x30) | (cmos_readb(0x31) << 8)) * 1024 +
34   - 1 * 1024 * 1024;
35   - if (cmos_readb(0x5b) | cmos_readb(0x5c) | cmos_readb(0x5d))
36   -- above4g_ram_size = ((uint64_t)cmos_readb(0x5b) << 16) |
37   -- ((uint64_t)cmos_readb(0x5c) << 24) | ((uint64_t)cmos_readb(0x5d) << 32);
38   -+ ram_end = (((uint64_t)cmos_readb(0x5b) << 16) |
39   -+ ((uint64_t)cmos_readb(0x5c) << 24) |
40   -+ ((uint64_t)cmos_readb(0x5d) << 32)) + (1ull << 32);
41   -+ else
42   -+ ram_end = ram_size;
43   -
44   -- if (above4g_ram_size)
45   -- above4g_ram_size += 1ull << 32;
46   -+ BX_INFO("end of ram=%ldMB\n", ram_end >> 20);
47   -
48   - BX_INFO("ram_size=0x%08lx\n", ram_size);
49   - #ifdef BX_USE_EBDA_TABLES
50   - ebda_cur_addr = ((*(uint16_t *)(0x40e)) << 4) + 0x380;
51   - BX_INFO("ebda_cur_addr: 0x%08lx\n", ebda_cur_addr);
52   - #endif
53   -- BX_INFO("top of ram %ldMB\n", above4g_ram_size >> 20);
54   - setup_mtrr();
55   - }
56   -
57   -
58   -
pc-bios/bios-pq/0008_kvm-bios-switch-mtrrs-to-cover-only-the-pci-range-and--default-to-wb.patch deleted 100644 → 0
1   -switch MTRRs to cover only the PCI range and default to WB (Alex Williamson)
2   -
3   -This matches how some bare metal machines report MTRRs and avoids
4   -the problem of running out of MTRRs to cover all of RAM.
5   -
6   -Signed-off-by: Alex Williamson <alex.williamson@hp.com>
7   -Signed-off-by: Avi Kivity <avi@redhat.com>
8   -Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
9   -
10   -Index: bochs/bios/rombios32.c
11   -===================================================================
12   ---- bochs.orig/bios/rombios32.c
13   -+++ bochs/bios/rombios32.c
14   -@@ -525,7 +525,6 @@ void setup_mtrr(void)
15   - uint8_t valb[8];
16   - uint64_t val;
17   - } u;
18   -- uint64_t vbase, vmask;
19   -
20   - mtrr_cap = rdmsr(MSR_MTRRcap);
21   - vcnt = mtrr_cap & 0xff;
22   -@@ -552,25 +551,10 @@ void setup_mtrr(void)
23   - wrmsr_smp(MSR_MTRRfix4K_E8000, 0);
24   - wrmsr_smp(MSR_MTRRfix4K_F0000, 0);
25   - wrmsr_smp(MSR_MTRRfix4K_F8000, 0);
26   -- vbase = 0;
27   -- --vcnt; /* leave one mtrr for VRAM */
28   -- for (i = 0; i < vcnt && vbase < ram_size; ++i) {
29   -- vmask = (1ull << 40) - 1;
30   -- while (vbase + vmask + 1 > ram_size)
31   -- vmask >>= 1;
32   -- wrmsr_smp(MTRRphysBase_MSR(i), vbase | 6);
33   -- wrmsr_smp(MTRRphysMask_MSR(i), (~vmask & 0xfffffff000ull) | 0x800);
34   -- vbase += vmask + 1;
35   -- }
36   -- for (vbase = 1ull << 32; i < vcnt && vbase < ram_end; ++i) {
37   -- vmask = (1ull << 40) - 1;
38   -- while (vbase + vmask + 1 > ram_end)
39   -- vmask >>= 1;
40   -- wrmsr_smp(MTRRphysBase_MSR(i), vbase | 6);
41   -- wrmsr_smp(MTRRphysMask_MSR(i), (~vmask & 0xfffffff000ull) | 0x800);
42   -- vbase += vmask + 1;
43   -- }
44   -- wrmsr_smp(MSR_MTRRdefType, 0xc00);
45   -+ /* Mark 3.5-4GB as UC, anything not specified defaults to WB */
46   -+ wrmsr_smp(MTRRphysBase_MSR(0), 0xe0000000ull | 0);
47   -+ wrmsr_smp(MTRRphysMask_MSR(0), ~(0x20000000ull - 1) | 0x800);
48   -+ wrmsr_smp(MSR_MTRRdefType, 0xc06);
49   - }
50   -
51   - void ram_probe(void)
52   -
53   -
54   -
pc-bios/bios-pq/HEAD
1   -36989b0d2e785ac9e5d6e8a226dbdeb82e876bfd
  1 +04387139e3b5ac97b5633cd40b3d87cdf45efd6c
... ...
pc-bios/bios-pq/series
1 1 0001_bx-qemu.patch
2 2 0002_kvm-bios-update-smbios-table-to-report-memory-above-4g.patch
3 3 0003_kvm-bios-generate-mptable-unconditionally.patch
4   -0004_kvm-bios-add-mtrr-support.patch
5   -0005_kvm-bios-smp-mtrr-support.patch
6   -0006_kvm-bios-extend-mtrrs-to-above-4g.patch
7   -0007_kvm-bios-cleanup-consolidate-above-4g-memory-parsing.patch
8   -0008_kvm-bios-switch-mtrrs-to-cover-only-the-pci-range-and--default-to-wb.patch
9   -0009_kvm-bios-resolve-memory-device-roll-over-reporting--issues-with-32g-guests.patch
10   -0010_kvm-bios-fix-smbios-memory-device-length-boundary--condition.patch
  4 +0004_kvm-bios-resolve-memory-device-roll-over-reporting--issues-with-32g-guests.patch
  5 +0005_kvm-bios-fix-smbios-memory-device-length-boundary--condition.patch
... ...
pc-bios/bios.bin
No preview for this file type