qemu/riscv64: Misc fixups for qemu

* Disable overly verbose PCI IO access
* Add ati to riscv64 minimum image for qemu
* Update qemu test script with "best" gpu settings
  for the moment

Change-Id: I5d16ace0f8589f8b17cc50c7a1db04266907269f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4699
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
Alexander von Gluck IV 2021-11-06 20:35:03 -05:00 committed by Adrien Destugues
parent 4b5c7fe7e1
commit a80813fdd1
3 changed files with 23 additions and 9 deletions

View File

@ -146,8 +146,10 @@ SYSTEM_ADD_ONS_ACCELERANTS = [ FFilterByBuildFeatures
framebuffer.accelerant
x86,x86_64 @{
vesa.accelerant
}@ # x86,x86_64,riscv64
}@ # x86,x86_64
riscv64 @{
# ati for qemu, radeon_hd for unmatched
ati.accelerant
radeon_hd.accelerant
}@ # riscv64
] ;
@ -180,6 +182,8 @@ SYSTEM_ADD_ONS_DRIVERS_GRAPHICS = [ FFilterByBuildFeatures
vesa
}@ # x86,x86_64
riscv64 @{
# ati for qemu, radeon_hd for unmatched
ati
radeon_hd
}@ # riscv64
] ;

View File

@ -11,6 +11,16 @@
#include <AutoDeleterOS.h>
#undef TRACE
//#define TRACE_PCI_IO
#ifdef TRACE_PCI_IO
# define TRACE(x...) fprintf("PCI_IO: " x)
#else
# define TRACE(x...) ;
#endif
extern ArchPCIController* gArchPCI;
addr_t gPCIeIoBase;
@ -18,7 +28,7 @@ addr_t gPCIeIoBase;
status_t
pci_io_init()
{
dprintf("pci_io_init()\n");
TRACE("pci_io_init()\n");
if (gArchPCI == NULL)
return B_ERROR;
@ -30,7 +40,7 @@ pci_io_init()
uint8
pci_read_io_8(int mapped_io_addr)
{
dprintf("pci_read_io_8(%d)\n", mapped_io_addr);
TRACE("pci_read_io_8(%d)\n", mapped_io_addr);
volatile uint8* ptr = (uint8*)(gPCIeIoBase + mapped_io_addr);
return *ptr;
}
@ -39,7 +49,7 @@ pci_read_io_8(int mapped_io_addr)
void
pci_write_io_8(int mapped_io_addr, uint8 value)
{
dprintf("pci_write_io_8(%d)\n", mapped_io_addr);
TRACE("pci_write_io_8(%d)\n", mapped_io_addr);
volatile uint8* ptr = (uint8*)(gPCIeIoBase + mapped_io_addr);
*ptr = value;
}
@ -48,7 +58,7 @@ pci_write_io_8(int mapped_io_addr, uint8 value)
uint16
pci_read_io_16(int mapped_io_addr)
{
dprintf("pci_read_io_16(%d)\n", mapped_io_addr);
TRACE("pci_read_io_16(%d)\n", mapped_io_addr);
volatile uint16* ptr = (uint16*)(gPCIeIoBase + mapped_io_addr);
return *ptr;
}
@ -57,7 +67,7 @@ pci_read_io_16(int mapped_io_addr)
void
pci_write_io_16(int mapped_io_addr, uint16 value)
{
dprintf("pci_write_io_16(%d)\n", mapped_io_addr);
TRACE("pci_write_io_16(%d)\n", mapped_io_addr);
volatile uint16* ptr = (uint16*)(gPCIeIoBase + mapped_io_addr);
*ptr = value;
}
@ -66,7 +76,7 @@ pci_write_io_16(int mapped_io_addr, uint16 value)
uint32
pci_read_io_32(int mapped_io_addr)
{
dprintf("pci_read_io_32(%d)\n", mapped_io_addr);
TRACE("pci_read_io_32(%d)\n", mapped_io_addr);
volatile uint32* ptr = (uint32*)(gPCIeIoBase + mapped_io_addr);
return *ptr;
}
@ -75,7 +85,7 @@ pci_read_io_32(int mapped_io_addr)
void
pci_write_io_32(int mapped_io_addr, uint32 value)
{
dprintf("pci_write_io_32(%d)\n", mapped_io_addr);
TRACE("pci_write_io_32(%d)\n", mapped_io_addr);
volatile uint32* ptr = (uint32*)(gPCIeIoBase + mapped_io_addr);
*ptr = value;
}

View File

@ -108,7 +108,7 @@ case "$ARCH" in
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo "+++ Testing $PLATFORM boot..."
cp $IMAGE $TEST_FILE
$EMULATOR -device virtio-gpu -drive file=$TEST_FILE,format=raw,if=virtio
$EMULATOR -device ati-vga -drive file=$TEST_FILE,format=raw,if=virtio
check_logs $TEST_SERIALLOG
rm -f $TEST_FILE $TEST_SERIALLOG
;;