summary refs log tree commit diff stats
path: root/results/classifier/zero-shot/118/peripherals/1596204
blob: adcb77f19c8f83b1b0000a133210ae94bc095360 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
peripherals: 0.895
architecture: 0.554
device: 0.551
performance: 0.522
kernel: 0.469
graphic: 0.321
semantic: 0.304
debug: 0.303
permissions: 0.293
register: 0.288
network: 0.270
PID: 0.235
i386: 0.223
mistranslation: 0.221
ppc: 0.220
user-level: 0.183
arm: 0.175
x86: 0.171
boot: 0.163
socket: 0.161
VMM: 0.146
vnc: 0.134
TCG: 0.051
files: 0.048
hypervisor: 0.047
risc-v: 0.044
assembly: 0.025
KVM: 0.016
virtual: 0.003

UART problem in raspi2

I was trying to run the raspberry pi uart example at https://github.com/dwelch67/raspberrypi/tree/master/uart01 using qemu 2.6.0, but it didn't work.

The steps I took were:
* Edit uart01/memmap and change origin to 0x10000 (which is the address qemu starts executing),
* make
* /usr/local/bin/qemu-system-arm -machine raspi2 -m 512M -nographic -gdb tcp::26000 -S -kernel uart01.bin

Then start arm-none-eabi-gdb and run following commands:

target remote localhost:26000
symbol-file ./uart01.elf


Then, when I start the program, it seems that the GET32(AUX_MU_LSR_REG)&0x20 condition never becomes true.

This works on actual hardware, so I am wondering if I'm doing any steps incorrectly or missing.

This is because you're running a binary for the raspberry pi 1 on a model of the raspberry pi 2. The peripherals are at different locations on the two boards, and so your program doesn't work. You can fix that by changing all the register addresses that start 0x20..... to 0x3f...., or more complicatedly by using the boards/cpuid/ code in that raspberrypi repo to detect the correct PBASE value to use.

Secondly, the output goes to the second serial port, which in your command line is not being directed anywhere. You can put the second serial port's output on stdio with the first serial port output thrown away using '-serial null -serial stdio'. (For more complicated redirections, see the QEMU docs.)

If I do those two things, then the uart01 example runs fine on QEMU.