Remove legacy boot monitor vars
This commit is contained in:
parent
46581e701a
commit
cb54d96eec
@ -130,14 +130,9 @@ struct cpu_info {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct machine {
|
struct machine {
|
||||||
int pc_at;
|
|
||||||
int ps_mca;
|
|
||||||
int processor;
|
|
||||||
unsigned processors_count; /* how many cpus are available */
|
unsigned processors_count; /* how many cpus are available */
|
||||||
unsigned bsp_id; /* id of the bootstrap cpu */
|
unsigned bsp_id; /* id of the bootstrap cpu */
|
||||||
int padding; /* used to be protected */
|
int padding; /* used to be protected */
|
||||||
int vdu_ega;
|
|
||||||
int vdu_vga;
|
|
||||||
int apic_enabled; /* does the kernel use APIC or not? */
|
int apic_enabled; /* does the kernel use APIC or not? */
|
||||||
phys_bytes acpi_rsdp; /* where is the acpi RSDP */
|
phys_bytes acpi_rsdp; /* where is the acpi RSDP */
|
||||||
};
|
};
|
||||||
|
@ -37,8 +37,6 @@
|
|||||||
#define SUB_PER_DRIVE (NR_PARTITIONS * NR_PARTITIONS)
|
#define SUB_PER_DRIVE (NR_PARTITIONS * NR_PARTITIONS)
|
||||||
#define NR_SUBDEVS (MAX_DRIVES * SUB_PER_DRIVE)
|
#define NR_SUBDEVS (MAX_DRIVES * SUB_PER_DRIVE)
|
||||||
|
|
||||||
PRIVATE int pc_at = 1; /* What about PC XTs? */
|
|
||||||
|
|
||||||
/* Variables. */
|
/* Variables. */
|
||||||
PRIVATE struct wini { /* main drive struct, one entry per drive */
|
PRIVATE struct wini { /* main drive struct, one entry per drive */
|
||||||
unsigned cylinders; /* number of cylinders */
|
unsigned cylinders; /* number of cylinders */
|
||||||
@ -466,11 +464,9 @@ PRIVATE void w_init()
|
|||||||
reg86.u.w.bx = 0x55AA;
|
reg86.u.w.bx = 0x55AA;
|
||||||
reg86.u.b.dl = drive_id;
|
reg86.u.b.dl = drive_id;
|
||||||
|
|
||||||
if (pc_at) {
|
r= sys_int86(®86);
|
||||||
r= sys_int86(®86);
|
if (r != OK)
|
||||||
if (r != OK)
|
panic("BIOS call failed: %d", r);
|
||||||
panic("BIOS call failed: %d", r);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(reg86.u.w.f & 0x0001) && reg86.u.w.bx == 0xAA55
|
if (!(reg86.u.w.f & 0x0001) && reg86.u.w.bx == 0xAA55
|
||||||
&& (reg86.u.w.cx & 0x0001)) {
|
&& (reg86.u.w.cx & 0x0001)) {
|
||||||
|
@ -950,7 +950,7 @@ tty_t *tp;
|
|||||||
vid_port = bios_crtbase;
|
vid_port = bios_crtbase;
|
||||||
scr_width = bios_columns;
|
scr_width = bios_columns;
|
||||||
font_lines = bios_fontlines;
|
font_lines = bios_fontlines;
|
||||||
scr_lines = machine.vdu_ega ? bios_rows+1 : 25;
|
scr_lines = bios_rows+1;
|
||||||
|
|
||||||
if (color) {
|
if (color) {
|
||||||
vid_base = COLOR_BASE;
|
vid_base = COLOR_BASE;
|
||||||
@ -959,8 +959,8 @@ tty_t *tp;
|
|||||||
vid_base = MONO_BASE;
|
vid_base = MONO_BASE;
|
||||||
vid_size = MONO_SIZE;
|
vid_size = MONO_SIZE;
|
||||||
}
|
}
|
||||||
if (machine.vdu_ega) vid_size = EGA_SIZE;
|
vid_size = EGA_SIZE;
|
||||||
wrap = ! machine.vdu_ega;
|
wrap = 0;
|
||||||
|
|
||||||
console_memory = vm_map_phys(SELF, (void *) vid_base, vid_size);
|
console_memory = vm_map_phys(SELF, (void *) vid_base, vid_size);
|
||||||
|
|
||||||
@ -1202,7 +1202,6 @@ message *m;
|
|||||||
|
|
||||||
seq2[6].value= color ? 0x0E : 0x0A;
|
seq2[6].value= color ? 0x0E : 0x0A;
|
||||||
|
|
||||||
if (!machine.vdu_ega) return(ENOTTY);
|
|
||||||
result = ga_program(seq1); /* bring font memory into view */
|
result = ga_program(seq1); /* bring font memory into view */
|
||||||
|
|
||||||
if(sys_safecopyfrom(m->m_source, (cp_grant_id_t) m->IO_GRANT, 0,
|
if(sys_safecopyfrom(m->m_source, (cp_grant_id_t) m->IO_GRANT, 0,
|
||||||
|
@ -838,7 +838,6 @@ PRIVATE void set_leds()
|
|||||||
{
|
{
|
||||||
/* Set the LEDs on the caps, num, and scroll lock keys */
|
/* Set the LEDs on the caps, num, and scroll lock keys */
|
||||||
int s;
|
int s;
|
||||||
if (! machine.pc_at) return; /* PC/XT doesn't have LEDs */
|
|
||||||
|
|
||||||
kb_wait(); /* wait for buffer empty */
|
kb_wait(); /* wait for buffer empty */
|
||||||
if ((s=sys_outb(KEYBD, LED_CODE)) != OK)
|
if ((s=sys_outb(KEYBD, LED_CODE)) != OK)
|
||||||
|
@ -138,7 +138,7 @@ PRIVATE void inkernel_disaster(struct proc *saved_proc,
|
|||||||
{
|
{
|
||||||
#if USE_SYSDEBUG
|
#if USE_SYSDEBUG
|
||||||
if(ep) {
|
if(ep) {
|
||||||
if (ep->msg == NULL || machine.processor < ep->minprocessor)
|
if (ep->msg == NULL)
|
||||||
printf("\nIntel-reserved exception %d\n", frame->vector);
|
printf("\nIntel-reserved exception %d\n", frame->vector);
|
||||||
else
|
else
|
||||||
printf("\n%s\n", ep->msg);
|
printf("\n%s\n", ep->msg);
|
||||||
|
@ -39,7 +39,7 @@ PUBLIC int intr_init(const int mine, const int auto_eoi)
|
|||||||
* one slaved at IRQ 2. (We don't have to deal with the PC that
|
* one slaved at IRQ 2. (We don't have to deal with the PC that
|
||||||
* has just one controller, because it must run in real mode.)
|
* has just one controller, because it must run in real mode.)
|
||||||
*/
|
*/
|
||||||
outb( INT_CTL, machine.ps_mca ? ICW1_PS : ICW1_AT);
|
outb( INT_CTL, ICW1_AT);
|
||||||
outb( INT_CTLMASK, mine == INTS_MINIX ? IRQ0_VECTOR : BIOS_IRQ0_VEC);
|
outb( INT_CTLMASK, mine == INTS_MINIX ? IRQ0_VECTOR : BIOS_IRQ0_VEC);
|
||||||
/* ICW2 for master */
|
/* ICW2 for master */
|
||||||
outb( INT_CTLMASK, (1 << CASCADE_IRQ));
|
outb( INT_CTLMASK, (1 << CASCADE_IRQ));
|
||||||
@ -49,7 +49,7 @@ PUBLIC int intr_init(const int mine, const int auto_eoi)
|
|||||||
else
|
else
|
||||||
outb( INT_CTLMASK, ICW4_AT_MASTER);
|
outb( INT_CTLMASK, ICW4_AT_MASTER);
|
||||||
outb( INT_CTLMASK, ~(1 << CASCADE_IRQ)); /* IRQ 0-7 mask */
|
outb( INT_CTLMASK, ~(1 << CASCADE_IRQ)); /* IRQ 0-7 mask */
|
||||||
outb( INT2_CTL, machine.ps_mca ? ICW1_PS : ICW1_AT);
|
outb( INT2_CTL, ICW1_AT);
|
||||||
outb( INT2_CTLMASK, mine == INTS_MINIX ? IRQ8_VECTOR : BIOS_IRQ8_VEC);
|
outb( INT2_CTLMASK, mine == INTS_MINIX ? IRQ8_VECTOR : BIOS_IRQ8_VEC);
|
||||||
/* ICW2 for slave */
|
/* ICW2 for slave */
|
||||||
outb( INT2_CTLMASK, CASCADE_IRQ); /* ICW3 is slave nr */
|
outb( INT2_CTLMASK, CASCADE_IRQ); /* ICW3 is slave nr */
|
||||||
|
@ -41,10 +41,21 @@ PUBLIC void cstart(
|
|||||||
/* Copy the boot parameters to the local buffer. */
|
/* Copy the boot parameters to the local buffer. */
|
||||||
arch_get_params(params_buffer, sizeof(params_buffer));
|
arch_get_params(params_buffer, sizeof(params_buffer));
|
||||||
|
|
||||||
|
#if USE_BOOTPARAM
|
||||||
/* determine verbosity */
|
/* determine verbosity */
|
||||||
if ((value = env_get(VERBOSEBOOTVARNAME)))
|
if ((value = env_get(VERBOSEBOOTVARNAME)))
|
||||||
verboseboot = atoi(value);
|
verboseboot = atoi(value);
|
||||||
|
|
||||||
|
/* Get clock tick frequency. */
|
||||||
|
value = env_get("hz");
|
||||||
|
if(value)
|
||||||
|
system_hz = atoi(value);
|
||||||
|
if(!value || system_hz < 2 || system_hz > 50000) /* sanity check */
|
||||||
|
system_hz = DEFAULT_HZ;
|
||||||
|
#else /* !USE_BOOTPARAM */
|
||||||
|
system_hz = DEFAULT_HZ;
|
||||||
|
#endif
|
||||||
|
|
||||||
DEBUGEXTRA(("cstart\n"));
|
DEBUGEXTRA(("cstart\n"));
|
||||||
|
|
||||||
/* Record miscellaneous information for user-space servers. */
|
/* Record miscellaneous information for user-space servers. */
|
||||||
@ -61,29 +72,6 @@ PUBLIC void cstart(
|
|||||||
for(h = 0; h < _LOAD_HISTORY; h++)
|
for(h = 0; h < _LOAD_HISTORY; h++)
|
||||||
kloadinfo.proc_load_history[h] = 0;
|
kloadinfo.proc_load_history[h] = 0;
|
||||||
|
|
||||||
/* Processor? Decide if mode is protected for older machines. */
|
|
||||||
machine.processor=atoi(env_get("processor"));
|
|
||||||
|
|
||||||
/* XT, AT or MCA bus? */
|
|
||||||
value = env_get("bus");
|
|
||||||
if (value == NULL || strcmp(value, "at") == 0) {
|
|
||||||
machine.pc_at = TRUE; /* PC-AT compatible hardware */
|
|
||||||
} else if (strcmp(value, "mca") == 0) {
|
|
||||||
machine.pc_at = machine.ps_mca = TRUE; /* PS/2 with micro channel */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Type of VDU: */
|
|
||||||
value = env_get("video"); /* EGA or VGA video unit */
|
|
||||||
if (strcmp(value, "ega") == 0) machine.vdu_ega = TRUE;
|
|
||||||
if (strcmp(value, "vga") == 0) machine.vdu_vga = machine.vdu_ega = TRUE;
|
|
||||||
|
|
||||||
/* Get clock tick frequency. */
|
|
||||||
value = env_get("hz");
|
|
||||||
if(value)
|
|
||||||
system_hz = atoi(value);
|
|
||||||
if(!value || system_hz < 2 || system_hz > 50000) /* sanity check */
|
|
||||||
system_hz = DEFAULT_HZ;
|
|
||||||
|
|
||||||
#ifdef DEBUG_SERIAL
|
#ifdef DEBUG_SERIAL
|
||||||
/* Intitialize serial debugging */
|
/* Intitialize serial debugging */
|
||||||
value = env_get(SERVARNAME);
|
value = env_get(SERVARNAME);
|
||||||
|
@ -213,13 +213,7 @@ PUBLIC void kenv_dmp()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Dump of kinfo and machine structures.\n\n");
|
printf("Dump of kinfo structure.\n\n");
|
||||||
printf("Machine structure:\n");
|
|
||||||
printf("- pc_at: %3d\n", machine.pc_at);
|
|
||||||
printf("- ps_mca: %3d\n", machine.ps_mca);
|
|
||||||
printf("- processor: %3d\n", machine.processor);
|
|
||||||
printf("- vdu_ega: %3d\n", machine.vdu_ega);
|
|
||||||
printf("- vdu_vga: %3d\n\n", machine.vdu_vga);
|
|
||||||
printf("Kernel info structure:\n");
|
printf("Kernel info structure:\n");
|
||||||
printf("- code_base: %5lu\n", kinfo.code_base);
|
printf("- code_base: %5lu\n", kinfo.code_base);
|
||||||
printf("- code_size: %5lu\n", kinfo.code_size);
|
printf("- code_size: %5lu\n", kinfo.code_size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user