search for: getoneblk

Displaying 8 results from an estimated 8 matches for "getoneblk".

2010 Apr 16
0
Calling getoneblk() from com32
Is there an easy way to call getoneblk() (along with access to the required disk struct) from com32? I know I can use the gpllib read_sectors() but since the device_init already has the c/h/s/etc it sure would be nice to grab it from there and use getoneblk(). Any hints are greatly appreciated. Cheers, don
2012 Aug 02
0
[PATCH 3/3] ALPHA: implement and use rdwr_bytes
...shift, 1, 1); + if (!res) return done; + } else { + memcpy(buf, core_xfer_buf, len); + } + done += len; + } + + return done; +} + struct edd_disk_params { uint16_t len; uint16_t flags; @@ -292,9 +366,7 @@ static inline bool is_power_of_2(uint32_t x) void getoneblk(struct disk *disk, char *buf, block_t block, int block_size) { - int sec_per_block = block_size / disk->sector_size; - - disk->rdwr_sectors(disk, buf, block * sec_per_block, sec_per_block, 0); + rdwr_bytes(disk, buf, (bytes_t)block * block_size, block_size, 0); } @@ -373,6 +445...
2009 May 24
0
malloc() in the core
...most likely not have memory management -- malloc/free -- available in the core (making that possible is part of KlausM's project, but I want to decouple those.) The code currently uses malloc() in disklab.c, which is used from cache.c. The solution there is pretty simple: add a pointer to get getoneblk() prototype for a target buffer, then use a chunk of .bss memory for the cache. As previously discussed, we really want the cache system to handle multiple block sizes (first of all, because hard disks are going to be changing from 512 to 4K sectors over the next several years, and second because...
2009 Jun 01
1
Exporting real-mode functions
A question was asked on the IRC channel about how to get the address of a real-mode symbol -- or any assembly symbol in general. The answer is that you have to declare it global. In NASM syntax: global func func: In GAS syntax: .globl func func: -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.
2013 Oct 18
1
[RFC/PATCH 2/3] core: MultiFS infrastructure added.
...ze_shift) +__export void cache_init(struct device *dev, int block_size_shift) { struct cache *prev, *cur; char *data = dev->cache_data; diff --git a/core/fs/diskio.c b/core/fs/diskio.c index 7d95d67..466b6a8 100644 --- a/core/fs/diskio.c +++ b/core/fs/diskio.c @@ -21,13 +21,27 @@ void getoneblk(struct disk *disk, char *buf, block_t block, int block_size) /* * Initialize the device structure. */ -struct device * device_init(void *args) +__export struct device *device_init(void *args) { - static struct device dev; + struct device *dev; - dev.disk = firmware->disk_init(arg...
2012 Sep 10
19
Initial support for sector size >512
This set of patches add some support for sector size >512. Currently it fixes extlinux, MBR for GPT and ext partitions. Other code is unaffected. This set of patches has been tested on a read Dell machine running a beta firmware.
2015 Jul 22
13
[PULL 0/8] MultiFS suppport for BIOS and EFI
So last week I was wondering if XFS was still working -- even with its last on-disk structure changes -- and it _suprisingly_ worked as expected. Right, now I can finally get rid of GRUB and use Syslinux to boot my Linux on EFI from a rootfs with xfs. Shit, I have two partitions (the first one being the required ESP) so there is no way to access the other partitions since because Syslinux does not
2012 Aug 20
13
[PATCH 00/12] Multidisk support
Hello, the following patches should get multidisk access working. The syntax accepted is the following: (hdx,y)/path/to/file where x is the disk number and start at 0 and the y is the partition number starting at 1. So (hd0,1) is the first partition of the first disk. the other accepted syntax is using MBR's 32 bits disk signature so for example: (mbr:0x12345678,2)/foo/bar would address