git: 4386935191c5 - main - vtgpu: Fix the physical memory size
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 21 Sep 2023 10:53:16 UTC
The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=4386935191c576fa62a52d52734e264fe8329a67 commit 4386935191c576fa62a52d52734e264fe8329a67 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2023-09-21 10:50:29 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2023-09-21 10:50:29 +0000 vtgpu: Fix the physical memory size Use the correct endian switching function when switching to a little endian 64-bit address. Even on a little-endian machine this will truncate the address to a 32-bit value. Sponsored by: Arm Ltd --- sys/dev/virtio/gpu/virtio_gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/virtio/gpu/virtio_gpu.c b/sys/dev/virtio/gpu/virtio_gpu.c index 0009d7bb3ec1..f18eef985cc6 100644 --- a/sys/dev/virtio/gpu/virtio_gpu.c +++ b/sys/dev/virtio/gpu/virtio_gpu.c @@ -565,7 +565,7 @@ vtgpu_attach_backing(struct vtgpu_softc *sc) s.req.backing.resource_id = htole32(VTGPU_RESOURCE_ID); s.req.backing.nr_entries = htole32(1); - s.req.mem[0].addr = htole32(sc->vtgpu_fb_info.fb_pbase); + s.req.mem[0].addr = htole64(sc->vtgpu_fb_info.fb_pbase); s.req.mem[0].length = htole32(sc->vtgpu_fb_info.fb_size); error = vtgpu_req_resp(sc, &s.req, sizeof(s.req), &s.resp,