more bootblock signatute

This commit is contained in:
Laurent Vivier 2004-10-07 19:52:44 +00:00
parent f909655654
commit 5c6bccb928
2 changed files with 9 additions and 1 deletions

View File

@ -45,10 +45,18 @@ struct emile_l2_header {
u_int32_t gestaltID; u_int32_t gestaltID;
} __attribute__((packed)); } __attribute__((packed));
#define EMILE_ID_MASK 0xFFF0
#define EMILE_VERSION_MASK 0x000F
#define EMILE_ID(a) ((a) & EMILE_ID_MASK)
#define EMILE_VERSION(a) ((a) & EMILE_VERSION_MASK)
#define EMILE_01_SIGNATURE (('E'<<24)|('M'<<16)|('0'<<8)|'1') #define EMILE_01_SIGNATURE (('E'<<24)|('M'<<16)|('0'<<8)|'1')
#define EMILE_02_SIGNATURE (('E'<<24)|('M'<<16)|('0'<<8)|'2') #define EMILE_02_SIGNATURE (('E'<<24)|('M'<<16)|('0'<<8)|'2')
#define EMILE_03_SIGNATURE (('E'<<24)|('M'<<16)|('0'<<8)|'3') #define EMILE_03_SIGNATURE (('E'<<24)|('M'<<16)|('0'<<8)|'3')
#define EMILE_COMPAT(a,b) ( ( EMILE_ID(a) == EMILE_ID(b) ) && \
( EMILE_VERSION(a) <= EMILE_VERSION(b) ) )
enum { enum {
STDOUT_VGA = 0x00000001, STDOUT_VGA = 0x00000001,
STDOUT_SERIAL0 = 0x00000002, STDOUT_SERIAL0 = 0x00000002,

View File

@ -58,7 +58,7 @@ int start(emile_l2_header_t* info)
printf("EMILE v"VERSION" (c) 2004 Laurent Vivier\n"); printf("EMILE v"VERSION" (c) 2004 Laurent Vivier\n");
printf("This is free software, redistribute it under GPL\n"); printf("This is free software, redistribute it under GPL\n");
if (info->signature < EMILE_03_SIGNATURE) if (!EMILE_COMPAT(EMILE_03_SIGNATURE, info->signature))
error("Bad header signature !\n"); error("Bad header signature !\n");
arch_init(); arch_init();