Lines Matching refs:ai
107 apm_connect(bios_apminfo_t *ai)
117 : "=a" (ai->apm_code32_base),
119 "=c" (ai->apm_code16_base),
120 "=d" (ai->apm_data_base)
127 ai->apm_entry = BIOS_regs.biosr_bx;
129 ai->apm_code_len = BIOS_regs.biosr_si & 0xffff;
130 ai->apm_code16_len = BIOS_regs.biosr_si & 0xffff;
131 ai->apm_data_len = BIOS_regs.biosr_di & 0xffff;
133 ai->apm_code_len = 0xffff - (ai->apm_code32_base & 0xffff);
134 ai->apm_code16_len = 0xffff - (ai->apm_code16_base & 0xffff);
135 ai->apm_data_len = 0xffff - (ai->apm_data_base & 0xffff);
137 if (ai->apm_data_base < BOOTARG_OFF)
138 ai->apm_data_len = PAGE_SIZE - (ai->apm_data_base & PAGE_MASK) - 1;
143 ai->apm_code32_base, ai->apm_code_len,
144 ai->apm_code16_base, ai->apm_code16_len,
145 ai->apm_data_base, ai->apm_data_len);
160 static bios_apminfo_t ai;
165 if ((ai.apm_detail = apm_check())) {
169 if (apm_connect(&ai) != 0) {
178 ai.apm_detail,
179 ai.apm_code32_base, ai.apm_code_len,
180 ai.apm_code16_base, ai.apm_code16_len,
181 ai.apm_data_base, ai.apm_data_len,
182 ai.apm_entry);
188 addbootarg(BOOTARG_APMINFO, sizeof(ai), &ai);
199 printf("apmremove (%d)", ai.apm_detail);
201 if (ai.apm_detail)
202 mem_delete(trunc_page(ai.apm_data_base),
203 round_page(ai.apm_data_base + ai.apm_data_len));