What makes Zalloc (ZFS) not stable on 32-bit system?
Why it works on 64bit system.
Why it works on 64bit system.
EXPERT IN MIPI-DSI/DPI/DCS LCD/TSP SINGLE OR DUAL PANEL BRING UP @ ALL LEVELS OF ANDROID STACK. Working for EMBEDDED SOFTWARE LABS. This site is owned by M.PHANI RAJ KIRAN M.Tech INDIA.(c):watisid@rediffmail URL: www.embeddedsoftwarelabs.com http://in.linkedin.com/pub/phanirajkiran-mallapuram/63/916/884
#define IH_OS_LINUX 5 /* Linux */
#define IH_CPU_ARM 2 /* ARM */
LA LA LA HA HA HA HA : Magic number :
#define IH_MAGIC 0x27051956 /* Image Magic Number */
Lol looks like a birthday date : 27th May 1956.
Abooo U-boot header :
typedef struct uboot_image_header { uint32_t ih_magic; /* Image Header Magic Number */ uint32_t ih_hcrc; /* Image Header CRC Checksum */ uint32_t ih_time; /* Image Creation Timestamp */ uint32_t ih_size; /* Image Data Size */ uint32_t ih_load; /* Data Load Address */ uint32_t ih_ep; /* Entry Point Address */ uint32_t ih_dcrc; /* Image Data CRC Checksum */ uint8_t ih_os; /* Operating System */ uint8_t ih_arch; /* CPU architecture */ uint8_t ih_type; /* Image Type */ uint8_t ih_comp; /* Compression Type */ uint8_t ih_name[IH_NMLEN]; /* Image Name */ } uboot_image_header_t;
int register_chrdev(unsigned int major, const char *name, const struct file_operations *fops); int unregister_chrdev(unsigned int major, const char *name);In the old days, register_chrdev() would allocate all 256 minor numbers associated with the given major, associating the given name and file operations with all of them. If the major number is given as zero, one will be allocated on the fly. The corresponding unregister_chrdev() call would release all of those minor numbers. This call asked for the name as a safety measure; if the name did not match that provided when the major number was registered, the unregister_chrdev() call would fail.
int register_chrdev_region(dev_t first, unsigned int count, const char *name); int alloc_chrdev_region(dev_t *first, unsigned int firstminor, unsigned int count, char *name);The first form will allocate count minor numbers, starting with the major/minor pair found in first, and remembering name with all of them. The second form is intended for use when the desired major number is not known ahead of time; it will allocate a major number, then allocate countminor numbers, starting at firstminor. The beginning of the allocated number range will be returned in first. The return value will be zero on success or a negative error code on failure.
void unregister_chrdev_region(dev_t first, unsigned int count);The association of device numbers with specific devices happens by way of the cdev structure, found in
struct cdev *my_dev = cdev_alloc(); if (my_dev != NULL) my_dev->ops = &my_fops; /* The file_operations structure */ my_dev->owner = THIS_MODULE; else /* No memory, we lose */In the more common usage pattern, however, the cdev structure will be embedded within some larger, device-specific structure, and it will be allocated with that structure. In this case, the function to initialize the cdev is:
void cdev_init(struct cdev *cdev, const struct file_operations *fops); /* Need to set ->owner separately */Either way, the structure is put into proper operating condition, and it will be equipped with the file_operations which should be invoked for the associated device. The owner field of the structure should be initialized to THIS_MODULE to protect against ill-advised module unloads while the device is active.
int cdev_add(struct cdev *cdev, dev_t first, unsigned int count);This function will add cdev to the system. It will service operations for the count device numbers starting with first; a cdev will often serve a single device number, but it does not have to be that way. Note that cdev_add() can fail; if the return code is zero, the device has not been added to the system.
void cdev_del(struct cdev *cdev);The cdev should not be referenced after this call. In particular, if cdev was obtained with cdev_alloc(), it will likely be freed in cdev_del().