English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 05 February 2013, 19:33   #181
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,575
Ah, it must have been 1.1 that didn't work.
Toni Wilen is offline  
Old 05 February 2013, 19:39   #182
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,575
Same image (NetBSD_1.3.3_4G_HD) seems to boot fine here, 68060 MMU.

(I am still wondering about that "no battery block" message)
Attached Thumbnails
Click image for larger version

Name:	netbsd_133_68060.png
Views:	294
Size:	18.0 KB
ID:	34187  
Toni Wilen is offline  
Old 05 February 2013, 20:12   #183
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,351
Strange. The configs I tested with are attached, I get a crash with both A3000/060 and A4000/060. (Did you try unpacking the HDF archive again? Maybe not using a fresh copy could cause some change in the boot sequence so the crash doesn't happen?)

I'm not sure why the message about no clock found appears either. But if you check the NetBSD 1.2 src/sys/arch/amiga/dev/clock.c, it does look a little strange. See rtcinit() near line 745. It sets clockaddr to 0xDC0000, then seems to access addresses based off that, even on A3000/4000. (Is the A3K/4K Ricoh RTC at 0xDC0000 too??) Using an A2000 config NetBSD does find the RTC.
Attached Files
File Type: 7z 68060_configs.7z (2.4 KB, 183 views)

Last edited by mark_k; 05 February 2013 at 20:29.
mark_k is offline  
Old 05 February 2013, 20:33   #184
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,575
Quote:
Originally Posted by mark_k View Post
Strange. The configs I tested with are attached, I get a crash with both A3000/060 and A4000/060.
It was CPU "More compatible" checkbox (=don't emulate missing 68060 integer instructions), it created incorrect PC field in exception stack frame that confused software emulation routine. Fixed now.

Quote:
(Is the A3K/4K Ricoh RTC at 0xDC0000 too??) Using an A2000 config NetBSD does find the RTC.
Address is exact same, both have 16 registers. Time registers are mostly same, config/status registers are totally different.

EDIT: I think clock detection problem is caused by this "if (range_test(year, STARTOFTIME, 2000)) return(0);". Also year was originally counted as number of years from 1900 but because clock chip has limited range (BCD counters), it was later changed to last 2 digits of year. UAE uses new method when Ricoh clock is used, other clock uses original for compatibility reasons.

Last edited by Toni Wilen; 05 February 2013 at 20:46.
Toni Wilen is offline  
Old 05 February 2013, 21:03   #185
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,351
Ah. If you look at the a34kbbc.c history, scroll down to revisions 1.4/1.5/1.6. Commit comments for those revisions are below. You can click the links to see diffs from version to version.

1.4:
Code:
*sigh*
Y2000-patch for A2000, A3000 and A4000 battery backed clock modules,
mostly by Adam Ciarcinski.
1.5:
Code:
Write part of the y2k fix.
This is not strictly necessary, as
- at least for the Ricoh chip in the A3000 and A4000, as those chips' Y10
  registers happily continue to count up from 0xA if manually incremented
  past 0x9.
- the Amiga ROMs and "setclock" commands seem to interpret 0xA 0x? like
  200?, etc.

However,
- the Amiga setclock writes the modulo 10 value into the chips
- the chip docs of both chips, including the Y2K information of their
  manufacturers, only refer to the range 0-9
- the chips increment from 9 to 0

So we better conform to this, to avoid unpleasant surprises.
1.6:
Code:
The Ricoh chip has a seperate leapyear counter.
We must write this when we write the year register, keeping them in sync.
XXX the chosen algorithm only works for 1901 <= year <= 2099.
According to the NetBSD/amiga year 2000 compliance page NetBSD 1.4.2 was the first Y2K-fixed NetBSD release. So hopefully all versions after that should find the clock running in WinUAE.
mark_k is offline  
Old 06 February 2013, 22:15   #186
strim
NetBSD developer
 
Join Date: May 2012
Location: Warsaw, Poland
Posts: 411
Quote:
Originally Posted by mark_k View Post
So hopefully all versions after that should find the clock running in WinUAE.
You may have problems with NetBSD 6 and A2000-style RTC clock. But that's a bug in NetBSD that was fixed recently (in case of a problem just use daily binary build of HEAD branch from releng.netbsd.org).
strim is offline  
Old 20 February 2013, 14:39   #187
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,351
Quote:
Originally Posted by Toni Wilen View Post
I am not so sure about software FPU emulation support because all FPU instructions generate standard line-f exception if CPU is 68020 or 68030 and FPU is missing. Nothing special should be needed.
Since I got the problem with 68030 + no FPU testing NetBSD 6.0.1, I thought it was possible there has been some regression with NetBSD and no FPU, if all the NetBSD devs' machines have FPUs.

But I just tested with NetBSD 1.3.3 and that also crashes without FPU. NetBSD 1.3 was the first version which is supposed to work without FPU. The error message is different, screenshot attached. There is no relevant output in the WinUAE log.
Attached Thumbnails
Click image for larger version

Name:	NetBSD1.3.3_68030_no_FPU.png
Views:	267
Size:	7.3 KB
ID:	34337  
mark_k is offline  
Old 20 February 2013, 15:45   #188
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,575
It attempted to execute FPU instruction. I still don't think it can work without FPU. Possibly kernel works but applications compiled with FPU won't, can't find any kind of m68k FPU emulation layer.
Toni Wilen is offline  
Old 20 February 2013, 15:52   #189
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,351
This mailing list thread is from someone with an A600 + ACA630 accelerator (with no FPU) who says they successfully used NetBSD on it.
mark_k is offline  
Old 20 February 2013, 16:22   #190
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,575
Different kernel with FPU emulation compiled in? As usual, I won't assume anything. Must have confirmed working exact same installation.
Toni Wilen is offline  
Old 20 February 2013, 16:30   #191
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,351
I thought that might have been the reason for the problem. Perhaps the NetBSD installer installs an FPU-only kernel when run on a machine with FPU. So booting an already-installed NetBSD HDF on an FPU-less machine would not work.

But I just tried running the NetBSD 1.3.3 installer with A3000/030/noFPU config and got a couple of Illegal instruction messages. This line was output a couple of times in the WinUAE log:
B-Trap f227 at 1015b6 (00000000)

Running the 6.0.1 installer I got the first Illegal instruction message after typing y to proceed with installation.

Edit to add: Same with with emulated A600/030noFPU config. (At the initial boot prompt you need to type netbsd -c600 to tell the boot loader it's running on an A600, since it's not clever enough to figure that out.)

Last edited by mark_k; 20 February 2013 at 17:50.
mark_k is offline  
Old 20 February 2013, 21:09   #192
strim
NetBSD developer
 
Join Date: May 2012
Location: Warsaw, Poland
Posts: 411
Quote:
Originally Posted by mark_k View Post
Since I got the problem with 68030 + no FPU testing NetBSD 6.0.1, I thought it was possible there has been some regression with NetBSD and no FPU, if all the NetBSD devs' machines have FPUs.
I have an A600 with ACA630 (so no FPU) and HEAD branch NetBSD works just fine. I'm not sure about 6.0.1, but I think that nothing FPU-related has changed since 6.0. So it should work too.

And I think that all SHARP X68000 machines used by devs don't have FPU. So they would also notice.

Kernel does not use FPU at all, even on FPU enabled machines. So the problem with FPU emulation will appear only when running user space program.

FPU emulation is implemented in src/sys/arch/m68k/fpe.

Last edited by strim; 20 February 2013 at 21:15.
strim is offline  
Old 20 February 2013, 22:29   #193
Wepl
Moderator
 
Wepl's Avatar
 
Join Date: Nov 2001
Location: Germany
Posts: 876
Quote:
Originally Posted by strim View Post
Kernel does not use FPU at all, even on FPU enabled machines. So the problem with FPU emulation will appear only when running user space program.
I can hardly believe that the kernel doesn't use fpu instructions because for task switching it has to save/restore the status/registers.
Wepl is offline  
Old 20 February 2013, 22:39   #194
strim
NetBSD developer
 
Join Date: May 2012
Location: Warsaw, Poland
Posts: 411
Quote:
Originally Posted by Wepl View Post
I can hardly believe that the kernel doesn't use fpu instructions because for task switching it has to save/restore the status/registers.
That's the only exception. Other than that using FPU in kernel is forbidden.
strim is offline  
Old 21 February 2013, 14:47   #195
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,351
In case it might help figure out what's going on, the code which prints messages like Illegal instruction seems to be in src/sys/arch/amiga/amiga/trap.c.
mark_k is offline  
Old 21 February 2013, 16:02   #196
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,575
It appears to be loader problem, loadbsd works, gobsd does not. (1.3.3 tested)

Line-F vector is not modified when gobsd is used (points to original fpfline function) but it points to fpemuli (fpu emulation function) when loadbsd is used.

It seems "vectab" does not point to correct address when gobsd is used. (vectab[11] = fpuemuli is in machdep.c)

EDIT: updated winuae.zip required, 68020/030 without FPU F-line exceptions got slightly broken in previous 68040+ FPU updates..

Last edited by Toni Wilen; 21 February 2013 at 16:22.
Toni Wilen is offline  
Old 21 February 2013, 16:36   #197
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,351
I'll check the latest winuae.zip.

With the previous winuae.zip, I just tried running the NetBSD 1.3.3 installer (as opposed to booting the full pre-installed OS) using loadbsd netbsd with A3000/030/no FPU config and got the Illegal instruction messages. The same happened when I booted the pre-installed 1.3.3 HDF to multi-user mode with loadbsd -a netbsd.

What about the NetBSD 6.0.1 boot loader though? Later versions of NetBSD don't use loadbsd/gobsd, they use custom boot code.
mark_k is offline  
Old 21 February 2013, 16:51   #198
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,351
With the latest winuae.zip and A3000/noFPU config there are still some Illegal instruction messages on booting the pre-installed NetBSD 6.0.1 HDF.

And running the NetBSD 1.6.2 installer, there is an Illegal instruction message at the creating filesystems stage.
Attached Thumbnails
Click image for larger version

Name:	NetBSD601_noFPU_2013-02-21.png
Views:	241
Size:	8.5 KB
ID:	34375   Click image for larger version

Name:	NetBSD162installer_noFPU_2013-02-21.png
Views:	244
Size:	7.3 KB
ID:	34376  

Last edited by mark_k; 21 February 2013 at 16:59.
mark_k is offline  
Old 21 February 2013, 16:52   #199
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,575
I don't really care anymore, everything points to loader bug or something similar, I am not going to waste anymore time to debug this.

Perhaps it assumes running setpatch or something.

EDIT: you can easily check if f-line vector is correct, break to debugger after netbsd has booted, type "mmu 5", "i", check address of LINEF EMU, disassemble it, it is wrong if it starts with cmp.w #$202c,something (this is correct if 68040+ or 68881 or 68882 is installed) and correct if it starts with addq.l #1,something.

Last edited by Toni Wilen; 21 February 2013 at 17:08.
Toni Wilen is offline  
Old 21 February 2013, 17:12   #200
strim
NetBSD developer
 
Join Date: May 2012
Location: Warsaw, Poland
Posts: 411
Quote:
Originally Posted by mark_k View Post
What about the NetBSD 6.0.1 boot loader though? Later versions of NetBSD don't use loadbsd/gobsd, they use custom boot code.
NetBSD boot block loader should be functionally equivalent to loadbsd. Also, using loadbsd is still a supported way to boot the kernel.
strim is offline  
 


Currently Active Users Viewing This Thread: 2 (0 members and 2 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
68040 vs 68060 tesla support.Hardware 10 20 April 2013 19:13
68040 MMU jsr/bsr Toni Wilen Coders. General 5 28 April 2010 20:57
68060 fpu not available mmu not active amigarlz support.Hardware 6 18 March 2010 06:35
WTB: 68030 or 68040 accelerator for A2000 Shadowfire MarketPlace 2 19 September 2009 17:52
68030/mmu Support in WinUAE dkovacs request.UAE Wishlist 19 22 August 2005 14:42

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 14:15.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.14145 seconds with 14 queries