search for: sector_shift

Displaying 20 results from an estimated 61 matches for "sector_shift".

2012 Aug 02
0
[PATCH 1/3] ALPHA: make sector size dynamic in extlinux
...ldlinux.sys and the boot sector */ - i = syslinux_patch(sectors, nsectors, opt.stupid_mode, opt.raid_mode, opt.directory, NULL); + i = syslinux_patch(sectors, nsectors, opt.stupid_mode, opt.raid_mode, opt.directory, NULL, SECTOR_SIZE); patch_sectors = (i + SECTOR_SIZE - 1) >> SECTOR_SHIFT; /* diff --git a/extlinux/main.c b/extlinux/main.c index f0d8e11..e40b4d7 100644 --- a/extlinux/main.c +++ b/extlinux/main.c @@ -95,6 +95,18 @@ static uint64_t get_size(int devfd) } /* + * Get sector size + */ +static unsigned get_sector_size(int devfd) +{ + int size; + + if (!ioct...
2007 Jan 10
2
USB Flash disk with sector size 2048
...eather linux-live which can be found here: http://franboisson.homeip.net/clef/ClefAgreg.iso Everything works find except with USB key with sector size different then 512 (2048 in my case). I look at the source of syslinux and change the following: * The test in syslxmod.c * Change each time I see SECTOR_SHIFT=9 in SECTOR_SHIFT=11 It's compile fine but when I use syslinux on the key # syslinux /dev/sda1 gives a segfault. An strace gives *** rt_sigaction(SIGINT, {SIG_DFL}, NULL, 8) = 0 rt_sigaction(SIGQUIT, {SIG_DFL}, NULL, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 --- SIGCHLD (Child exi...
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.
2011 Mar 21
1
[elflink] diskstart.inc:420: error: Sector 1 overflow by 5 bytes
...handful of +; extents, but we have to assume a maximally fragmented system where each +; extent contains only one sector. +; + alignz 2 MaxInitDataSize equ 96 << 10 MaxLMA equ TEXT_START+SECTOR_SIZE+MaxInitDataSize -SectorPtrs times MaxInitDataSize >> SECTOR_SHIFT dd 0 +SectorPtrs zb 10*(MaxInitDataSize >> SECTOR_SHIFT) SectorPtrsEnd equ $ ; ---------------------------------------------------------------------------- As you can see from the subject, I'm overflowing Sector 1 by 5 bytes. Could you explain why you changed 0x3FC to 0x3F6? I...
2023 Apr 07
2
[PATCH 0/2] vdpa_sim_blk: support shared backend
This series is mainly for testing live migration between 2 vdpa_sim_blk devices. The first patch is preparation and moves the buffer allocation into devices, the second patch adds the `shared_buffer_mutex` parameter to vdpa_sim_blk to use the same ramdisk for all devices. Tested with QEMU v8.0.0-rc2 in this way: modprobe vhost_vdpa modprobe vdpa_sim_blk shared_backend=true vdpa dev add mgmtdev
2013 Oct 18
1
[RFC/PATCH 2/3] core: MultiFS infrastructure added.
...oreg.edx.b[1] + 1; - disk.s = oreg.ecx.b[0] & 63; + disk->h = oreg.edx.b[1] + 1; + disk->s = oreg.ecx.b[0] & 63; } } @@ -370,24 +374,24 @@ struct disk *bios_disk_init(void *private) } - disk.disk_number = devno; - disk.sector_size = sector_size; - disk.sector_shift = ilog2(sector_size); - disk.part_start = part_start; - disk.secpercyl = disk.h * disk.s; - disk.rdwr_sectors = ebios ? edd_rdwr_sectors : chs_rdwr_sectors; + disk->disk_number = devno; + disk->sector_size = sector_size; + disk->sector_shift = ilog2(sector_s...
2012 Aug 02
0
[PATCH 3/3] ALPHA: implement and use rdwr_bytes
...lba, count, is_write) \ + disk->rdwr_sectors(disk, buf, lba, count, is_write) +/* + * Read a range of bytes + */ +int rdwr_bytes(struct disk *disk, void *buf, + bytes_t lba, size_t count, bool is_write) +{ + int done, res; + unsigned mask, before, len; + unsigned shift = disk->sector_shift; + + dprintf("called rdwr_bytes from %llu for %u bytes\n", (unsigned long long) lba, (unsigned) count); + + mask = disk->sector_size - 1; + + /* aligned, fix count/lba */ + if (((lba|count) & mask) == 0) { + return (rdwr_sectors0(buf, lba >> shift, count >>...
2008 Nov 10
2
[PATCH 1/1] COMBOOT API: Add get current working directory call to most
...------------ ; Common modules ; ----------------------------------------------------------------------------- diff --git a/core/isolinux.asm b/core/isolinux.asm index 3b97005..fbd1ba0 100644 --- a/core/isolinux.asm +++ b/core/isolinux.asm @@ -36,6 +36,8 @@ MAX_OPEN equ (1 << MAX_OPEN_LG2) SECTOR_SHIFT equ 11 ; 2048 bytes/sector (El Torito requirement) SECTOR_SIZE equ (1 << SECTOR_SHIFT) +ROOT_DIR_WORD equ 0x002F + ; ; This is what we need to do when idle ; @@ -1147,15 +1149,30 @@ get_fs_structures: ; Look for an isolinux directory, and if found, ; make it the current directory...
2018 Nov 01
1
[PATCH v9] virtio_blk: add discard and write zeroes support
...nt write zeroes case, so it still does an allocation per > request (I did not see any easy place to put the payload that would > avoid the allocation). > > CHANGELOG: > v9: [dverkamp] fix LE types in discard struct; cleanups from Ming Lei > v8: [dverkamp] replace shifts by 9 with SECTOR_SHIFT constant > v7: [dverkamp] use GFP_ATOMIC for allocation that may not sleep; clarify > descriptor flags field; comment wording cleanups. > v6: don't set T_OUT bit to discard and write zeroes commands. > v5: use new block layer API: blk_queue_flag_set. > v4: several optimizations b...
2012 May 11
15
Errors of doing "make install-tools" with xen-4.2-unstable?
Hi, When I do the "make install-tools" with xen-4.2-unstable, there are some errors about "warn_unused_result". Is it the error in code or the error in the compiling environment? Thank you so much. gcc -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -D__XEN_TOOLS__ -MMD -MF .tapdisk-queue.o.d
2015 Jan 02
13
[PATCH 0/9] linux/syslinux: support ext2/3/4 device
Hello, Happy New Year! These patches make syslinux/linux support ext2/3/4, and it doesn't require the root privilege, I'd like to add a separate e2fs/syslinux, if that is more appropriate, it should be easy to do that. I put these patches on github so that you can easily get them in case you'd like to test them. (The repo's name is sys_tmp, which avoids confusing others, I will
2010 Feb 28
1
INT 22H AX=000Ah, CL=9 and __syslinux_get_derivative_info()
comboot.txt says to set CL=9 "to get a valid return in CL for all versions". The code in __syslinux_get_derivative_info() doesn't set it. Is this comment obsolete? Looking at comboot.inc suggest this because P_CL is set to SECTOR_SHIFT for all derivatives but pxelinux which does set P_ECX to MyIP. - Sebastian
2012 Jul 16
1
Support for 4kb disks
Hi, I'm trying to get syslinux (extlinux actually) work with 4kb disks. I got a bios with 4kb support but seems that extlinux does not work at all. In extlinux/main.c SECTOR_SIZE and SECTOR_SHIFT are constants to 512 bytes and also there are a lot of checks in different places (like in syslinux_check_bootsect). Currently I'm trying it to work using GPT and an ext3 partition. Anybody is working on similar issue or has some advice? Is there a way to emulate 4kb bios using any virtual e...
2018 Jun 06
10
[PATCH v6] virtio_blk: add DISCARD and WRIET ZEROES commands support
Existing virtio-blk protocol doesn't have DISCARD/WRITE ZEROES commands support, this will impact the performance when using SSD backend over file systems. Commit 88c85538 "virtio-blk: add discard and write zeroes features to specification"(see https://github.com/oasis-tcs/virtio-spec) extended existing virtio-blk protocol, adding extra DISCARD and WRITE ZEROES commands support.
2018 Jun 06
10
[PATCH v6] virtio_blk: add DISCARD and WRIET ZEROES commands support
Existing virtio-blk protocol doesn't have DISCARD/WRITE ZEROES commands support, this will impact the performance when using SSD backend over file systems. Commit 88c85538 "virtio-blk: add discard and write zeroes features to specification"(see https://github.com/oasis-tcs/virtio-spec) extended existing virtio-blk protocol, adding extra DISCARD and WRITE ZEROES commands support.
2018 Oct 12
0
[PATCH v8] virtio_blk: add discard and write zeroes support
...m virtio_blk.h and quoting parts of the spec without adding any extra information. I have tested this iteration of the patch using crosvm with modifications to enable the new features: https://chromium.googlesource.com/chromiumos/platform/crosvm/ CHANGELOG: v8: [dverkamp] replace shifts by 9 with SECTOR_SHIFT constant v7: [dverkamp] use GFP_ATOMIC for allocation that may not sleep; clarify descriptor flags field; comment wording cleanups. v6: don't set T_OUT bit to discard and write zeroes commands. v5: use new block layer API: blk_queue_flag_set. v4: several optimizations based on MST's comment...
2018 Nov 01
0
[PATCH v9] virtio_blk: add discard and write zeroes support
...t to optimize the single-element write zeroes case, so it still does an allocation per request (I did not see any easy place to put the payload that would avoid the allocation). CHANGELOG: v9: [dverkamp] fix LE types in discard struct; cleanups from Ming Lei v8: [dverkamp] replace shifts by 9 with SECTOR_SHIFT constant v7: [dverkamp] use GFP_ATOMIC for allocation that may not sleep; clarify descriptor flags field; comment wording cleanups. v6: don't set T_OUT bit to discard and write zeroes commands. v5: use new block layer API: blk_queue_flag_set. v4: several optimizations based on MST's comment...
2015 Jul 18
1
[PATCH 1/2] xfs: rename xfs_is_valid_magicnum to xfs_is_valid_sb
...+331,7 @@ out: return NULL; } -static inline int xfs_read_superblock(struct fs_info *fs, xfs_sb_t *sb) +static inline int xfs_read_sb(struct fs_info *fs, xfs_sb_t *sb) { struct disk *disk = fs->fs_dev->disk; @@ -376,24 +376,21 @@ static int xfs_fs_init(struct fs_info *fs) SECTOR_SHIFT(fs) = disk->sector_shift; SECTOR_SIZE(fs) = 1 << SECTOR_SHIFT(fs); - if (xfs_read_superblock(fs, &sb)) { + if (xfs_read_sb(fs, &sb)) { xfs_error("Superblock read failed"); goto out; } - - if (!xfs_is_valid_magicnum(&sb)) { + if (!xfs_is_val...
2014 May 29
0
[PATCH 2/2] core/fs: Add support for Unix File system 1/2.
...+ /* This can't happen... */ + return 0; +} + +/* + * Next extent for getfssec + * "Remaining sectors" means (lstart & blkmask). + */ +int ufs_next_extent(struct inode *inode, uint32_t lstart) +{ + struct fs_info *fs = inode->fs; + int blktosec = BLOCK_SHIFT(fs) - SECTOR_SHIFT(fs); + int frag_shift = BLOCK_SHIFT(fs) - UFS_SB(fs)->c_blk_frag_shift; + int blkmask = (1 << blktosec) - 1; + block_t block; + size_t nblocks = 0; + + ufs_debug("ufs_next_extent:\n"); + block = ufs_bmap(inode, lstart >> blktosec, &nblocks); + ufs_d...
2009 Feb 08
1
[PATCH 1/1] COMBOOT API: Add calls for directory functions; Implement for FAT; Try 2
...------------ ; Common modules ; ----------------------------------------------------------------------------- diff --git a/core/isolinux.asm b/core/isolinux.asm index 3b97005..2c6d970 100644 --- a/core/isolinux.asm +++ b/core/isolinux.asm @@ -36,6 +36,8 @@ MAX_OPEN equ (1 << MAX_OPEN_LG2) SECTOR_SHIFT equ 11 ; 2048 bytes/sector (El Torito requirement) SECTOR_SIZE equ (1 << SECTOR_SHIFT) +ROOT_DIR_WORD equ 0x002F + ; ; This is what we need to do when idle ; @@ -1147,15 +1149,33 @@ get_fs_structures: ; Look for an isolinux directory, and if found, ; make it the current directory...