Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interrupt missing after storage domain reset #25

Open
zeph1912 opened this issue Oct 19, 2021 · 3 comments
Open

Interrupt missing after storage domain reset #25

zeph1912 opened this issue Oct 19, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@zeph1912
Copy link
Collaborator

In file_system_write_file_blocks(), OS domain misses an interrupt for STORAGE_DATA queue after storage domain being reset.
As a workaround, I disabled wait_until_empty() in file_system_write_file_blocks().

@zeph1912 zeph1912 added the bug Something isn't working label Oct 19, 2021
@zeph1912
Copy link
Collaborator Author

This is a very tricky issue. The interrupt was working prior to (approximately) hardware updates in October. Then a few other interrupt delivery failed just like this.

I checked the interrupt init code and handler. I suspect the ROM interrupt jumping mechanism we implemented; however, other interrupts (most of them, including other mailboxes) are successfully delivered through our ROM jump.

@mjstalebi
Copy link
Collaborator

There is a problem in yield_network_access;
wait_until_empty(Q_NETWORK_CMD_IN, MAILBOX_QUEUE_SIZE);
never returns , left=65 and queue_size=4;
For now I disabled them in yield_network_access

@zeph1912
Copy link
Collaborator Author

zeph1912 commented Feb 7, 2022

There is a problem in yield_network_access;
wait_until_empty(Q_NETWORK_CMD_IN, MAILBOX_QUEUE_SIZE);
never returns , left=65 and queue_size=4;
For now I disabled them in yield_network_access

I'm not quite sure if this issue in mailbox_network.c is the same. In other cases, the quota left never change (interrupt handler should increment/decrement the quota left).

In the case of network, it seems mailbox_network.c Line 111, everytime Mbox_network_data_in sees a message, it sem_post both interrupts[Q_NETWORK_DATA_IN] and interrupts[Q_NETWORK_CMD_IN], which causes left to be large.

	} else if (mask & OCTOPOS_XMB_IX_RTA) {
		_SEC_HW_DEBUG("interrupt type: OCTOPOS_XMB_IX_RTA");
		if (callback_ref == &Mbox_network_cmd_in) {
			sem_post(&interrupts[Q_NETWORK_CMD_IN]);
		} else if (callback_ref == &Mbox_network_data_in) {
			sem_post(&interrupts[Q_NETWORK_DATA_IN]);
			//Based on the behaviour of
			//handle_mailbox_interrupts in mailbox_network.c of umode
			sem_post(&interrupts[Q_NETWORK_CMD_IN]);
		}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants