aarch64: remove some debug messages

This commit is contained in:
K. Lange 2022-03-04 22:07:36 +09:00
parent d932559d79
commit cd04af0a75
2 changed files with 4 additions and 7 deletions

View File

@ -94,8 +94,6 @@ void arch_return_from_signal_handler(struct regs *r) {
/* Interrupt context registers */
POP(sp, struct regs, *r);
dprintf("exit signal handler in SP=%#zx out SP=%#zx r=%#zx\n", sp, r->user_sp, (uintptr_t)r);
asm volatile ("msr SP_EL0, %0" :: "r"(r->user_sp));
}
@ -116,8 +114,6 @@ void arch_enter_signal_handler(uintptr_t entrypoint, int signum, struct regs *r)
uintptr_t sp = (r->user_sp - 128) & 0xFFFFFFFFFFFFFFF0;
dprintf("enter signal handler old SP=%#zx new SP=%#zx r=%#zx\n", r->user_sp, sp, (uintptr_t)r);
/* Save essential registers */
PUSH(sp, struct regs, *r);

View File

@ -45,7 +45,6 @@ void gic_send_sgi(uint8_t intid, int target) {
void gic_assign_interrupt(int irq, int (*callback)(process_t*,int,void*), void * data) {
spin_lock(irq_acquire);
dprintf("gic: assign irq %d\n", irq);
struct irq_callback * cb = calloc(sizeof(struct irq_callback),1);
cb->callback = callback;
@ -54,14 +53,12 @@ void gic_assign_interrupt(int irq, int (*callback)(process_t*,int,void*), void *
cb->next = NULL;
if (irq_callbacks[irq]) {
dprintf("gic: irq %d has an assignment, finding end of chain\n", irq);
struct irq_callback * parent = irq_callbacks[irq];
while (parent->next) {
parent = parent->next;
}
parent->next = cb;
} else {
dprintf("gic: irq %d is new\n", irq);
irq_callbacks[irq] = cb;
}
@ -71,8 +68,10 @@ void gic_assign_interrupt(int irq, int (*callback)(process_t*,int,void*), void *
void gic_map_pci_interrupt(const char * name, uint32_t device, int * int_out, int (*callback)(process_t*,int,void*), void * isr_addr) {
uint32_t phys_hi = (pci_extract_bus(device) << 16) | (pci_extract_slot(device) << 11);
uint32_t pin = pci_read_field(device, PCI_INTERRUPT_PIN, 1);
#if 0
dprintf("%s: device %#x, slot = %d (0x%04x), irq pin = %d\n", name, device, pci_extract_slot(device),
phys_hi, pin);
#endif
uint32_t * pcie_dtb = dtb_find_node_prefix("pcie@");
if (!pcie_dtb) {
@ -96,9 +95,11 @@ void gic_map_pci_interrupt(const char * name, uint32_t device, int * int_out, in
for (int i = 0; i < (int)swizzle(intMap[0])/4; i += 10) {
if (swizzle(intMap[i+2]) == (swizzle(intMask[2]) & phys_hi)) {
if (swizzle(intMap[i+5]) == (swizzle(intMask[5]) & pin)) {
#if 0
dprintf("%s: %#x %#x %#x %#x\n", name,
swizzle(intMap[i+2]), swizzle(intMap[i+3]), swizzle(intMap[i+4]), swizzle(intMap[i+5]));
dprintf("%s: Matching device and pin, Interrupt maps to %d\n", name, swizzle(intMap[i+10]));
#endif
*int_out = swizzle(intMap[i+10]);
gic_assign_interrupt(*int_out, callback, isr_addr);
return;