Displaying 12 results from an estimated 12 matches for "disk_gpt_header".
2014 Jun 29
0
[PATCH 1/6] chain/partiter: fix and improve gpt handling in buggy cases
...4
--- a/com32/chain/partiter.c
+++ b/com32/chain/partiter.c
@@ -412,34 +412,16 @@ static inline int valid_crc(uint32_t crc, const uint8_t *buf, unsigned int siz)
return crc == crc32(crc32(0, NULL, 0), buf, siz);
}
-static int gpt_check_hdr_crc(const struct disk_info * const diskinfo, struct disk_gpt_header **_gh)
+static int valid_crc_hdr(void *buf)
{
- struct disk_gpt_header *gh = *_gh;
- uint64_t lba_alt;
- uint32_t hold_crc32;
+ struct disk_gpt_header *gh = buf;
+ uint32_t crc = gh->chksum;
+ int valid;
- hold_crc32 = gh->chksum;
gh->chksum = 0;
- if (!vali...
2015 Jul 22
0
[PULL 1/8] Move partiter from com32/chain to com32/lib/syslinux
...er->dos.disk_sig = mbr->disk_sig;
-
- iter->type = typedos;
- return 0;
-bail:
- pi_dtor_(iter);
- return -1;
-}
-
-/* pi_gpt_ctor() - GPT iterator specific initialization */
-static int pi_gpt_ctor(struct part_iter *iter,
- const struct disk_info *di, int flags,
- const struct disk_gpt_header *gpth, const struct disk_gpt_part_entry *gptl
-)
-{
- uint64_t siz;
-
- if (pi_ctor(iter, di, flags))
- return -1;
-
- siz = (uint64_t)gpth->part_count * gpth->part_size;
-
- if (!(iter->data = malloc((size_t)siz))) {
- critm();
- goto bail;
- }
-
- memcpy(iter->data,...
2014 Jun 29
10
[PATCH 0/6] chain.c32 patches
This small set fixes few bugs, improves gpt handling (under buggy conditions)
and implements strict flag with more fine grained control which should fix
issues with sanity checks against disk sizes.
If this set is allright I'd want to do what I mentioned in older discussion
with Ady - backport missing patches from 6.x to 5.x and 4.x so all versions
have up to date chain version.
Michal
2010 Aug 08
1
PATCH/RFC chain.c: update iterator code, yank from chain.c, move both to separate directory
1) code split and move
Iterator related functionality is yanked from chain.c and moved to
iterator.{c,h}. Both are moved to com32/chain and this way chain.c is ready
for further splitting.
Alternatively, partiter could be moved to com32/lib at any time in the future.
It's potentially useful for other modules (e.g. if someone wanted to code
partition dumper or editor).
2) Iterator updates
2013 Oct 18
0
[RFC/PATCH 1/3] Move partiter from com32/chain to com32/lib/syslinux
...er->dos.disk_sig = mbr->disk_sig;
-
- iter->type = typedos;
- return 0;
-bail:
- pi_dtor_(iter);
- return -1;
-}
-
-/* pi_gpt_ctor() - GPT iterator specific initialization */
-static int pi_gpt_ctor(struct part_iter *iter,
- const struct disk_info *di, int flags,
- const struct disk_gpt_header *gpth, const struct disk_gpt_part_entry *gptl
-)
-{
- uint64_t siz;
-
- if (pi_ctor(iter, di, flags))
- return -1;
-
- siz = (uint64_t)gpth->part_count * gpth->part_size;
-
- if (!(iter->data = malloc((size_t)siz))) {
- critm();
- goto bail;
- }
-
- memcpy(iter->data,...
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
2013 Sep 06
1
[PATCH 2/2 v2] com32/disk: Improve flow at disk_write_sectors and disk_read_sectors.
...EBIOS_WRITE_CODE = 0x43, /* Extended write */
+ CHS_READ_CODE = 0x02,
+ CHS_WRITE_CODE = 0x03,
+};
+
struct disk_ebios_dapa {
uint16_t len;
uint16_t count;
@@ -177,4 +190,9 @@ extern void disk_gpt_part_dump(const struct disk_gpt_part_entry *const
gpt_part);
extern void disk_gpt_header_dump(const struct disk_gpt_header *const gpt);
+static inline void *ebios_disk_op(const struct disk_info *const,
+ com32sys_t *, uint64_t, uint8_t);
+static inline void *chs_disk_op(const struct disk_info *const,
+ com32sys_t *, uint64_t, uint8_t);
+
#endif /* _SYSLINUX_DISK_H */
diff...
2013 Sep 06
1
[PATCH 2/2] com32/disk: Improve flow at disk_write_sectors and disk_read_sectors.
...ODE = 0x42, /* Extended read */
+ EBIOS_WRITE_CODE = 0x43, /* Extended write */
+ CHS_READ_CODE = 0x02,
+ CHS_WRITE_CODE = 0x03,
};
struct disk_ebios_dapa {
@@ -177,4 +193,9 @@ extern void disk_gpt_part_dump(const struct disk_gpt_part_entry *const
gpt_part);
extern void disk_gpt_header_dump(const struct disk_gpt_header *const gpt);
+static void *ebios_disk_op(const struct disk_info *const,
+ com32sys_t *, uint64_t, uint8_t);
+static void *chs_disk_op(const struct disk_info *const,
+ com32sys_t *, uint64_t, uint8_t);
+
#endif /* _SYSLINUX_DISK_H */
diff --git a/com32/...
2015 Sep 24
0
[PATCH] com32/disk: add UEFI support
...pa {
uint16_t len;
uint16_t count;
@@ -87,6 +97,8 @@ struct disk_ebios_eparam {
uint8_t checksum;
} __attribute__ ((packed));
+#endif
+
/**
* CHS (cylinder, head, sector) value extraction macros.
* Taken from WinVBlock. None expand to an lvalue.
@@ -169,19 +181,25 @@ struct disk_gpt_header {
} __attribute__ ((packed));
static const char disk_gpt_sig_magic[] = "EFI PART";
+/* common.c */
+extern void disk_dos_part_dump(const struct disk_dos_part_entry *const part);
+extern void guid_to_str(char *buf, const struct guid *const id);
+extern int str_to_guid(const char *buf,...
2014 Nov 22
1
Get rid of printf format warning format ‘%llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’
...4 "\n"
+ "GPT part. attribs ____ : 0x%.16" PRIx64 "\n"
"GPT part. name _______ : '",
gpt_part->lba_first, gpt_part->lba_last, gpt_part->attribs);
for (i = 0; i < sizeof(gpt_part->name); i++) {
@@ -559,11 +560,11 @@ void disk_gpt_header_dump(const struct disk_gpt_header *const gpt)
"GPT header size ______ : 0x%.8x\n"
"GPT header checksum __ : 0x%.8x\n"
"GPT reserved _________ : '%4.4s'\n"
- "GPT LBA current ______ : 0x%.16llx\n"
- "GPT LBA alternative __ : 0...
2012 Nov 06
50
chain.c32 (and partiter) updates v2
This is a bit updated set of chain.c32 changes that simplifies a few things
(and in partiter part), fixes few minor issues and adds a few new features.
Details are in the following commits, below is the summary and pull details at
the end.
Shao - any chance to peek over them ? Most of those are relatively simple
changes and well tested, though of course something might have slipped my
attention.
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