|
From: David G. <dga...@gm...> - 2018-05-03 19:09:21
|
2018-04-25 9:14 GMT+02:00 David Gálvez <dga...@gm...>: > > > The information given by this system call is independent from the > machine you're running the kernel on, so it can be a bit confusing. > It's the option it was used to compile the kernel. > If you're using a 060 kernel with FireTOS it will return 68060 but if > you are using a 5475 kernel it will return a ColdFire kernel with > isa_b instruction set. > From the documentation: > "This is not the same as the _CPU cookie value. The _CPU cookie > specifies the CPU physically present in the machine, while the > S_OSCOMPILE indicates the processor type selected at the time when the > system was compiled. In other words, running a 68000-compiled kernel > will return a 0x00 here, even if the machine is running 68040 or > something." I've just had a real situation where to know some compile time flags has been useful. I was testing transferring files to/from a USB device with a kernel with -DOLDTOSFS flag, after doing some transfers (it's a 100 MB zip file and through the ROM-port it takes some minutes) I wasn't sure if I loaded the right kernel, then I remember that a XaAES's menu option shows the flags the kernel running has been built with, and I saw that it was the wrong kernel, without the -DOLDTOSFS flag. |