Minix 3 64 bit

429 views
Skip to first unread message

sealp...@gmail.com

unread,
Jul 10, 2021, 8:43:52 AM7/10/21
to minix3

I discovered why Minix 3 cannot be 64 bit . File " /usr/src/include/sys/types.h"
"types.h"

line 77 to 80
typedef struct {

             u32_t lo;

             u32_t hi;

} u64_t;

This is a  pseudo 64 bit code compared to the following
FreeBSD implementation
File "/usr/src/sys/sys/_types.h"
File: _types.h

Line 52 to 58

#if  __SIZEOF_LONG__  == 8

typedef  long     __int64_t;

typedef  unsigned long   __uint64_t;

#elif   __SIZEOF_LONG__   == 4

__extension__

typedef  long  long   __int64_t;

__extension__

typedef unsigned  long  long     __uint64_t;

stux...@gmail.com

unread,
Jul 10, 2021, 9:19:02 AM7/10/21
to minix3
Hi " sealp...@gmail.com" ,

Welcome to the group!  Would you be able to provide a link or links to the lines in question from the repository?  I tried doing a quick search for the types.h file in question but couldn't find it.  Also what version of Minix where you checking?  Anywho, unfortunately getting Minix to compile on a 64-bit platform is not a straightforward endeavor.  The line in question may be one that only defines what u64_t does and how to break it into two pieces.  Some structs need to remain a certain size (for example Minix IPC messages) otherwise other code breaks.

To go more in-depth into what is required, some of the details are covered here:

I appreciate your enthusiasm in the project and we need people willing to dive into the code and figure things out! I hope the information above helps.  Also, a lot of the code is taken from NetBSD, so it's possible there's similar code to the FreeBSD portion below just placed somewhere else.

-stux

P.S. Sorry but Groups now only shows a partial address via the interface.

sealp...@gmail.com

unread,
Jul 10, 2021, 10:27:19 AM7/10/21
to minix3
I use Minix 3.1.5 in virtualbox instead of Minix 3.4.0 because from Minix 3.1.8 and up (Minix 3.4.0) everything is bloated.

Minix 3.1.5 github link:

FreeBSD github link:

stux...@gmail.com

unread,
Jul 10, 2021, 11:26:49 AM7/10/21
to minix3
Ah, thank you for providing the links!

I'd hate to be the bearer of bad news but both NetBSD and FreeBSD likely have the same level of complexity.  Unfortunately it's very difficult to "unbloat' an OS when a certain level of functionality is needed.  And so Minix 3.1.8 and up are bringing that complexity from NetBSD along. 

Also, here's the NetBSD-copied equivalent of the FreeBSD types header in Minix (I think):
It does also define u64_t so that include likely takes care of both headers above.

-stux
Reply all
Reply to author
Forward
0 new messages