Path: blob/main/sys/powerpc/include/intr_machdep.h
39536 views
/*-1* SPDX-License-Identifier: BSD-2-Clause2*3* Copyright (C) 2002 Benno Rice.4* All rights reserved.5*6* Redistribution and use in source and binary forms, with or without7* modification, are permitted provided that the following conditions8* are met:9* 1. Redistributions of source code must retain the above copyright10* notice, this list of conditions and the following disclaimer.11* 2. Redistributions in binary form must reproduce the above copyright12* notice, this list of conditions and the following disclaimer in the13* documentation and/or other materials provided with the distribution.14*15* THIS SOFTWARE IS PROVIDED BY Benno Rice ``AS IS'' AND ANY EXPRESS OR16* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES17* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.18* IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,19* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,20* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;21* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,22* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR23* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF24* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.25*/2627#ifndef _MACHINE_INTR_MACHDEP_H_28#define _MACHINE_INTR_MACHDEP_H_2930#define INTR_VECTORS 2563132#define MAX_PICS 3233#define MAP_IRQ(node, pin) powerpc_get_irq(node, pin)3435/*36* Default base address for MSI messages on PowerPC37*/38#define MSI_INTEL_ADDR_BASE 0xfee000003940extern device_t root_pic;4142struct trapframe;4344driver_filter_t powerpc_ipi_handler;4546void intrcnt_add(const char *name, u_long **countp);4748u_int powerpc_register_pic(device_t, uint32_t, u_int, u_int, u_int);49u_int powerpc_get_irq(uint32_t, u_int);5051void powerpc_dispatch_intr(u_int, struct trapframe *);52int powerpc_enable_intr(void);53int powerpc_setup_intr(const char *, u_int, driver_filter_t, driver_intr_t,54void *, enum intr_type, void **, int);55int powerpc_teardown_intr(void *);56int powerpc_bind_intr(u_int irq, u_char cpu);57int powerpc_config_intr(int, enum intr_trigger, enum intr_polarity);58int powerpc_fw_config_intr(int irq, int sense_code);5960void powerpc_intr_mask(u_int irq);61void powerpc_intr_unmask(u_int irq);6263#endif /* _MACHINE_INTR_MACHDEP_H_ */646566