if (OK != (s=sys_getmachine(&machine))) {
panic("MEM","Couldn't get machine information.",s);
}
- if (! machine.protected) {
+ if (! machine.prot) {
m_geom[MEM_DEV].dv_size = cvul64(0x100000); /* 1M for 8086 systems */
} else {
#if _WORD_SIZE == 2
#else
/* Debugging enabled -- verify assertions at run time. */
#ifdef _ANSI
-#define __str(x) # x
-#define __xstr(x) __str(x)
+#define __makestr(x) # x
+#define __xstr(x) __makestr(x)
_PROTOTYPE( void __bad_assertion, (const char *_mess) );
#define assert(expr) ((expr)? (void)0 : \
int pc_at;
int ps_mca;
int processor;
- int protected;
+ int prot;
int vdu_ega;
int vdu_vga;
};
#endif
#ifdef _MINIX
-_PROTOTYPE( int putenv, (const char *_name) );
+_PROTOTYPE( int putenv, (char *_name) );
_PROTOTYPE( int setenv, (const char *name, const char *val, const int f));
/* According to POSIX, getopt should be in unistd.h. What do we do with
intr_disable();
- if (machine.protected) {
+ if (machine.prot) {
/* The AT and newer PS/2 have two interrupt controllers, one master,
* 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.)
#if (CHIP == INTEL)
/* Real mode, or 16/32-bit protected mode? */
kprintf("Executing in %s mode.\n\n",
- machine.protected ? "32-bit protected" : "real");
+ machine.prot ? "32-bit protected" : "real");
#endif
}
phys_bytes base;
struct segdesc_s *segdp;
- if (! machine.protected) {
+ if (! machine.prot) {
base = hclick_to_physb(seg);
} else {
segdp = &gdt[seg >> 3];
* address, for use by a driver doing memory I/O in the A0000 - DFFFF range.
*/
#if _WORD_SIZE == 2
- if (! machine.protected) {
+ if (! machine.prot) {
*seg = phys / HCLICK_SIZE;
*off = phys % HCLICK_SIZE;
} else {
phys_bytes data_bytes;
int privilege;
- if (machine.protected) {
+ if (machine.prot) {
data_bytes = (phys_bytes) (rp->p_memmap[S].mem_vir +
rp->p_memmap[S].mem_len) << CLICK_SHIFT;
if (rp->p_memmap[T].mem_len == 0)
* done below.
*/
#if _WORD_SIZE != 2
- machine.protected = 1;
+ machine.prot = 1;
#endif
/* Record where the kernel and the monitor are. */
*/
machine.processor=atoi(get_value(params, "processor"));
#if _WORD_SIZE == 2
- machine.protected = machine.processor >= 286;
+ machine.prot = machine.processor >= 286;
#endif
- if (! machine.protected) mon_return = 0;
+ if (! machine.prot) mon_return = 0;
/* XT, AT or MCA bus? */
value = get_value(params, "bus");
}
if (index < 0) return(ENOSPC);
- if (! machine.protected) {
+ if (! machine.prot) {
selector = phys / HCLICK_SIZE;
offset = phys % HCLICK_SIZE;
result = OK;
int
putenv(name)
-_CONST char *name;
+char *name;
{
register _CONST char **v = *_penviron;
register char *r;
printf("- pc_at: %3d\n", machine.pc_at);
printf("- ps_mca: %3d\n", machine.ps_mca);
printf("- processor: %3d\n", machine.processor);
- printf("- protected: %3d\n", machine.protected);
+ printf("- protected: %3d\n", machine.prot);
printf("- vdu_ega: %3d\n", machine.vdu_ega);
printf("- vdu_vga: %3d\n\n", machine.vdu_vga);
printf("Kernel info structure:\n");