qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [Bug 1596204] Re: UART problem in raspi2


From: Peter Maydell
Subject: [Qemu-devel] [Bug 1596204] Re: UART problem in raspi2
Date: Thu, 23 Nov 2017 19:08:58 -0000

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.


** Changed in: qemu
       Status: New => Invalid

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1596204

Title:
  UART problem in raspi2

Status in QEMU:
  Invalid

Bug description:
  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1596204/+subscriptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]