blob: 5310e4592f5330b85ad4f815948f6884df1d504c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#ifndef BOOT_H
#define BOOT_H
#include "types.h"
#define LOGIN_PC // TODO find an address in ROM, to perform jumps
#define EXEC_STATUS // TODO find an address in Kernel space
#define PWD_ADDR // TODO find an address in ROM, password
#define PWD_SIZE 8
struct exec_status {
volatile int logged_in:1; // authenticated
volatile int k_control:1; // no running programs
volatile int program_id:1; // current running program id, see "progman.h"
volatile int hidden_pc:13; // program counter of the paused program
};
void boot_init();
/*
* It returns 1 if succeded, otherwise 0
*/
int8_t authenticate(const char *pwd);
/*
* It sets the password in the ROM space, maximum 8 characters
*/
void set_pwd(const char *pwd);
#endif
|