Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/cobalt/cobalt Cleanup some messages.
details: https://anonhg.NetBSD.org/src/rev/b6b2c4e40cae
branches: trunk
changeset: 750140:b6b2c4e40cae
user: matt <matt%NetBSD.org@localhost>
date: Fri Dec 18 23:22:28 2009 +0000
description:
Cleanup some messages.
Change arguments to sign extend properly.
GENERIC64 now gets to boot prompt in gxemul.
diffstat:
sys/arch/cobalt/cobalt/machdep.c | 32 ++++++++++++++++++--------------
1 files changed, 18 insertions(+), 14 deletions(-)
diffs (90 lines):
diff -r 458c51284457 -r b6b2c4e40cae sys/arch/cobalt/cobalt/machdep.c
--- a/sys/arch/cobalt/cobalt/machdep.c Fri Dec 18 22:37:18 2009 +0000
+++ b/sys/arch/cobalt/cobalt/machdep.c Fri Dec 18 23:22:28 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.107 2009/12/17 15:29:47 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.108 2009/12/18 23:22:28 matt Exp $ */
/*-
* Copyright (c) 2006 Izumi Tsutsui. All rights reserved.
@@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.107 2009/12/17 15:29:47 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.108 2009/12/18 23:22:28 matt Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -101,7 +101,7 @@
struct vm_map *phys_map = NULL;
int physmem; /* Total physical memory */
-char *bootinfo = NULL; /* pointer to bootinfo structure */
+void *bootinfo = NULL; /* pointer to bootinfo structure */
char bootstring[512]; /* Boot command */
int netboot; /* Are we netbooting? */
@@ -126,7 +126,7 @@
phys_ram_seg_t mem_clusters[VM_PHYSSEG_MAX];
int mem_cluster_cnt;
-void mach_init(unsigned int, u_int, int32_t);
+void mach_init(intptr_t, u_int, int32_t);
void decode_bootstring(void);
static char *strtok_light(char *, const char);
static u_int read_board_id(void);
@@ -143,10 +143,9 @@
* Do all the stuff that locore normally does before calling main().
*/
void
-mach_init(unsigned int memsize32, u_int bim, int32_t bip32)
+mach_init(intptr_t memsize, u_int bim, int32_t bip32)
{
- size_t memsize = memsize32;
- char *bip = (void *)(intptr_t)bip32;
+ void *bip = (void *)(intptr_t)bip32;
char *kernend;
u_long first, last;
extern char edata[], end[];
@@ -201,12 +200,17 @@
bootinfo = bip;
bi_magic = lookup_bootinfo(BTINFO_MAGIC);
- if (bi_magic == NULL || bi_magic->magic != BOOTINFO_MAGIC)
- bi_msg = "invalid bootinfo structure.\n";
- else
+ if (bi_magic == NULL) {
+ bi_msg = "missing bootinfo structure";
+ bim = (uintptr_t)bip;
+ } else if (bi_magic->magic != BOOTINFO_MAGIC) {
+ bi_msg = "invalid bootinfo structure";
+ bim = bi_magic->magic;
+ } else
bi_msg = NULL;
- } else
- bi_msg = "invalid bootinfo (standalone boot?)\n";
+ } else {
+ bi_msg = "invalid bootinfo (standalone boot?)";
+ }
#if NKSYMS || defined(DDB) || defined(MODULAR)
bi_syms = lookup_bootinfo(BTINFO_SYMTAB);
@@ -258,7 +262,7 @@
consinit();
if (bi_msg != NULL)
- printf(bi_msg);
+ printf("%s: magic=%#x\n", bi_msg, bim);
uvm_setpagesize();
@@ -495,7 +499,7 @@
* Look up information in bootinfo of boot loader.
*/
void *
-lookup_bootinfo(int type)
+lookup_bootinfo(unsigned int type)
{
struct btinfo_common *bt;
char *help = bootinfo;
Home |
Main Index |
Thread Index |
Old Index