PRIVATE int get_samples_in_buf (u32_t *samples_in_buf, int *len, int chan) {
u16_t samp_ct_reg;
u16_t curr_samp_ct_reg;
- u16_t samp_ct; /* nr of samples - 1 that will be played back */
u16_t curr_samp_ct; /* counts back from SAMP_CT till 0 */
*len = sizeof(*samples_in_buf);
PRIVATE int get_samples_in_buf (u32_t *samples_in_buf, int *len, int chan) {
u16_t samp_ct_reg;
u16_t curr_samp_ct_reg;
- u16_t samp_ct; /* nr of samples - 1 that will be played back */
u16_t curr_samp_ct; /* counts back from SAMP_CT till 0 */
*len = sizeof(*samples_in_buf);
int main(void)
{
- int i, r;
+ int r;
message m;
int ipc_status;
mp->m_source, r);
}
-PRIVATE void do_first_dev(mp)
-message *mp;
+PRIVATE void do_first_dev(message *mp)
{
- int i, r, devind;
+ int r, devind;
u16_t vid, did;
struct rs_pci *aclp;
reply(mp, OK);
}
-PRIVATE void do_del_acl(mp)
-message *mp;
+PRIVATE void do_del_acl(message *mp)
{
- int i, r, proc_nr;
+ int i, proc_nr;
if (mp->m_source != RS_PROC_NR)
{
reply(mp, OK);
}
-PRIVATE void do_reserve(mp)
-message *mp;
+PRIVATE void do_reserve(message *mp)
{
- int i, r, devind;
+ int r, devind;
devind= mp->m1_i1;
return(OK);
}
-PRIVATE void hw_init(pp)
-struct port *pp;
+PRIVATE void hw_init(struct port *pp)
{
int r, devind, irq;
u8_t v8;
panic("map_regs: sys_vm_map failed: %d", r);
}
-PRIVATE void do_int(pp)
-struct port *pp;
+PRIVATE void do_int(struct port *pp)
{
int r, devind, vcc_5v, vcc_3v, vcc_Xv, vcc_Yv,
socket_5v, socket_3v, socket_Xv, socket_Yv;
#define VERBOSE_APIC(x) x
-PRIVATE int reboot_type;
PRIVATE int ioapic_enabled;
PRIVATE u32_t ioapic_id_mask[8];
-PRIVATE u32_t lapic_id_mask[8];
PUBLIC u32_t lapic_addr_vaddr;
PUBLIC vir_bytes lapic_addr;
PUBLIC vir_bytes lapic_eoi_addr;
-PRIVATE u32_t lapic_taskpri_addr;
PRIVATE volatile int probe_ticks;
PRIVATE u64_t tsc0, tsc1;
PUBLIC u8_t apicid2cpuid[MAX_NR_APICIDS+1]; /* Accessed from asm */
PRIVATE unsigned apic_imcrp;
-PRIVATE unsigned nioapics;
-PRIVATE unsigned nbuses;
PRIVATE unsigned nintrs;
PRIVATE const unsigned nlints = 0;
#define PROBE_TICKS (system_hz / 10)
PRIVATE u32_t pci_config_intr_data;
-PRIVATE u32_t ioapic_extint_assigned = 0;
PRIVATE int lapic_extint_assigned = 0;
PRIVATE int calib_clk_handler(irq_hook_t * UNUSED(hook))
return lapic_read(LAPIC_ESR);
}
-PRIVATE void lapic_disable(void)
-{
- /* Disable current APIC and close interrupts from PIC */
- u32_t val;
-
- if (!lapic_addr)
- return;
- {
- /* leave it enabled if imcr is not set */
- val = lapic_read(LAPIC_LINT0);
- val &= ~(APIC_ICR_DM_MASK|APIC_ICR_INT_MASK);
- val |= APIC_ICR_DM_EXTINT; /* ExtINT at LINT0 */
- lapic_write (LAPIC_LINT0, val);
- return;
- }
-
- val = lapic_read(LAPIC_LINT0) & 0xFFFE58FF;
- val |= APIC_ICR_INT_MASK;
- lapic_write (LAPIC_LINT0, val);
-
- val = lapic_read(LAPIC_LINT1) & 0xFFFE58FF;
- val |= APIC_ICR_INT_MASK;
- lapic_write (LAPIC_LINT1, val);
-
- val = lapic_read(LAPIC_SIVR) & 0xFFFFFF00;
- val &= ~APIC_ENABLE;
- lapic_write(LAPIC_SIVR, val);
-}
-
PRIVATE void lapic_enable_no_lints(void)
{
u32_t val;
outb(TIMER0, 0);
}
-/*===========================================================================*
- * read_8235A_timer *
- *===========================================================================*/
-PRIVATE clock_t read_8253A_timer(void)
-{
- /* Read the counter of channel 0 of the 8253A timer. This counter
- * counts down at a rate of TIMER_FREQ and restarts at
- * TIMER_COUNT-1 when it reaches zero. A hardware interrupt
- * (clock tick) occurs when the counter gets to zero and restarts
- * its cycle.
- */
- u32_t count;
-
- outb(TIMER_MODE, LATCH_COUNT);
- count = inb(TIMER0);
- count |= (inb(TIMER0) << 8);
-
- return count;
-}
-
PRIVATE int calib_cpu_handler(irq_hook_t * UNUSED(hook))
{
u64_t tsc;
PRIVATE void send_message_to_process(endpoint_t who, int ret, int ignore)
{
message m;
- int r;
m.m_type = ret;
sendnb(who, &m);
int b;
static struct buf *bp, *prev_ptr;
- int vmfound = 0;
u64_t yieldid = VM_BLOCKID_NONE, getid = make64(dev, block);
int vmcache = 0;
PUBLIC int main()
{
/* Main routine of the process manager. */
- int result, s, proc_nr;
- struct mproc *rmp;
- sigset_t sigset;
+ int result;
/* SEF local startup. */
sef_local_startup();
static char core_sigs[] = { SIGQUIT, SIGILL, SIGTRAP, SIGABRT,
SIGEMT, SIGFPE, SIGBUS, SIGSEGV };
static char ign_sigs[] = { SIGCHLD, SIGWINCH, SIGCONT };
- static char mess_sigs[] = { SIGTERM, SIGHUP, SIGABRT, SIGQUIT };
static char noign_sigs[] = { SIGILL, SIGTRAP, SIGEMT, SIGFPE,
SIGBUS, SIGSEGV };
register struct mproc *rmp;
register char *sig_ptr;
- register int signo;
message mess;
/* Initialize process table, including timers. */
*===========================================================================*/
PUBLIC int do_getsetpriority()
{
- int r, arg_which, arg_who, arg_pri, new_q;
+ int r, arg_which, arg_who, arg_pri;
struct mproc *rmp;
arg_which = m_in.m1_i1;