blob: b941ef6af9d65c71327c427a6cdd83818eaf6c94 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
boot: 0.842
device: 0.804
graphic: 0.703
performance: 0.691
files: 0.640
vnc: 0.634
debug: 0.623
socket: 0.569
network: 0.531
semantic: 0.508
PID: 0.503
permissions: 0.481
other: 0.375
KVM: 0.344
Multiboot: could not move values from provided mmap to another address directly.
Description of problem:
When using `-kernel` to load a Multiboot file which requires a memory map(MULTIBOOT_MEMORY_INFO flag) and trying to move the values in the provided mmap entries to another address directly, QEMU reboots.
```c
xxx = mmap->addr;
```
When moving with volatile, everything works well:
```c
volatile unsigned long long addr = mmap->addr;
xxx = addr;
```
Steps to reproduce:
1. Source code here: [github/xtexChooser/toop/boot/multiboot/src/multiboot.c](https://github.com/xtexChooser/toop/blob/51153319d4f2320ae9a9277ffffad3f67a335fe9/boot/multiboot/src/multiboot.c#L32)
2. Minimized reproduce: [gist.github.com/xtexChooser/22017d662c8144b7abcb0b18c2afb09c](https://gist.github.com/xtexChooser/22017d662c8144b7abcb0b18c2afb09c)
3. I am sure that 0x00001210 is writable, it is empty in the memory map and QEMU works correctly when writing a zero value to here.
4. The reproducer is available without any module, when it works, it should keep running without any output, if QEMU reboots, the screen should flash as it clears and prints the BIOS information again.
5. If move with volatile(as the `multiboot_works.c` in reproducer), the reproducer works correctly.
Additional information:
#
|