Use platid insted of ProcessorArchitecture because Win CE 1.0 dose not
support ProcessorArchitecture in SYSTEM_INFO. Now version of pbsdboot.exe is 1.7.0.
This commit is contained in:
parent
3e833f70b4
commit
de467400aa
|
@ -0,0 +1 @@
|
|||
#include "../../../include/platid_mask.h"
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: main.c,v 1.5 1999/09/26 07:35:22 uch Exp $ */
|
||||
/* $NetBSD: main.c,v 1.6 1999/09/26 12:46:57 takemura Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 Shin Takemura.
|
||||
|
@ -395,7 +395,7 @@ BOOL CALLBACK DlgProc2(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
case WM_INITDIALOG:
|
||||
SetDlgItemText(hWnd, IDC_ABOUT_EDIT,
|
||||
TEXT("PocketBSD boot loader\r\n")
|
||||
TEXT("Version 1.6.1 1999.09.26\r\n")
|
||||
TEXT("Version 1.7.0 1999.09.26\r\n")
|
||||
TEXT("\r\n")
|
||||
TEXT("Copyright(C) 1999 Shin Takemura,\r\n")
|
||||
TEXT("All rights reserved.\r\n")
|
||||
|
@ -744,6 +744,8 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message,
|
|||
TCHAR wkernel_name[PATHBUFLEN];
|
||||
TCHAR woptions[PATHBUFLEN];
|
||||
char options[PATHBUFLEN*2], kernel_name[PATHBUFLEN*2];
|
||||
platid_t platid;
|
||||
|
||||
char *p, *argv[32];
|
||||
struct bootinfo bi;
|
||||
|
||||
|
@ -884,7 +886,9 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message,
|
|||
/*
|
||||
* Set system infomation
|
||||
*/
|
||||
if (set_system_info()) {
|
||||
platid.dw.dw0 = bi.platid_cpu;
|
||||
platid.dw.dw1 = bi.platid_machine;
|
||||
if (set_system_info(&platid)) {
|
||||
/*
|
||||
* boot !
|
||||
*/
|
||||
|
|
|
@ -86,7 +86,7 @@ BSC32=bscmake.exe
|
|||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /entry:"wWinMainCRTStartup" /debug /machine:MIPS /subsystem:$(CESubsystem)
|
||||
# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
|
||||
# ADD LINK32 commctrl.lib coredll.lib libsa.lib /nologo /incremental:no /debug /machine:MIPS /libpath:"../libsa/WMIPSDbg" /subsystem:$(CESubsystem)
|
||||
# ADD LINK32 commctrl.lib coredll.lib libsa.lib winsock.lib /nologo /incremental:no /debug /machine:MIPS /libpath:"../libsa/WMIPSDbg" /subsystem:$(CESubsystem)
|
||||
# SUBTRACT LINK32 /verbose /profile /pdb:none /map /nodefaultlib
|
||||
PFILE=pfile.exe
|
||||
# ADD BASE PFILE COPY
|
||||
|
@ -423,6 +423,68 @@ SOURCE=.\res\pbsdboot.rc
|
|||
|
||||
!ELSEIF "$(CFG)" == "pbsdboot - Win32 (WCE MIPS) Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\platid.c
|
||||
|
||||
!IF "$(CFG)" == "pbsdboot - Win32 (WCE MIPS) Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "pbsdboot - Win32 (WCE MIPS) Debug"
|
||||
|
||||
DEP_CPP_PLATI=\
|
||||
"..\..\..\..\lib\libkern\libkern.h"\
|
||||
"..\..\..\..\sys\bswap.h"\
|
||||
"..\..\..\..\sys\cdefs.h"\
|
||||
"..\..\..\..\sys\cdefs_aout.h"\
|
||||
"..\..\..\..\sys\cdefs_elf.h"\
|
||||
"..\..\..\..\sys\endian.h"\
|
||||
"..\..\..\..\sys\systm.h"\
|
||||
"..\..\..\..\sys\types.h"\
|
||||
"..\..\..\mips\include\ansi.h"\
|
||||
"..\..\..\mips\include\bswap.h"\
|
||||
"..\..\..\mips\include\cdefs.h"\
|
||||
"..\..\..\mips\include\endian.h"\
|
||||
"..\..\hpcmips\platid.c"\
|
||||
"..\..\include\ansi.h"\
|
||||
"..\..\include\cdefs.h"\
|
||||
"..\..\include\endian.h"\
|
||||
"..\..\include\platid.h"\
|
||||
"..\..\include\platid_generated.h"\
|
||||
"..\include\machine\ansi.h"\
|
||||
"..\include\machine\bswap.h"\
|
||||
"..\include\machine\cdefs.h"\
|
||||
"..\include\machine\endian.h"\
|
||||
"..\include\machine\platid.h"\
|
||||
"..\include\machine\types.h"\
|
||||
"..\include\mips\ansi.h"\
|
||||
"..\include\mips\cdefs.h"\
|
||||
"..\include\mips\endian.h"\
|
||||
"..\include\mips\types.h"\
|
||||
"..\libsa\compat.h"\
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\platid_mask.c
|
||||
|
||||
!IF "$(CFG)" == "pbsdboot - Win32 (WCE MIPS) Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "pbsdboot - Win32 (WCE MIPS) Debug"
|
||||
|
||||
DEP_CPP_PLATID=\
|
||||
"..\..\hpcmips\platid_mask.c"\
|
||||
"..\..\include\platid.h"\
|
||||
"..\..\include\platid_generated.h"\
|
||||
"..\include\machine\platid.h"\
|
||||
"..\libsa\compat.h"\
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
|
@ -560,12 +622,14 @@ DEP_CPP_SYSTE=\
|
|||
"..\..\include\endian.h"\
|
||||
"..\..\include\platid.h"\
|
||||
"..\..\include\platid_generated.h"\
|
||||
"..\..\include\platid_mask.h"\
|
||||
"..\include\machine\ansi.h"\
|
||||
"..\include\machine\bootinfo.h"\
|
||||
"..\include\machine\bswap.h"\
|
||||
"..\include\machine\cdefs.h"\
|
||||
"..\include\machine\endian.h"\
|
||||
"..\include\machine\platid.h"\
|
||||
"..\include\machine\platid_mask.h"\
|
||||
"..\include\machine\types.h"\
|
||||
"..\include\mips\ansi.h"\
|
||||
"..\include\mips\cdefs.h"\
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pbsdboot.h,v 1.3 1999/09/26 02:42:50 takemura Exp $ */
|
||||
/* $NetBSD: pbsdboot.h,v 1.4 1999/09/26 12:46:57 takemura Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 Shin Takemura.
|
||||
|
@ -167,7 +167,7 @@ int pref_write(TCHAR* filename, struct preference_s* buf);
|
|||
/*
|
||||
* systeminfo.c
|
||||
*/
|
||||
int set_system_info(void);
|
||||
int set_system_info(platid_t* platid);
|
||||
|
||||
|
||||
/*
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,2 @@
|
|||
#include "compat.h"
|
||||
#include "../../hpcmips/platid.c"
|
|
@ -0,0 +1,2 @@
|
|||
#include "compat.h"
|
||||
#include "../../hpcmips/platid_mask.c"
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: systeminfo.c,v 1.1 1999/09/26 02:42:51 takemura Exp $ */
|
||||
/* $NetBSD: systeminfo.c,v 1.2 1999/09/26 12:46:58 takemura Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, by UCHIYAMA Yasushi
|
||||
|
@ -26,23 +26,42 @@
|
|||
*
|
||||
*/
|
||||
#include <pbsdboot.h>
|
||||
#include <machine/platid_mask.h>
|
||||
#if 0
|
||||
#define PROCESSOR_LEVEL_R4000 4
|
||||
#define PROCESSOR_LEVEL_R3000 3
|
||||
#define PROCESSOR_REVMAJOR_VR41XX 0x0c
|
||||
#define PROCESSOR_REVMAJOR_TX39XX 0x22
|
||||
#endif
|
||||
|
||||
struct system_info system_info;
|
||||
|
||||
static void dump_archinfo(SYSTEM_INFO*);
|
||||
|
||||
int
|
||||
set_system_info()
|
||||
set_system_info(platid_t *platid)
|
||||
{
|
||||
SYSTEM_INFO info;
|
||||
/*
|
||||
* Set machine dependent information.
|
||||
*/
|
||||
GetSystemInfo(&info);
|
||||
if (platid_match(platid, &platid_mask_CPU_MIPS)) {
|
||||
if (platid_match(platid, &platid_mask_CPU_MIPS_VR_41XX)) {
|
||||
vr41xx_init(&info);
|
||||
} else
|
||||
if (platid_match(platid, &platid_mask_CPU_MIPS_TX)) {
|
||||
tx39xx_init(&info);
|
||||
} else {
|
||||
dump_archinfo(&info);
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
dump_archinfo(&info);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
switch (info.wProcessorArchitecture) {
|
||||
default:
|
||||
dump_archinfo(&info);
|
||||
|
@ -87,6 +106,7 @@ set_system_info()
|
|||
return 0;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (system_info.si_asmcodelen > (signed)system_info.si_pagesize) {
|
||||
msg_printf(MSG_ERROR, whoami,
|
||||
|
@ -102,10 +122,13 @@ set_system_info()
|
|||
static void
|
||||
dump_archinfo(SYSTEM_INFO *info)
|
||||
{
|
||||
msg_printf(MSG_ERROR, whoami, TEXT("Unsupported CPU\n"));
|
||||
#if 0
|
||||
msg_printf(MSG_ERROR, whoami,
|
||||
TEXT("Unknown machine ARCHITECTURE %#x, LEVEL %#x REVISION %#x.\n LCD(%dx%d)\n"),
|
||||
info->wProcessorArchitecture, info->wProcessorLevel,
|
||||
info->wProcessorRevision,
|
||||
GetSystemMetrics(SM_CXSCREEN),
|
||||
GetSystemMetrics(SM_CYSCREEN));
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue