Kernel Hack V4 3 [UPD]
Download > https://shoxet.com/2tdwgD
Currently the kernel reconfigures the Gpio registers based on the board/chip datasheet and Linux datasheet. This is the reason for having a BLK_DEV_GPIO driver in userspace: it provides the generic interface to the hardware with recognized macros and functions. Additionally, the BLK_DEV_GPIO driver is your best candidate when you want to show how easy and ergonomic embedded Linux integration is via kernel module. The default Linux kernel configuration is not very good for embedded use and because of this Linux Kernel Hack V4 comes with common default values for registers/bits that are not related to most embedded platforms. In particular, you will find there is a polled mode for all interrupt/gpio related resources. For example, reading RS232/USB/Bluetooth is turned off because no one will ever want that in an embedded environment (polling for communication is not only slow, but the bitrate is about the same as if you just open the console for a while).
Therefore, this version has been rewritten to try to make it more like the default Linux kernel is intended to be used for. We set a few things in the board/driver datasheet #define BOARD_RESET_PIN 29
A few registers and macros defining structures are also more suitable for embedded platforms use. Again, sorry this is only an initial release and I will detail later what else needs to be done to get this right.
RootFS "skeleton" is based on just a swap area, so no Gdt. The first page is mapped to userspace, for the gpio registers. This can be considered as a basis for having an abstraction for sitting on top of device specific drivers. Of course you will need a lot more to create a driver that it is not possible to express using this barebones framework. d2c66b5586

