Who's Online |
75 user(s) are online ( 29 user(s) are browsing Forums)
Members: 0
Guests: 75
more...
|
|
Headlines |
-
os4testbridge.lha - development/cross
Nov 16, 2026
-
filebrowser.lha - development/library/gui
Nov 16, 2026
-
abadiaextensum.lha - game/adventure
Nov 16, 2026
-
odyssey4.lha - network/browser
Nov 16, 2026
-
sftphandler.lha - driver/handler
Nov 15, 2026
-
amelinium.lha - network/browser
Nov 15, 2026
-
arcedit.lha - utility/archive
Nov 15, 2026
-
v-mplayer.lha - video/media
Nov 15, 2026
-
amissl-sdk.lha - development/misc
Nov 14, 2026
-
amissl.lha - library/misc
Nov 14, 2026
|
|
|
|
|
Re: Sam460 scandal Kernel issue
|
|
Just popping in 
|
@joerg Quote: There is probably very few, or even none at all, ancient m68k software using AllcoEntry(), unless it was used in a C library like the DICE C library, etc., for it's malloc implementation.
Quick grep shows Olsen's Term used it in his Term program in Tools.c/LocalCreateTask(). /* Special version of CreateTask() that allows for arguments to be passed to the Task to be created. */
|
|
|
|
|
|
Re: Sam460 scandal Kernel issue
|
|
Just popping in 
|
@LiveForIt
Maybe I'm the one misunderstanding, but I think sofistisoftware is talking about having 2 GB (visible) in AOS4 on Sam, and after half of that (like ~1 GB) is in use, he gets freezes/crashes.
|
|
|
|
|
|
Re: New multi-core kernel for AmigaOS 4 shown at Pianeta Amiga!
|
Posted on: 10/13 18:06
#3
|
Just popping in 
|
@joerg Quote: No idea how the old signal semaphores are implemented in ExecSG
Would be easy to test, but I have no access to AOS4 at the moment. Only ever had Classic PPC Version with WinUAE on older PC that is stored away. Test: have a Test task block in ObtainSemaphore() on a semaphore that never gets released and look what the task's TDNestCnt is while it's blocked waiting. Quote: The IExec->Mutex*() functions aren't based on Forbid()/Permit() but on PPC atomic instructions.
Atomic instructions alone are not enough. It works for the "fast-path". That is when at time of the MutextObtain() call the mutex is not owned by anyone. If this isn't successful then the mutex must go the "slow-path" way. That involves thinks like adding the task to the wait queue of the semaphore. This is not safe without something that prevents other tasks from doing the exact same thing at the same time. The MutextObtain() autodocs themselves say: -->8-- "if the mutex isn't locked when this function is called on it, it will acquire the lock without the use of Forbid/Permit locking" -->8-- This suggests that the slow-path uses Forbid/Permit. But to be sure could be tested same way as obtainsem-test. To test whether "Forbid()/Permit()" really always triggers reschedule could be tested like this: - create a pri 0 task that busy loops in the background and does nothing else. That task would always be TS_READY. - in the main task (pri 0) in a loop do:
#define Reschedule() Forbid();Permit();
while(!CheckSignal(SIGBREAKF_CTRL_C))
{
int a,b,c,d;
a = SysBase->DispCount; Reschedule();
b = SysBase->DispCount; Reschedule();
c = SysBase->DispCount; Reschedule();
d = SysBase->DispCount; Reschedule();
if (a == b && b == c && c == d) printf("Not rescheduled: %d\n", a);
}
Assuming SysBase->DispCount contains task dispatch count in AOS4 (like it does in AOS Classic)
|
|
|
|
|
|
Re: New multi-core kernel for AmigaOS 4 shown at Pianeta Amiga!
|
|
Just popping in 
|
@joerg Quote: the required workaround on AmigaOS 4.x is for example
IExec->Forbid();
IExec->Permit();
which triggers a reschedule.
Are you sure? Permit() really should only trigger reschedule if one is pending. Like when another task was Signal()ed while in Forbid state. Otherwise for example each and every ObtainSemaphore() call would trigger a reschedule, because I guess also in AOS4 it still is implemented using Forbid/Permit protection (no matter if slow or fast (uncontended) path).
|
|
|
|
|
|
Re: New modern Webrowser Quasar
|
|
Just popping in 
|
@joergQuote:
I implemented AmigaOS 4.x native font rendering in OWB nearly 20 years ago already and it was at least 10 times faster than using libfreetype2.
I'm not sure what you mean with native font rendering. But you still used freetype2 because the ~native AOS4 font engine (bullet "standard") "ft2.library" is using freetype2. So freetype2 is used either way, either directly by app or indirectly through AOS font engine. Quote: All of it open source of course, in Pleyo's OWB SVN. I have looked on old HD and I have some owb-1.9-src.tar.bz2 lying around. 25317487 bytes big.
. 4815 2010-08-14 17:36 owb-1.9-src/BAL/Fonts/WebCore/AmigaOS4/BCGlyphPageTreeNodeAmigaOS4.cpp
17026 2010-08-14 17:36 owb-1.9-src/BAL/Fonts/WebCore/AmigaOS4/BCFontPlatformDataAmigaOS4.cpp
10595 2010-08-14 17:36 owb-1.9-src/BAL/Fonts/WebCore/AmigaOS4/BCSimpleFontDataAmigaOS4.cpp
4861 2010-08-14 17:36 owb-1.9-src/BAL/Fonts/WebCore/AmigaOS4/BCSimpleFontDataAmigaOS4.h
4138 2010-08-14 17:36 owb-1.9-src/BAL/Fonts/WebCore/AmigaOS4/BCFontCacheAmigaOS4.cpp
2527 2010-08-14 17:36 owb-1.9-src/BAL/Fonts/WebCore/AmigaOS4/BCFontCustomPlatformDataAmigaOS4.cpp
3691 2010-08-14 17:36 owb-1.9-src/BAL/Fonts/WebCore/AmigaOS4/BCGlyphBufferAmigaOS4.h
10269 2010-08-14 17:36 owb-1.9-src/BAL/Fonts/WebCore/AmigaOS4/BCFontAmigaOS4.cpp
2152 2010-08-14 17:36 owb-1.9-src/BAL/Fonts/WebCore/AmigaOS4/BCFontCustomPlatformDataAmigaOS4.h
3044 2010-08-14 17:36 owb-1.9-src/BAL/Fonts/WebCore/AmigaOS4/BCFontPlatformDataAmigaOS4.h
static void drawglyphs(GraphicsContext* context, const SimpleFontData* font, const GlyphBuffer& glyphBuffer,
int from, int numGlyphs, const FloatPoint& point, float height, float ascent,
uint32 penalpha, uint32 penr, uint32 peng, uint32 penb, int shadowx, int shadowy)
{
GlyphBufferGlyph* glyphs = const_cast<GlyphBufferGlyph*>(glyphBuffer.glyphs(from));
struct OutlineFont *face = font->m_platformData.m_face;
uint32 ysize = font->m_platformData.m_size;
int32 imagewidth = 0;
uint32 onlyspaces = TRUE;
for (int i = 0; i < numGlyphs; i++) {
if (32 != glyphs[i])
onlyspaces = FALSE;
imagewidth += glyphBuffer.advanceAt(from + i);
}
if (onlyspaces)
return;
if (imagewidth <= 0)
return;
imagewidth += 2 * (ysize * amigaConfig.fontXDPI / 72);
Vector<unsigned> *glyphRGBABuffer = new Vector<unsigned>(imagewidth * height);
if (!glyphRGBABuffer)
return;
glyphRGBABuffer->fill(0);
int32 offsetinimg = 0;
uint32 shiftleft = 0;
for (int i = 0; i < numGlyphs; i++) {
if (32 == glyphs[i]) {
offsetinimg += glyphBuffer.advanceAt(from + i);
continue;
}
struct GlyphMap *glyph;
if (IDiskfont->ESetInfo(&face->olf_EEngine,
OT_GlyphCode, glyphs[i],
TAG_END))
continue; //do not handle error
struct OutlineFont *curface = face;
if (IDiskfont->EObtainInfo(&face->olf_EEngine,
OT_GlyphMap8Bit, &glyph,
TAG_END)) {
uint32 ok = FALSE;
if (amigaConfig.unicodeFace
&& !IDiskfont->ESetInfo(&amigaConfig.unicodeFace->olf_EEngine,
OT_PointHeight, ysize << 16,
OT_GlyphCode, glyphs[i],
TAG_END)
&& !IDiskfont->EObtainInfo(&amigaConfig.unicodeFace->olf_EEngine,
OT_GlyphMap8Bit, &glyph,
TAG_END)) {
curface = amigaConfig.unicodeFace;
ok = TRUE;
}
if (!ok
&& !IDiskfont->ESetInfo(&face->olf_EEngine,
OT_GlyphCode, 0xFFFD,
TAG_END)
&& !IDiskfont->EObtainInfo(&face->olf_EEngine,
OT_GlyphMap8Bit, &glyph,
TAG_END))
ok = TRUE;
if (!ok
&& !IDiskfont->ESetInfo(&face->olf_EEngine,
OT_GlyphCode, '?',
TAG_END)
&& !IDiskfont->EObtainInfo(&face->olf_EEngine,
OT_GlyphMap8Bit, &glyph,
TAG_END))
ok = TRUE;
if (!ok)
continue; //do not handle error
}
if (amigaConfig.fontKerning && i > 0)
if (!IDiskfont->ESetInfo(&curface->olf_EEngine,
OT_GlyphCode, glyphs[i -1],
OT_GlyphCode2, glyphs[i],
TAG_END)) {
FIXED kern = 0;
if (!IDiskfont->EObtainInfo(&curface->olf_EEngine,
OT_TextKernPair, &kern,
TAG_END))
if (kern)
offsetinimg -= (int)(kern / 65536.0 * ysize * amigaConfig.fontYDPI / 72);
}
uint32 left = glyph->glm_BlackLeft;
uint32 top = glyph->glm_BlackTop;
int32 width = glyph->glm_BlackWidth;
int32 gheight = glyph->glm_BlackHeight;
int32 x0 = glyph->glm_X0;
int32 y0 = glyph->glm_Y0;
uint32 modulo = glyph->glm_BMModulo;
int32 imgoffsetx = -x0 + left;
if (offsetinimg + imgoffsetx < 0) {
if (0 == i) {
shiftleft = -imgoffsetx;
if (shiftleft > ysize) {
shiftleft = ysize;
imgoffsetx = -ysize;
}
offsetinimg = shiftleft;
}
else
imgoffsetx = 0;
}
int32 imgoffsety = ascent - y0 + top;
if (imgoffsety < 0)
imgoffsety = 0;
if (offsetinimg + imgoffsetx + width > imagewidth) {
int32 signedwidth = imagewidth - offsetinimg - imgoffsetx;
if (signedwidth < 0)
signedwidth = 0;
width = signedwidth;
}
if (imgoffsety + gheight > (int)height)
gheight = height - imgoffsety;
for (int32 y = 0; y < gheight ; y++) {
uint32 top_mod_left = (y + top) * modulo + left;
for (int32 x = 0; x < width; x++)
if ((offsetinimg + imgoffsetx + x < imagewidth)
&& (offsetinimg + imgoffsetx + x >= 0)) {
uint32 a = penalpha * glyph->glm_BitMap[top_mod_left + x] / 255;
if (a) {
uint32 oldARGB = (*glyphRGBABuffer)[(imgoffsety + y) * imagewidth + offsetinimg + imgoffsetx + x];
if (oldARGB)
a = std::max((oldARGB >> 24), a);
(*glyphRGBABuffer)[(imgoffsety + y) * imagewidth + offsetinimg + imgoffsetx + x] = (a << 24) | ((penr * a / 255) << 16) | ((peng * a / 255) << 8) | (penb * a / 255);
}
}
}
offsetinimg += glyphBuffer.advanceAt(from + i);
IDiskfont->EReleaseInfo(&curface->olf_EEngine, OT_GlyphMap8Bit, glyph, TAG_END);
}
cairo_surface_t *surface = cairo_image_surface_create_for_data((unsigned char *)glyphRGBABuffer->data(), CAIRO_FORMAT_ARGB32, imagewidth, height, imagewidth * 4);
if (surface) {
cairo_t* cr = context->platformContext();
cairo_set_source_surface(cr, surface, point.x() - shiftleft + shadowx, point.y() - ascent + shadowy);
cairo_paint(cr);
cairo_surface_destroy(surface);
}
delete glyphRGBABuffer;
}
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
|
Just popping in 
|
@kas1eQuote: but : by the linux functions: dma_map_single, dma_alloc_coherent, dev_alloc_skb, i.e. stuff which handle IOMMU translation, cache coherency, and memory allocation..
Btw, your allocations with AllocVecTags(). You use "AVT_Alignment, 64". Docs say there's also "AVT_PhysicalAlignemnt" ("mainly used for DMA Drivers"). How does this work later if doing IMMU->SetMemoryAttrs on memory which is only 64 byte aligned, if MMU works per-page? What if someone else has memory in same page and changes memory attributes, too? Maybe try to change your driver (not "dma_test.c" before checking the confusing-index-thing I mentioned) to use allocations with page size alignments.
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
|
Just popping in 
|
@kas1e I'm talking about the old "dma_test.c". Not your new one for cfe. There you do
uint32 buf_idx = i % num_bufs_alloced;
rx_buf_ring[rx_next_buf & (RX_BUF_RING_SIZE - 1)] = XCT_RXB_LEN(RX_BUF_SIZE) | XCT_RXB_ADDR(rx_bufs_phys[buf_idx]);
buf_idx = 0 .. 15, because batch = 16. So you only ever repost rx_bufs_phys[0 .. 15].
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
|
Just popping in 
|
This loop in your dma_test.c is very confusing.
You have 3 different indexes (idx, buf_idx, rx_next_buf).
Sure this is all correct "logic"? That you don't end up having two (or more) identical rx_buf_phys pointers that are active (~dma'ing) in the rx_buf_ring at the same time?
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
|
Just popping in 
|
Surround the "for(;;)" loop with Forbid()/Permit() (or even Disable()/Enable()).
And see if the debug output stops or not after some time. You will not be able to ctrl-c break (unfortunately "btst #6,$bfe001" may not work ...) the loop so you'll always have to reboot.
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
|
Just popping in 
|
@kas1e Quote: Try under Linux? Quote: So we can rule out sharing of same channels.
Theoretically whoever uses it (gfx? gfx driver?) could still screw you if they do something like:
gfx_function_xyz()
if (using_preallocated_dma_channel == FALSE)
{
/* fast path */
using_preallocated_dma_channel = TRUE;
ch = preallocated_dma_channel;
}
else
{
/* slow path */
ch = alloc_channel();
}
DO_DMA_STUFF(ch);
if (using_preallocate_channel == FALSE)
{
free_channel(ch);
}
else
{
using_preallocated_channel = FALSE;
}
Are gfx drivers in AOS4 already loaded/running when S:startup-sequence is executed? If not, maybe try to run network stress test there when as few as possible other things (gfx/audio/...) are running in the background.
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
Posted on: 3/17 17:49
#12
|
Just popping in 
|
@kas1e Quote: Then I fall back to the loop-in-some-list theory. Maybe some stupid little bug that causes some Node (or io request or whatever has a node in it) to be removed while it is not in a list, or added to a new list while it is still part of another list, or added a second time when it already is in the list (io: re-send an io request while it is still pending). Something like that.
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
|
Just popping in 
|
@kas1e Quote: Soft-int with maximum priority died.
One problem with this timer softint loop I forgot is that (unless AOS4 does it differently) the softints caused from a hw interrupt are not executed immediately, but only when the last hw interrupt is done, ie. before returning to usermode. So even if hw timer interrupt would still be running/runnable, a "stuck" lower hw priority interrupt could still prevent the "loop" (which re-sends the timer request) from working. Using AOS4 version of maybe undocumented ~PA_CALL/~PA_FASTCALL instead of PA_SOFTINT for the timer replyport would work better. Because the difference to PA_SOFTINT is that when the timer is replied, it does not result in Cause(), but in a direct function call. Quote: Interrupts with maximum priority died.
The priority of your interrupt handler is just for multiple handlers among same hw irq. Hw pri is still the same whatever it is. You can set it to max. possible values, but interrupts which have higher hardware priority are not affected. So even with the test results it's probably still not 100% sure, that it isn't "simply" some (high pri) interrupt handler being stuck in a loop or that's there endless interrupt flood.
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
Posted on: 3/16 10:44
#14
|
Just popping in 
|
@kas1e Quote: But to be honest i not very well understand why pasemi_dma.resource should allocate anything about network, if it's work of network device, which can (or can not) use this pasemi_dma.resource ?
Aren't this pasemi dma channels ~general purpose things? Meaning there is no specific reserved channels (by cpu/hardware itself) for network or other specific things? Maybe AOS on X1000 accelerates (big) memcpys with this dma-stuff and uses pasemi_dma.resource to dynamically/on-demand allocate channels (more tasks can be doing this memcpys at the same time), so it's not the resource itself allocating channels but users of the resource request allocations.
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
|
Just popping in 
|
@kas1e Quote: CPU died, soft-int died, hardware interrupts died, and this is not MCE too. Then what to check next ? I mean, BUS lockup ? Busy-wait ?
Maybe unlikely, but one possibility is some missing protection when a List is modified by more tasks (or task(s) and interrupt). IIRC I did see cases in some other OS where it did cause funny things like a loop in the List (node->ln_Succ == node). If someone then traversed this List while in Disabled() state you would get a lockup like the one you see (no ints happening, etc.) Or broken protection in the sense of mismatch between lock (forbid/Disable/...) and unlock (permit/enable) calls. Or only lock call, but forgetten unlock call. This once upon a time in another OS caused funny and hard to reproduce disappearing-task problem (disappeared from taskready/taskwait/thistask). Because every so often when the locking nest count - because of overflow/wrappingback - reached the unlocked-value, things were done in a unlocked state, when they shouldn't have been and in the source it did not look like that because the LOCK was there, but missing/mismatched UNLOCK screwed things up.
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
|
Just popping in 
|
Do you do this DMA stuff all by yourself or are you using some OS functionality for it? If the first, maybe the OS uses pasemi DMA "stuff" itself and there's clash because of missing arbitration. Like on AOS Classic if someone tried to use the blitter directly, without OwnBlitter()/DisownBlitter). (Stumbled on https://wiki.amigaos.net/wiki/DMA_Resource, but X1000 isn't mentioned).
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
|
Just popping in 
|
@kas1e Instead of VERTB watchdog, maybe try also timer.device softint loop instead, as that's maybe less relying on "external" stuff (gfx card, bus / pci / ??): 68k sample code From Amiga Dev CD 2.1:
#include <exec/memory.h>
#include <exec/interrupts.h>
#include <devices/timer.h>
#include <dos/dos.h>
#include <clib/exec_protos.h>
#include <clib/dos_protos.h>
#include <clib/alib_protos.h>
#include <stdio.h>
#define MICRO_DELAY 1000
#define OFF 0
#define ON 1
#define STOPPED 2
struct TSIData {
ULONG tsi_Counter;
ULONG tsi_Flag;
struct MsgPort *tsi_Port;
};
struct TSIData *tsidata;
void tsoftcode(void); /* Prototype for our software interrupt code */
void main(void)
{
struct MsgPort *port;
struct Interrupt *softint;
struct timerequest *tr;
ULONG endcount;
/* Allocate message port, data & interrupt structures. Don't use CreatePort() */
/* or CreateMsgPort() since they allocate a signal (don't need that) for a */
/* PA_SIGNAL type port. We need PA_SOFTINT. */
if (tsidata = AllocMem(sizeof(struct TSIData), MEMF_PUBLIC|MEMF_CLEAR))
{
if(port = AllocMem(sizeof(struct MsgPort), MEMF_PUBLIC|MEMF_CLEAR))
{
NewList(&(port->mp_MsgList)); /* Initialize message list */
if (softint = AllocMem(sizeof(struct Interrupt), MEMF_PUBLIC|MEMF_CLEAR))
{
softint->is_Code = tsoftcode; /* The software interrupt routine */
softint->is_Data = tsidata;
softint->is_Node.ln_Pri = 0;
port->mp_Node.ln_Type = NT_MSGPORT; /* Set up the PA_SOFTINT message port */
port->mp_Flags = PA_SOFTINT; /* (no need to make this port public). */
port->mp_SigTask = (struct Task *)softint; /* pointer to interrupt structure */
/* Allocate timerequest */
if (tr = (struct timerequest *) CreateExtIO(port, sizeof(struct timerequest)))
{
/* Open timer.device. NULL is success. */
if (!(OpenDevice("timer.device", UNIT_MICROHZ, (struct IORequest *)tr, 0)))
{
tsidata->tsi_Flag = ON; /* Init data structure to share globally. */
tsidata->tsi_Port = port;
/* Send of the first timerequest to start. IMPORTANT: Do NOT */
/* BeginIO() to any device other than audio or timer from */
/* within a software or hardware interrupt. The BeginIO() code */
/* may allocate memory, wait or perform other functions which */
/* are illegal or dangerous during interrupts. */
printf("starting softint. CTRL-C to break...\n");
tr->tr_node.io_Command = TR_ADDREQUEST; /* Initial iorequest to start */
tr->tr_time.tv_micro = MICRO_DELAY; /* software interrupt. */
BeginIO((struct IORequest *)tr);
Wait(SIGBREAKF_CTRL_C);
endcount = tsidata->tsi_Counter;
printf("timer softint counted %ld milliseconds.\n", endcount);
printf("Stopping timer...\n");
tsidata->tsi_Flag = OFF;
while (tsidata->tsi_Flag != STOPPED) Delay(10);
CloseDevice((struct IORequest *)tr);
}
else printf("couldn't open timer.device\n");
DeleteExtIO(tr);
}
else printf("couldn't create timerequest\n");
FreeMem(softint, sizeof(struct Interrupt));
}
FreeMem(port, sizeof(struct MsgPort));
}
FreeMem(tsidata, sizeof(struct TSIData));
}
}
void tsoftcode(void)
{
struct timerequest *tr;
/* Remove the message from the port. */
tr = (struct timerequest *)GetMsg(tsidata->tsi_Port);
/* Keep on going if main() hasn't set flag to OFF. */
if ((tr) && (tsidata->tsi_Flag == ON))
{
/* increment counter and re-send timerequest--IMPORTANT: This */
/* self-perpetuating technique of calling BeginIO() during a software */
/* interrupt may only be used with the audio and timer device. */
tsidata->tsi_Counter++;
tr->tr_node.io_Command = TR_ADDREQUEST;
tr->tr_time.tv_micro = MICRO_DELAY;
BeginIO((struct IORequest *)tr);
}
/* Tell main() we're out of here. */
else tsidata->tsi_Flag = STOPPED;
}
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
|
Just popping in 
|
Quote: Those changes were mostly a theory in case the irq is shared with other device drivers. Is there a tool (scout? sysmon?) where you can check if there are other installed interrupt handler for the irq your driver is using, or if your driver is the only one using the specific irq? If it's not the only one, maybe try what happens if you disable the driver (sound? whatever) that's using same irq. Maybe another thing you can try is to add a counter and a little serial debug output at beginning of your interrupt and at the end before the return. Don't know how many interrupts are typically happening during net transfer, so don't know if you have to do the output every 1000 ticks, every 10000 ticks or whatever.
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
Posted on: 3/13 19:19
#19
|
Just popping in 
|
@kas1eQuote: kas1e wrote:@Georg You mean probably not just return 0, as we still need to write to RXCH_RESET so, if we not, it surely will lockup, but you mean to strip interrupt handler code to the bare minimum write+return 0 and see if it change anything, that what you mean ?
No, don't strip/change code in the interrupt handler. Only change the return value to always be 0. Unless things are different in AOS4 I think it used to be so that an interrupt handler returns TRUE or 1 if the interrupt handler found out that "yes, the interrupt was for me" and FALSE or 0 if the interrupt handler finds out that it "was not for me". That return value should really just be some optimization for the OS (to call less interrupt handlers if it thinks or it is being told that the interrupt was already handled by the current handler it is calling). But I think it should be safe to always return 0 and then cause other interrupt handlers of an IRQ to be called anyway. I think in theory the interrupt handlers for an IRQ that can be shared anyway need to handle the situation where the handler is called even if the IRQ was triggered by a different device than it's own. What does your interrupt handler return at the moment? Quote: Yep, will check 128 / -128
127 / -128 Quote: You think that CPU still alive even if video dead, mouse/keyboard dead, and serial dead ?
My guess is that it likely is. Would try to run a little program in the background which installs maybe a vertical blank interrupt and periodically outputs something to serial. Don't know if vertb is best for this. It should be some interrupt that has higher (hw) priority than those external device (network/audio/...) interrupts.
|
|
|
|
|
|
Re: x1000 onboard network opensource driver in progress
|
|
Just popping in 
|
What if you change your interrupt code to always return 0?
And/or change interrupt priority (either to very high or very low)?
Edit: also I would add a static counter variable to the interrupt and every 1000 counts or so debug-output it to serial (unconditionally = even if "interrupt is not for me")). To see at lockup what happens: maybe there's interrupt-flood.
I would generally also look more at what happens during lockup (the OS is still likely doing/executing something) not just how to reproduce it.
Edit2: One idea behind the tests mentioned is to check whether there maybe is some interrupt handler installed in the system by some other driver for the same irq that maybe erraneously (sometimes) thinks and says "yes, this irq is for me" - when it isn't - and returning != 0 and then causing other interrupt handlers for the same irq not to be called anymore. So those other interrupt handler never get chance to clear the irq-pending-state and the interrupts from then on keeps happening endlessly -> lockup.
Edited by Georg on 2026/3/13 11:57:20
|
|
|
|
|