On 11/03/2023 19:05, Mark Cave-Ayland wrote:
According to structures.fs the fields in struct instance are cell size which is 4 bytes on 32-bit systems and 8 bytes on 64-bit systems.
my-unit incorrectly assumes that the fields are always "l" (4 byte) size which causes it to return the wrong value on SPARC64. Fix the issue by updating my-unit to use the cell size to calculate its offsets.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
forth/device/package.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/forth/device/package.fs b/forth/device/package.fs index e0fd2d2..8a28263 100644 --- a/forth/device/package.fs +++ b/forth/device/package.fs @@ -197,8 +197,8 @@ defer find-dev
: my-unit ( -- phys.lo ... phys.hi ) ?my-self >in.my-unit
- my-#acells tuck /l* + swap 0 ?do
- /l - dup l@ swap
- my-#acells tuck /n* + swap 0 ?do
- /n - dup @ swap loop drop ;
During final testing of my OpenBIOS queue it seems this patch causes path resolution to generate incorrect device paths for some SPARC64 devices. I suspect it will take me some time to debug this, so I'll postpone pushing my queue to Github until I've posted a fixed version (likely after the QEMU 9.2 development cycle opens).
ATB,
Mark.