-#define BHCTX_ALLOC 4096
-#define MEM_1M 0x100000UL
-
-
-u8_t bhctx_buffer[BHCTX_ALLOC] boot_bss;
-
-#define check_buffer(ptr) \
- if ((ptr) >= ((ptr_t)bhctx_buffer + BHCTX_ALLOC)) { \
- asm("ud2"); \
- }
-
-size_t boot_text
-mb_memcpy(u8_t* destination, u8_t* base, unsigned int size)
-{
- unsigned int i = 0;
- for (; i < size; i++) {
- *(destination + i) = *(base + i);
- }
- return i;
-}
-
-size_t boot_text
-mb_strcpy(char* destination, char* base)
-{
- int i = 0;
- char c = 0;
- while ((c = base[i])) {
- destination[i] = c;
- i++;
- }
-
- destination[++i] = 0;