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 <[email protected]> Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
4b5c7fe7e1
commit
a80813fdd1
@@ -146,8 +146,10 @@ SYSTEM_ADD_ONS_ACCELERANTS = [ FFilterByBuildFeatures
|
|||||||
framebuffer.accelerant
|
framebuffer.accelerant
|
||||||
x86,x86_64 @{
|
x86,x86_64 @{
|
||||||
vesa.accelerant
|
vesa.accelerant
|
||||||
}@ # x86,x86_64,riscv64
|
}@ # x86,x86_64
|
||||||
riscv64 @{
|
riscv64 @{
|
||||||
|
# ati for qemu, radeon_hd for unmatched
|
||||||
|
ati.accelerant
|
||||||
radeon_hd.accelerant
|
radeon_hd.accelerant
|
||||||
}@ # riscv64
|
}@ # riscv64
|
||||||
] ;
|
] ;
|
||||||
@@ -180,6 +182,8 @@ SYSTEM_ADD_ONS_DRIVERS_GRAPHICS = [ FFilterByBuildFeatures
|
|||||||
vesa
|
vesa
|
||||||
}@ # x86,x86_64
|
}@ # x86,x86_64
|
||||||
riscv64 @{
|
riscv64 @{
|
||||||
|
# ati for qemu, radeon_hd for unmatched
|
||||||
|
ati
|
||||||
radeon_hd
|
radeon_hd
|
||||||
}@ # riscv64
|
}@ # riscv64
|
||||||
] ;
|
] ;
|
||||||
|
|||||||
@@ -11,6 +11,16 @@
|
|||||||
#include <AutoDeleterOS.h>
|
#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;
|
extern ArchPCIController* gArchPCI;
|
||||||
addr_t gPCIeIoBase;
|
addr_t gPCIeIoBase;
|
||||||
|
|
||||||
@@ -18,7 +28,7 @@ addr_t gPCIeIoBase;
|
|||||||
status_t
|
status_t
|
||||||
pci_io_init()
|
pci_io_init()
|
||||||
{
|
{
|
||||||
dprintf("pci_io_init()\n");
|
TRACE("pci_io_init()\n");
|
||||||
if (gArchPCI == NULL)
|
if (gArchPCI == NULL)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
@@ -30,7 +40,7 @@ pci_io_init()
|
|||||||
uint8
|
uint8
|
||||||
pci_read_io_8(int mapped_io_addr)
|
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);
|
volatile uint8* ptr = (uint8*)(gPCIeIoBase + mapped_io_addr);
|
||||||
return *ptr;
|
return *ptr;
|
||||||
}
|
}
|
||||||
@@ -39,7 +49,7 @@ pci_read_io_8(int mapped_io_addr)
|
|||||||
void
|
void
|
||||||
pci_write_io_8(int mapped_io_addr, uint8 value)
|
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);
|
volatile uint8* ptr = (uint8*)(gPCIeIoBase + mapped_io_addr);
|
||||||
*ptr = value;
|
*ptr = value;
|
||||||
}
|
}
|
||||||
@@ -48,7 +58,7 @@ pci_write_io_8(int mapped_io_addr, uint8 value)
|
|||||||
uint16
|
uint16
|
||||||
pci_read_io_16(int mapped_io_addr)
|
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);
|
volatile uint16* ptr = (uint16*)(gPCIeIoBase + mapped_io_addr);
|
||||||
return *ptr;
|
return *ptr;
|
||||||
}
|
}
|
||||||
@@ -57,7 +67,7 @@ pci_read_io_16(int mapped_io_addr)
|
|||||||
void
|
void
|
||||||
pci_write_io_16(int mapped_io_addr, uint16 value)
|
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);
|
volatile uint16* ptr = (uint16*)(gPCIeIoBase + mapped_io_addr);
|
||||||
*ptr = value;
|
*ptr = value;
|
||||||
}
|
}
|
||||||
@@ -66,7 +76,7 @@ pci_write_io_16(int mapped_io_addr, uint16 value)
|
|||||||
uint32
|
uint32
|
||||||
pci_read_io_32(int mapped_io_addr)
|
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);
|
volatile uint32* ptr = (uint32*)(gPCIeIoBase + mapped_io_addr);
|
||||||
return *ptr;
|
return *ptr;
|
||||||
}
|
}
|
||||||
@@ -75,7 +85,7 @@ pci_read_io_32(int mapped_io_addr)
|
|||||||
void
|
void
|
||||||
pci_write_io_32(int mapped_io_addr, uint32 value)
|
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);
|
volatile uint32* ptr = (uint32*)(gPCIeIoBase + mapped_io_addr);
|
||||||
*ptr = value;
|
*ptr = value;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ case "$ARCH" in
|
|||||||
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
||||||
echo "+++ Testing $PLATFORM boot..."
|
echo "+++ Testing $PLATFORM boot..."
|
||||||
cp $IMAGE $TEST_FILE
|
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
|
check_logs $TEST_SERIALLOG
|
||||||
rm -f $TEST_FILE $TEST_SERIALLOG
|
rm -f $TEST_FILE $TEST_SERIALLOG
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user