arch/sparc/prom/bootstr_32.c

Source file repositories/reference/linux-study-clean/arch/sparc/prom/bootstr_32.c

File Facts

System
Linux kernel
Corpus path
arch/sparc/prom/bootstr_32.c
Extension
.c
Size
1340 bytes
Lines
64
Domain
Architecture Layer
Bucket
arch/sparc
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

while (*arg != 0) {
				/* Leave place for space and null. */
				if (cp >= barg_buf + BARG_LEN - 2)
					/* We might issue a warning here. */
					break;
				*cp++ = *arg++;
			}
			*cp++ = ' ';
			if (cp >= barg_buf + BARG_LEN - 1)
				/* We might issue a warning here. */
				break;
		}
		*cp = 0;
		break;
	case PROM_V2:
	case PROM_V3:
		/*
		 * V3 PROM cannot supply as with more than 128 bytes
		 * of an argument. But a smart bootstrap loader can.
		 */
		strscpy(barg_buf, *romvec->pv_v2bootargs.bootargs, sizeof(barg_buf));
		break;
	default:
		break;
	}

	fetched = 1;
	return barg_buf;
}

Annotation

Implementation Notes